The Autogenerated Java Test Driver

As defined by JUnit, each test class must be called by a test driver class - and that class is represented here, in the TestDriver.java file.

To view the Test Driver:

  1. In the Project Window on the right-hand side of the screen, on the Project Browser tab, double-click the TestDriver.java node (child of the PhoneNumber Java component testing node).

Note how the TestDriver class contains main(), and note how the TestDriver() constructor contains a call to the test class TestPhoneNumber. If other test classes were generated by the Component Testing Wizard - that is, if you had selected multiple classes for testing and opted to have all classes tested as part of the same test driver - you would see them listed here.