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

Running tests

In the previous few recipes, we've seen how to create JUnit tests from scratch and based upon existing classes. We've also seen how to create a test suite that defines a set of tests and the order in which they can be executed.

In this recipe, we'll see how we can run all of those tests within NetBeans and see the reporting of the tests we've run.

NetBeans provides several ways to run tests and test suites. We'll look at all of these techniques within this recipe.

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 ...

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