New TestNG Test Case Wizard: Name and Location
See Also
The New TestNG Test Case wizard creates a new empty TestNG test class in the specified test folder.
When you create an empty test the IDE generates a test class that does not contain any skeleton methods.
You open the New TestNG Test Case wizard by selecting TestNG Test Case in the TestNG category of the New File wizard.
In the Name and Location panel, you set the following properties:
- Class Name. Specifies the class name of the test.
The IDE names the class
NewEmptyTestNGTest
by default.
- Project. Specifies the project where the test is located. You cannot change this value.
- Location. Specifies the test folder where you want to create the test.
The drop-down list contains all folders specified as project test folders.
- Package. Specifies the package in the test folder where you want to store the test file.
Select a package from the drop down list or create a new package by typing in a new package name.
- Created File. Displays the path to the new file. The name of the file is identical to the class name.
- Generated Code. Select the checkbox if you want the IDE 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.
- Generated Comments. Select the checkbox if you want the IDE to generate the following:
- Source Code Hints. Hints in the generated code that suggest how to implement the test methods.
When you click Finish the IDE creates the test class based on the parameters you have specified and opens the class in the editor.
The test class then appears in the Projects window under the package-name node in the test folder.
- See Also
- Creating a Unit Test
- Running a Unit Test
- About Unit Testing
Legal Notices