O'Reilly logo

NetBeans IDE 8 Cookbook by Rhawi Dantas, David Salter

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a JUnit test suite

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.

Getting ready

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.

How to do it…

Perform the following steps to create a JUnit test suite:

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required