Settings of Unit tests module

Executor for tests

Determines the type of executor used for execution of tests. Three types of execution are available - external, internal and debugger. IDE registered executors are used for such execution type - Exetrnal Execution, Internal Execution and Default Debugging.

Generate comments in test function bodies

Test generator is capable of generating simple hints inside the bodies of generated test functions.

Generate default bodies of test function

Generated test functions can either be empty or contain piece of code printing the name of function and causing the test to fail with message:

'The test case is empty.'

Generate JavaDoc comments

Simple JavaDoc comment can be generated for every test function.

Generate tests for exception classes

Classes derived from the java.lang.Throwable class can be skipped from generation of tests. It could be useful to leave them not tested because usually they don't contain any testable code.

Generate tests for package memeber functions

Package memeber functions are those defined without access specifier. For instance this method hasn't specified access specifier.

void myMethod() {}

Generate tests for protected memeber functions

Protected member functions of tested class can be accessed from test class, because they both belongs to the same package. Generated testMyMethod() can call following method from tested class. protected void myMethod() {}

Generate tests for public memeber functions

This flag probably will never be turned off, but it exists just for the completeness.

Generate tests based on NetBeans extension to JUnit

Generate tests, which use advanced features of NetBeans extension to JUnit like asserting files, filtering test methods, etc. These tests have to inherit from org.netbeans.junit.NbTestCase (instead of junit.framework.TestCase), but they are 100% compatible with original JUnit framework, because NetBeans extension is working like plug-in to JUnit (it can work seamlessly with several version JUnit framework, without neccessity to modify anything in JUnit's code).

Regenerate suite method

When turned on, the generator always regenerates suite() method in both test class and suite class.

Properties

This option can be used to specify any number of property-value pairs, which will be pre-set for the test execution. Properties has the format of <property_name>=<value>, any line started with '#' character is treated as comment, comments are prohibited on lines defining regular properties.

Show Test Create Configuration

Here is the way, which you can switch on displaying of the generator configuration dialog box, which was preveniently switched off.

Show Test Execute Configuration

This flag has no effeft now.

Suite class template

Use this option to select the template for generation of suite classes. The suite class encapsulates test classes for the package.

Target file system for tests

Probably the most important thing, which you will do, is the selection of the file system, where your tests resides. This file system is used either for the generation of tests or for their execution.

Test class template

The template for generated test classes.

Test runner class

JUnit module provides its own implementation of test runner, which formats test results appropriately for the IDE output window. It filters stack traces written for each test failure or test error and leaves just one line useful to link the test report to the test source code.

Here you can specify another test runner, which will be used for the test execution. The JUnit framework itself implements several runners, e.g. the simple text runner junit.textui.TestRunner class.