Test-Driven Development in Java

Testing is a vital component of software development because it has a proportional relationship to code quality – the more complete the testing suite the better the quality of the application code. Test-Driven Development (TDD) practices, especially when supported by an automated continuous build and test environment, can drastically improve test coverage and enable incremental, iterative development. This course will introduce participants to TDD concepts, principles, and practices, including many different aspects of testing, the application of testing across various software settings, and open source tools that are available for developing and executing TDD practices in a Java development environment.


To make applications testable, including aspects of code coverage and general design principles in Java. Training is to include date/time based and asynchronous behavior testing.


Java developers (intermediate level and above) who want to improve code quality through test-driven development practices.




  • Introduction to Testing
    • What is a Unit Test?
    • Introduction to JUnit
    • Practical Naming Conventions
    • Introduction to Continuous Integration
  • JUnit
    • JUnit API
    • Executing JUnit tests
    • Integration with Ant (may need to be replaced with Maven, eventually Gradle)
  • Writing Unit Tests
    • Writing Effective JUnit Tests
    • What Should You Test?
  • Test Doubles and Mock Objects
    • Introduction to Test Doubles and Mock Objects
    • Writing Test Doubles and Mock Objects
    • Testing with Test Doubles and Mock Objects
  • Improving Testability
    • Code “Smells”
    • Designing Testable Code
  • Testing Techniques
    • Writing Reusable Test Code
    • Maintaining Test Code
    • Data-Driven Tests
  • Advanced Features
    • Hamcrest assertions (if applicable)
    • Timeouts
  • Code Coverage Tools


2 Days (12 Hours)

WebSanity Top Secret