English French German Italian Portuguese Russian Spanish

logo_old

  • Java Training

    javaInterSource offers live instructor-led courses on all important Java-related technologies, including Apache Struts, Enterprise Java Beans (EJB), J2SE Desktop Java Enterprise Edition (Java EE), Java Fundamentals, Java Web Services, JavaServer Faces, JBoss, Java Server Pages (JSP), and Spring.

    Please refer to our detailed course outlines below.

  • About Java

    Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture

    Java is general-purpose, concurrent, class-based, and object-oriented, and is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is considered by many as one of the most influential programming languages of the 20th century, and widely used from application software to web application.

    Read More

  • Course Details Java

    Classes are offered at client sites, at our Geneva training center, and via a live web conference. For detailed course outlines and scheduled classes, please see below.

    To book training, navigate to the course you need, then:

    • For scheduled online classes, register from the choices indicated.
    • If you need an alternative date, time or location, or if you want a live classroom course, click on “request an offer for this course,” to complete the form.

Introduction to Java Testing

 PDF PrintEmail

Course duration

  • 2 Days

Course Outline

This Introduction to Java Testing training class introduces the experienced Java programmer to testing and test-driven development practices using JUnit. We work from the basics of JUnit as a tool, to best practices for writing effective and maintainable tests. The course is not strictly a TDD course, but we introduce TDD and take students through an illustrative case study. We discuss the importance of mocking and explore testing techniques using Mockito. Finally we discuss concerns and strategies for testing enterprise components in the Java EE context.

IDE Support: Eclipse Luna: In addition to the primary lab files, an optional overlay is available that adds support for Eclipse Luna. Students can code, build, and test all exercises from within the IDE. See also our orientation to Using Capstone's Eclipse Overlays, and please be advised that this is an optional feature; it is not a separate version of the course, and the course itself does not contain explicit Eclipse-specific lab instructions.

  • Learn to build unit tests for Java classes using JUnit.
  • Learn to write effective tests, and design classes for testability.
  • Understand test-driven development (TDD) and use dynamic mocking to support isolated testing.
  • Develop effective testing strategies for Java-EE components.
  • Solid Java programming experience is essential -- especially object-oriented use of the language.Language features and techniques that are integral to some lab exercises include interfaces and abstract classes, threading, generics and collections, and recursive methods.
  1. Automated Unit Testing with JUnit
    1. Automated Testing
    2. JUnit and Related Tools
    3. The @Test Annotation
    4. The Assert Class Utility
    5. Test Runners
    6. Lifecycle Methods
    7. Expecting Exceptions
    8. Test Suites
  2. Writing Tests
    1. Test Granularity
    2. Reusing Test Logic
    3. Recording and Comparing Output
    4. Test Isolation
    5. Controlling the Test Environment
    6. Managing Dependencies
    7. Non-Invasive Testing
    8. Designing for Testability
    9. Factories
    10. Testing and Threads
  3. Test-Driven Development
    1. Writing the Test First
    2. The TDD Cycle
    3. Advantages of TDD
    4. Resistance to TDD
    5. A Case Study
  4. Mocking
    1. Mock Objects in Testing
    2. Mock Objects in Test-Driven Development
    3. Static vs. Dynamic Mocks
    4. Stubbing
    5. Verifying
    6. Matching and Capturing
    7. Using a Spy
    8. Partial Mocking
  5. Testing Enterprise Components
    1. Challenges in Java-EE Testing
    2. The Java Naming and Directory Interface
    3. Mocking JNDI
    4. Java-EE Dependency Injection
    5. Testing Persistence Components
    6. Mocking JDBC and JPA
    7. Test Databases
    8. Auto-Rollback
    9. Verifying Transactionality and Cleanup
    10. Web Components
    11. Mocking the Web Container
    12. Asynchronous Messaging
    13. Mocking the JMS Session
    14. Web-Services APIs: JAX-WS and JAX-RS

InterSource Geneva, a premier Information Technology training firm, offers over 400 different courses on server, database and programming technologies, as well as end-user classes for the most popular office, graphics and design applications. We serve clients in Switzerland (Geneva, Lausanne, Bern, Basel, Zurich) and throughout Europe (France, Germany, Austria, Finland, Sweden, England, Netherlands, Spain, etc.).


InterSource offers custom, private courses at client sites, standard public courses in our Geneva classroom, and online training via live Web conference. Training is offered in English and many other languages (Francais, Deutsch, Espanol, Italiano.)


For an overall view of our offerings, please visit us at www.intersource.ch.