Search:     Advanced search

Modifying Web Scripts to Run Against a Different Web Server

Article ID: 798  |  Last updated: 23 Dec, 2014

If you want to test a web application hosted on multiple servers, you can use repository variables and URL format rules to handle URL changes so scripts that were recorded on a different web server can run correctly.

Modify the URL value with a repository variable

When you switch to a different web server, the application URL most likely changes. To ensure that QA Wizard Pro can run scripts on different servers, you can use a repository variable with values for each server address. 

For example, you want to test an application on a development server and a test server. You can create a URLROOT variable with values of and  Add the URLROOT variable to the script and assign it the value for the server you are running the script on. 

  1. Select the application version in the application repository.
  2. Choose File > Properties.
  3. Click the Repository Variables tab and click the Add button.
  4. Enter a Variable Name.
  5. Select List as the Value Type. This allows you to assign multiple values to the variable.
  6. Click the plus sign in the Default Values field to add values through the Manage List Values dialog.
  7. Select Auto-Record Substitution to automatically replace all instances of the variable value with the variable name when recording new scripts. This is helpful because it reduces the amount of manual modification to scripts during playback by populating the application repository with the variable name instead of a value.
  8. Select Prompt to prompt the users to assign a variable value during playback.
  9. Click OK to save the changes.

Modify the search criteria with URL format rules

By default, QA Wizard Pro uses the URL of a web page as a search criteria. To ensure that QA Wizard Pro can locate windows and controls during playback, you can use URL format rules to search on individual parts of the URL. 

For example, you recorded a script on a development server that logs in to a web page. Now you want to run the same script on a test server. The script fails on the test server because the application repository was populated with information associated with the development server. You can create a URL format rule that searches for only the specific part of the URL that does not change. If you create a URL format rule to search for the login.php file value, QA Wizard Pro will bypass the server information in the URL and the script will run correctly.

  1. Select the application version in the application repository.
  2. Choose File > Properties.
  3. Click the URL Formats tab and click the Add button.
  4. Select or enter a Part of the URL to create the format rule for. You can create format rules for protocols, domains, paths, files, parameters, and anchors.
  5. Select an Action to use to perform the search.
  6. Enter the Expected Value. QA Wizard Pro searches from the expected value in the URL and applies the rule if it is found.
  7. Select a Condition to indicate when to apply the rule.
  8. Click OK to save the changes.
Article ID: 798  |   Last updated: 23 Dec, 2014
repository variable URL format rule web application on multiple servers

Prev   Next
Windows Server 2003 Local Administrators Cannot Install QA...     QA Wizard Pro Select Statement Does Not Work As Expected When...