A JUnit test suite is a convenient way of specifying a set of test cases and the order in which they should run.
Within JUnit, the
@Suite annotation is used to specify which test cases are within the suite. JUnit uses the
Suite test runner to run the classes.
To complete this recipe, you need to ensure that you have installed the JUnit support into NetBeans as described in the earlier recipe, Installing JUnit support into NetBeans.
You'll also need the sample project we created in the previous recipe, Creating a JUnit test. If you have not completed that recipe, the project is available as part of the code download bundle for the book.
Perform the following steps to create a JUnit test suite: