Generating Java code
This topic describes how to generate Java code for an existing JUnit test. You must generate Java code before you can run the test suite.
- Open the Test perspective.
- In the Test Navigator right-click the test suite and select Generate. The JUnit Test Definition Code Generation dialog box opens, as shown below.
- Enter the name of the Java project that contains the test suite definition for which you want to generate code, or click Browse to navigate to the project. Before you can generate the Java code a folder for storing the code must exist. See Creating a new source folder. By convention this folder is called src and is located in the same Java project that contains the test suite. Click Browse to navigate to the folder that will contain the generated code. Click Finish.
Parent topic
JUnit test overview
Previous topic: Editing JUnit test suite
Next topic: Running a Test