Extension of application URL in Web UI tests
You are familiar with the feature to substitute text in the application URLs of Web UI tests. Starting from 10.1, you can extend the application URLs with substituted text from one Web UI test to other Web UI tests. This feature reduces your effort of manually substituting the application URLs in all your tests that have an application URL.
After you substitute a partial or an entire application URL used in a Web UI test for a particular phase of your project, you can extend the substituted application URL to the tests used in other phases of the project.
For example, if you have a project called abc
, then the different phases of the
project might have the following application URLs:
- https://www.abcdev.com
- https://www.abcprod.com
- https://www.abcnonprod.com
You can also have different tests in each phase that tests different pages with the same primary URL. For example, https://www.abcprod.com/welcome.htm, https://www.abcprod.com/intro.htm.
If you want to change any part of the application URL, then you have to manually substitute the application URL in each test that uses the URL. This feature enables you to substitute the text in the application URL in any one test. You can then extend the substitution in the application URL across all tests that use the URL.
You can use different data sources that contain text values to replace the text in the URL. You can use the following types of data sources:
- Built-in variable
- Custom Java code
- Dataset
- Test variable
- The tests have a variable that is shared
- The values of the shared variable are different in each test
For example, you have declared a variable VAR that you share between two tests, A and B. The value of the variable VAR is set as value1 for test A, and value2 for test B. If you substitute the variable VAR in the application URL in test A, and then extend the application URL to test B, the value of the substituted variable in the application URL of test B remains at value2 and is not replaced.