Exercise 1.4: Running the test and analyzing the results

Before you begin, you must complete Exercise 1.3: Editing the test.

After you edit your test, you can run it and view the test results. A test runs with the data you have supplied for it in a test data table. If you supply sets or ranges of values in the test data table, running a single test results in the running of many individual tests. For example, if you run a test for a method that has two arguments, and you supply five values for arg1 and six values for arg2, running the test results in 30 individual tests.

To run the test:

  1. Right-click a test suite you wish to run in the Test Navigator and click Run > Run to start the Run wizard. Run test wizard, page 1
  2. Under Configurations, click Component Test, click New, and enter a configuration name. (The next time you run a test, you can use the same configuration or create a new one.)
  3. Select the test to be run.
  4. Click the Execution Results tab, specify a location where you want the tests results to be stored, and click Run.
  5. After the test run is finished, go to the Test Navigator and expand the Run folder until you find the Individual Tests.
    Individual tests shown in the Test Navigator
  6. Double-click an Individual Test to display the test results in the Test Data Comparator, as shown below:

Test Data Comparator

The Test Data Comparator has three columns: one for the input data, one for the expected outputs, and one for the actual results. The actual results column appears in green when the actual results match the expected results and in red when there are discrepancies.

Finish your tutorial by reviewing the materials in the Summary.

Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.