Replacing Literals with Datapool References

If you have an existing test script, you can replace literal values in the script with datapool references to add realistic data to the script. You can find and replace all literals, or just the number, string, or boolean literals with a datapool reference.

You can also add a literal from a script to a datapool. If you do not use an existing datapool variable, the same literal values (the values that were captured when you recorded the test script) are used each time you run the script.

To replace a literal with a datapool reference:

  1. Click Script > Replace Literals with Datapool Reference.

  2. Under Direction, click Forward or Backward to set the direction you want to search through a test script.

  3. Under Literal Type, set the type of literal you want to find.

  1. Click Find to start the search.

    The name of the literal found in the test script appears under Literal.

  2. Click the Datapool Variable arrow to display the datapool variables and then click the datapool variable that you want the script to reference.

  3. Optionally, type a new variable name for the datapool variable you selected.

  4. Optionally, click the Add Literal to Datapool check box to add the literal value to the datapool.

  5. Click Replace to replace the literal in the script with a datapool variable reference.

    The cursor automatically moves to the next literal in the test script.

    Note:
    If you have a literal that is a choice in a combo box in the application-under-test, when you replace the literal with a datapool reference, you get a string data type instead of an a enumerator data type in the datapool.

  1. When you find the next literal in the test script, repeat steps 5 through 7.

  2. When finished, click Close.

    Functional Tester updates the datapool with any new columns and initial values that you add in this dialog box.

Related Topics:

Editing Datapools

Associating a Datapool with a Test Script

Datapool Literal Substitution Dialog Box

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