Chapter 6: Unit Testing

Major Concepts

Upon completing all the content in this chapter, you should be able to do the following:

  1. Write unit tests to verify the behavior of methods
  2. Identify proper behaviors for which a test should be written
  3. Understand the importance of testing in creating well-functioning code
  4. Use test-driven development to define the behavior of code before writing it, and to ensure that code is properly tested
  5. Use JUnit to create tests

Key Terminology

Throughout this lesson you should make note of the following terms and their definitions as you read the content on the page.

Testing in Java

  1. Automated testing
  2. unit testing
  3. JUnit
  4. refactoring

JUnit

  1. annotations
  2. dependencies

Chapter Content