Configuring test scripts in Micro Focus ALM

You must configure the test script that you created in Micro Focus Application Lifecycle Management (ALM) to run the Web UI tests.

Before you begin

You must have performed the following tasks:

About this task

You can navigate to the alm directory to copy the content of the template file. The alm directory resides within the installation directory of Rational® Functional Tester. The name of the template file is WebUI_ALM_Windows.txt and you can access the file from the following location:

Installation_dir\IBM\SDP\alm

For example, C:\Program Files\IBM\SDP\alm

You must provide the values for the following required parameters:
  • Workspace
  • Project
  • TestSuiteName
If you include these required parameters in a configuration file and use the ConfigFile parameter to specify the complete file path, then these parameters are not required.
Important:

You must enter the parameter values within the double quotation marks. If the values of the parameter contain the double quotation marks, then the values must be enclosed in another double quotation marks. For example, if you want to add a label for a test result as "perf mon", then you must enter the parameter value in the script as follows:

Labels = ""perf mon""

Procedure

  1. Log in to the Micro Focus ALM portal, if you are not already logged in.
    The Micro Focus ALM dashboard is displayed.
  2. Expand Testing from the left pane, and then click Test Plan.
  3. Select a test script from the folder that you want to configure.
  4. Click the Test Script tab.
  5. Paste the content of the WebUI_ALM_Windows.txt file that you copied in the space provided in the Test Script tab.
  6. Enter the parameter values that are required for your test run in the script by referring to the following table:
    Parameter Description
    Required
    Workspace Use this parameter to enter the complete path of the Eclipse workspace.
    Project Use this parameter to enter the name of the project that has test assets.
    TestSuiteName Use this parameter to enter the name of the test assets.
    For example,
    Workspace = "C:/Users/IBM/rationalsdp/workspace1"
    Project = "proj1"
    TestSuiteName = "Tests/testHttp.testsuite"
    Optional
    ConfigFile Use this parameter to provide the complete path to a configuration file that contains the parameters for a test run.
    IMSharedLocation Use this parameter to enter the complete path to the IMSharedLocation location.
    OverwriteResultsFile Set this parameter value to true or false to determine whether a result file with the same name must be overwritten or not.

    The default value is true.

    ProtocolInput
    Use this option with additional arguments as follows:
    • To run a Web UI test in parallel on different browsers:

      ProtocolInput = "all.available.targets.in.parallel=all"

      ProtocolInput = "all.available.targets.in.parallel=chrome,ff,ie"

      Note: If you use the ProtocolInput option, you must not use the following equivalent VMArgs arguments:
      VMArgs "-Dall.available.targets.in.parallel=all"
      VMArgs "-Dall.available.targets.in.parallel=browser1,browswer2,browser3"
    • To specify the Web UI preferences such as highlighting the page element and capturing screens:

      For example, ProtocolInput = "webui.highlight=<value>;webui.report.screenshots=<value>" where webui.highlight specifies whether the page element must be highlighted and webui.report specifies whether the screens must be captured while playing back the test in the browser.

    Quiet

    Use this parameter to turn off any message output from the launcher and return to the command shell when the run or the attempt is complete.

    ResultsFile Use this parameter to provide a different name to the result file.

    The default name of the result file is the name of the test or schedule with a timestamp appended.

    VarFile Use this parameter to provide a complete path to the XML file that contains the variable name and value pairs.
    VMArgs Use this parameter to pass Java virtual machine arguments.
  7. Click the Save icon.

Results

You have configured the test script by adding the required parameter values for the test run.

What to do next

You can run test assets from Micro Focus ALM. See Running tests from Micro Focus ALM.