Previous Topic

Next Topic

Book Contents

Book Index

About test cases

About test cases

Characteristic

Description

About

You create test cases in the Rule Test Cases dialog box to test data-entry rules, workflow rules, and global conditions before deploying a study.

How many to create

Depending on the rule, you might create several or many test cases.

When to create

You can create test cases either after writing each rule or after all rules are finished.

To make sure that a rule is written correctly, consider writing and running a single test case for it, so you do not write many test cases for a rule that needs to be modified.

Running test cases

You can run test cases on demand in the Rule Test Cases dialog box. Additionally, test cases are run during study validation.

Modifying rules

If you modify a rule, make sure that you modify its test cases, as well.

You can also filter the tree so that you see only the rules that were modified since you created its test cases. Use the list to check that the test cases are still accurate for the modified rules.

Locking

When you select a test case, the following are locked:

  • All test cases on the rule.
  • The data-entry rule, workflow rule, or global condition for which the test case was created.

If you save the study object in the study, your changes in the Rule Test Cases dialog box are also saved, and the locks are released.

Rules for which you cannot create test cases

You cannot create test cases for a rule if:

  • The rule does not have an action.
  • The rule has no item paths; for example, if the rule uses a function that finds the current date.

Additionally, you cannot perform unit conversions in the Rule Test Cases dialog box.

Repeating study objects

When a rule expression references a repeating study object, such as a repeating form or section, you can provide test values for each instance.

Results

  • The progress indicator is green if all test cases are valid, red if one or more test cases are not valid, or yellow if one or more test cases have warnings.
  • Red circles (for invalid test cases), green circles (for valid test cases), or yellow triangles (for test cases with warnings) appear next to the name of the test case in the grid.
  • In the Syntax column, either valid, invalid, or incomplete (for rules or global conditions that have valid syntax but are not complete; for example, if the rule has no action defined) appears.

Saving

Saving a study also saves all changes in the Rule Test Cases dialog box, including any changes that you did not save in the Rule Test Cases dialog box before closing.

Troubleshooting failed test cases

A test case fails when the parameters that you enter are run in the rule, and the result that you expected does not occur. To troubleshoot failed test cases, consider the following:

  • Does the test case reflect the expected behavior of the rule?
  • Is the rule written correctly?

You can sort the results of test cases by the Status field and use the failed test cases as a checklist of rules or test cases to review.

When you close the Rule Test Cases dialog box, test case results are not saved. To view results, you must run the test cases again the next time you open the Rule Test Cases dialog box. The results of the test cases appear in the Jobs Browser after validation is performed.

Copyright © 2013 Oracle and/or its affiliates. All rights reserved.