Creating test cases

In hardcoded and test class module types user has a possibility of generating a basic test cases automatically. To create test cases, do as follows:

  1. In Project Explorer, select one or more of the methods you want to test with STIF.
  2. Right-click the selection and go to STIF > Generate test cases.

    In the following example, the methods are chosen from an exemplary class:

  3. On the Test Case Wizard page, set the methods and method parameters for test cases.
    1. On the left pane, select the methods you want to test and click Add.

      You can add one method several times, which will create multiple test cases for one methods.

    2. In the Value column, type in the parameter values for the tested methods.

      Note: No validation is done so check that the values are valid for the tests.

  4. Do either of the following:

If you are using a test module of type other than hardcoded and test class you cannot use automatic test case generation. Please refer to STIF User Guide to see how to create proper test cases for the given test module.

Related tasks