Substituting the URL of an application by using Datasets

If you have the same Web UI application deployed on different servers corresponding to different phases of a project (development, production, etc.), or different versions of the application for example, you might want to execute the same Web UI test on all these servers at once. To switch from one server to another, you can edit the URL of the application and run the test on a different server. To execute tests on different environments at once, you can substitute the URL from a dataset so that you can run the same test in a loop on different servers.

About this task

This task applies to Web UI applications only, from the UI Test perspective.

Procedure

  1. To switch from one server to another one while you are running your test, you need to edit the application URL as follows:
    1. In Rational® Functional Tester, open the test in the Test Editor, and then click the Launch application root step.
    2. In the Application Details pane, select the address in the URL field, and then enter a new URL, or modify the current URL. Example: Replace the . com extension with the .en extension.
  2. To execute a test in different environments, use a dataset to substitute the value in the URL field, with a variable test data, for example, you can replace the .com extension of the URL with the .en extension, as follows:
    1. Create the dataset. For more information about this subject, see Creating a dataset associated with a test.
    2. Associate the address field request in the test with a particular column in the dataset. To do so, select the URL, right-click the URL in the field, and select Substitute > Select Data Source. For more information about this subject, see Associating a dataset with the test.
    3. Once the dataset and column are selected, click Finish. In our example, there is a compound test with two iterations of the test, one for the .en site, the other for the .com site.
    4. Run the test. During the playback, you will have to check that the first iteration is replaced with the second one.
    Note: In a similar way, you can click the In Window step of the test, and then substitute the entire URL or part of the URL in the In Window Details pane.