Correlate multiple fields in a test

 

+

Search Tips   |   Advanced Search

 

Overview

Some tests are structured in such a way that correlate multiple fields.

For example, assume to datapool an item that a virtual user is buying. For the test flow to be correct, also datapool all occurrences of that item in the test. You can find and correlate all instances of that item in one procedure.


Procedure

To find all instances of a field in a test and correlate some or all of the instances with a data source, such as a datapool, do the following:

  1. In the Test Navigator, browse to the test, and double-click it.

  2. Locate the item or the substitution site to change or create a reference for.

  3. Right-click the field, and then click...

      Find | More Substitution Sites

  4. Click OK.

  5. On the Test Search page, select the appropriate options:

    Restrict to elements highlighted in Test Contents

    Search only in elements that are selected in the Test Contents area.

    Case Sensitive

    Search is case-sensitive.

    Highlight found elements in Test Contents

    Highlight found elements in the Test Contents area.

    Recursive

    Searches the children of the test element in addition to the element.

    For example, if you search an HTTP page, select this option to search the requests and responses within the page.

    Include matches with overlapping data correlation

    Include sites that are contained in, or overlap with, an existing substitution site. If you decide to substitute, the conflicting substitutions are automatically removed.

    Include matching substituters

    Click to return elements that originally matched the search string but have since been substituted. Clear to skip existing substitution sites when results are returned.

  6. Click Search.

    The search results are displayed in the Search view.

  7. In the Search view, select the matches to substitute, and then right-click the selection.

    To select all matches, right-click the test name.

  8. Click...

      Substitute in DataSource View

    The Test Data Sources window opens

    Option Description
    References The data sources that have already been created in the test and the potential matches that are available as data sources for the selected substitution site.

    For example, text that is found in a response and used in a subsequent request is automatically created as a reference.

    To see all the references that occur before the substitution site in the test, clear the check box...

      Matching References Only
    Datapools The datapools that have been added to the test.

    To add a new datapool, click the Add new Datapool icon ().

    Custom Code If written test execution services (TES) custom code, the custom code that is available as data sources for this substitution site.
    Test Variables Test variables and their types that are available as data sources for this substitution site.

    Built-in Variables The dynamically calculated variables (Current Date and Timestamp) that are available as data sources for this substitution site. To create a new built-in variable, right-click inside the Built-in Variables page, and select New.

  9. Select the data source, and click Substitute From.

    The Substitute Multiple Items window is displayed, showing information about the data source and substitutions sites selected.

  10. For each site with a selected check box, click Substitute Checked to substitute the data source or clear the check box to skip the site.

    Click Always Prompt to examine each substitution site one at a time. Click Prompt on overlapping data correlations to examine a site only if the site you are substituting into is contained in, or overlaps with, an existing substitution site. If you decide to substitute, the conflicting substitutions are automatically removed.


Results

The selected instances of the field are correlated with the data from the data source.


Related

  • Data correlation overview
  • Test data sources overview
  • Guidelines for adjusting data correlation


    Related tasks

  • Viewing data correlation
  • Create a reference or field reference
  • Disabling data correlation
  • Re-correlating test data