Create Tests Dialog Box
See Also
This dialog box enables you to specify the options for generating unit test classes
and suites for existing Java classes. You open the dialog box by right-clicking
any Java file, package, or the Source Packages node and choosing Tools >
Create Tests (Ctrl-Shift-U).
You can specify the following options in this dialog box.
- Class Name. Specify the name for the test class.
By default the IDE generates a name for the test class
that is the fully-qualified class name appended with Test.
- Location. Select a test package from the dropdown list.
- Framework. Select a unit testing framework from the dropdown list.
- Method Access Levels. Specifies which methods to generate test
methods for.
- Class Types. Specifies which class types to generate test classes
for. This option is only available when generating tests for multiple classes.
- Optional Classes. Specifies whether to generate a test suite or
whether to just generate the individual test classes. This option is only
available when generating tests for multiple classes.
- Generated Code. Specifies whether to generate the following:
- Test Initializer. Method for tasks like initializing fields,
enabling on logging, and resetting environment variables.
- Test Finalizer. Method for cleaning up after tests have
finished running.
- Default Method Bodies. Sample test code and for printing out information about
test status to the command output.
- Generated Comments. Specifies whether to create Javadoc comments
for the test methods and comments that suggest how to implement the test
methods.
Notes.
- Depending on the version of the unit testing framework you are using,
the name of the test class is not required to end with Test.
- You can modify the default name of the test class, but some of the
navigation in the IDE between classes and test classes might not function
if the name of the test class does not contain the name of the
class that is tested.
- See Also
- Creating a Unit Test
- Running a Unit Test
- About Unit Testing
Legal Notices