Working with Test Cases

Often, you will want to run the same test multiple times using different values in the Value column. Test cases enable you to associate different sets of data with a test. You can view and edit both the test and test case in a single unified window.

To create a new test case:

  1. With a test open, click the New button to the right of the Test Case field.

  2. Enter a name for the new test case.

  3. (Optional) In the Test Case Descr field, enter a description for the test case.

  4. (Optional) Click the Test Case Properties icon to enter a long description of the test case.

    It is a good practice to provide a good description for a test case. Test case names are limited in length and provide the user with little information.

  5. (Optional) Click the Test Case Comment icon to add a comment for the test case.

  6. The new test case provides a set of new, empty Value fields for all the steps of the test.

    Enter a new value for each step that requires a value.

  7. Save the test case.

Image: New test case with blank values

This example illustrates a new test case with blank values.

New test case with blank values

For convenience, you may want to create a test case with the Value column populated with the values from the original test or from another test case. Then, you can edit the values in the new test case.

Note: The test case associated with the original test is named DEFAULT. Every test has one test case named DEFAULT.

You can select an existing test case from the Test Case drop-down list box.

PTF displays the number of test cases associated with the test, including the DEFAULT test case, next to the Test Case field label.

To create a test case with values:

  1. With a test case open, select Test, Test Case Save As.

  2. Enter a name for the new test case.

  3. (Optional) Enter a short description and a long description for the test case.

  4. Highlight each value you want to change and enter a new value.

  5. Save.

When you cut/copy and paste test steps, a dialog box appears providing options for how to manage test case values. You can select one of the following options.

  • Paste only the steps, leaving the test case values blank.

  • Paste the current test case values from the source to the target.

  • Paste the test case values only for matching test case names.