Chapter 4. Managing test suites
This chapter covers
- Manually collecting tests into custom test suites
- Automatically collecting tests into different kinds of test suites
- Ordering and filtering tests in test suites
- Using Parameterized Test Cases to build a data-driven test suite
In JUnit, the smallest unit of “test execution” is the test suite. JUnit doesn’t actually execute individual tests, but only executes test suites, so in order to execute your tests, you need to collect them into a test suite. The recipes in this chapter describe different ways to create and manage test suites.
The simplest test suite to create consists of all the tests in a test case class. This is so simple that JUnit does it for you. See recipe 4.1, “Let JUnit build ...
Get JUnit Recipes now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.