Modifying the Base State (Open Agent)

This functionality is supported only if you are using the Open Agent.

To define the state in which your application under test (AUT) should be before the execution of a test, you can change the executable location, working directory, locator, or URL of the base state. For example, if you want to launch tests from a production web site that were previously tested on a testing web site, change the base state URL and the tests are executed in the new environment.

  1. Open the project for which you want to change the base state.
  2. If you are testing a web application, change the browser in which the tests will be executed in the Edit Application Configurations dialog box.
    1. Click Options > Application Configurations. The Edit Application Configurations dialog box appears.
    2. Click Edit to the right of the application configuration that you want to change. The Edit Browser Application Configuration dialog box appears.
    3. Select the browser that you want to use and click OK.
    4. If you are testing a web application or a mobile native application on a remote location, for example on a mobile device that is connected to a Mac, and you want to edit the remote location, click Change to open the Select Application dialog box and then click Edit Remote Locations.
    5. In the Edit Application Configuration dialog box, click OK.
  3. If you are testing a web application, change the URL of the web application in the .inc file.
    1. In the File tree, expand the Include/Frame node.
    2. Double click on the .inc file to open the file.
    3. Locate the URL in the file. The URL section looks similar to the following:
      // The start URL
      const sUrl = "http://demo.borland.com/gmopost/";
    4. Change the URL.
    5. Save the .inc file.
  4. Optional: If you want to test a web application on a desktop browser with a predefined browser size, select the browser size from the Browser size list.
    For example, to test a web application on Apple Safari and in a browser window which is as big as the screen of the Apple iPhone 7, select Apple iPhone 7 from the list.
  5. Optional: Select an Orientation for the browser window.
  6. If you are testing a desktop application, change the application configuration in the Edit Application Configurations dialog box.
    1. Click Options > Application Configurations. The Edit Application Configurations dialog box appears.
    2. Click Edit to the right of the application configuration that you want to change. The Edit Windows Application Configuration dialog box appears.
    3. Type the executable name and file path of the desktop application that you want to test into the Executable Pattern text box. For example, you might type *\calc.exe to specify the Calculator.
    4. If you want to use a command line pattern in combination with the executable file, type the command line pattern into the Command Line Pattern text box.
  7. If you are testing a mobile native application:
    1. Click Options > Application Configurations. The Edit Application Configurations dialog box appears.
    2. Click Edit to the right of the application configuration that you want to change. The Edit Mobile Application Configuration dialog box appears.
    3. In the Connection String text box, specify the platform the location, the name of the mobile device, and the name of the mobile application that you want to test. For example, if the device ID is 11111111, the operating system of the device is Android 5.1.1, the device is connected to the remote machine with the IP address 10.0.0.1, and you want to test the application abc.apk, type:
      platformName=Android;platformVersion=5.1.1;deviceName=MotoG3;udid=11111111;host=http://10.0.0.1;app=C:\Temp\abc.apk;
Tip: If the application under test usually takes a long time to start, increase the application ready timeout in the replay options.