Configuring a run of a Compound Test that contains mobile tests

Disclaimer: This release contains access to run mobile tests on HCL OneTest Server as a Tech Preview. The Tech Preview is intended for you to view the capabilities offered by HCL OneTest Server V10.1.1, and to provide your feedback to the product team. You are permitted to use the information only for evaluation purposes and not for use in a production environment. HCL provides the information without obligation of support and "as is" without warranty of any kind.

After you added the test resources that you created in the desktop client to the project, you can configure a Compound Test that contains mobile tests to be run on HCL OneTest Server.

Before you begin

  • You must be a member of the project with the Owner or Tester role to configure and run tests.
  • You must have created the mobile tests in HCL OneTest UI and added the test asset to the project repository on HCL OneTest Server.
  • You must have created a variable file if you want to import the variables file. The file must contain the details of the Appium server that is connected to the remote agent or the device cloud to which the mobile device is connected.

About this task

You can run the mobile tests that are contained in a Compound Test after you create the tests in HCL OneTest UI, and then add them to your project on HCL OneTest Server. You can then run the mobile tests on the mobile devices that are connected to any of the following agents or clouds:
  • Remote agents on which the Appium server is installed.
  • The BitBar Cloud.
  • The Perfecto Mobile cloud.
You must provide the details of the server or the mobile cloud to which the mobile devices are connected as variables in Step 10. You can either enter the variables or use the file in which you entered the variables. You must refer to the following tables for the variables that are required for a successful run:
Table 1. Variables for the Appium server
Name of the Variable Action for the Value field

Mobile_Device_Selection

Specify the name of the mobile device that is connected to the Appium server.

appium.server.host

Specify the host name or IP address of the Appium server.

appium.server.port

Specify the port on the Appium server that is configured to communicate with HCL OneTest Server.

Table 2. Variables for the BitBar cloud
Name of the Variable Value

Mobile_Device_Selection

Specify the name of the mobile device that is connected to the BitBar Cloud.

bitbar.apikey

Specify the user token generated for your BitBar account to authenticate your connection with the BitBar Cloud.

bitbar.host

Specify the host name of the BitBar Cloud instance.

bitbar.project

Specify the name of the project that contains the recorded test.

bitbar.testrun

Specify a name for the test run that must be displayed in the BitBar dashboard for the test run.

Table 3. Variables for the Perfecto mobile cloud
Name of the Variable Value

Mobile_Device_Selection

Specify the name of the mobile device that is connected to the Perfecto Mobile cloud.

perfecto.securitytoken

Specify the user token generated for your Perfecto account to authenticate your connection with the Perfecto Mobile cloud.

perfecto.host

Specify the host name of the Perfecto Mobile cloud instance.

Procedure

  1. Open the project that contains the test assets you have added from the Git repository and click Execution.
  2. Select the branch of the repository that contains the test assets that you want to run.

    All test assets in the selected branch are displayed on the Execution page.

  3. Identify the test asset that you want to run by performing any of the following steps:
    1. Look for the test asset or resource by scrolling through the list.
      Note: You can also identify the type of the asset or resource by looking for the icon that represents the test type, as shown in the following table:
      Icon Represents the test asset or resource
      AFT Suite
      API Suite
      Compound Test
      JMeter Test
      Postman resources
      Rate Schedule
      Stubs
      VU Schedule
    2. Search for the test asset or resource by entering any text contained in the test asset or resource name in the Search text box.
    3. Create a filter query by using the New filter option by performing the following steps:
      1. Click New filter.
      2. Add or enter the relevant parameters for the filter query.
      3. Apply the filter query to filter the assets based on the query.
      4. Save the filter query, if you want to reuse the filter query later, by performing the following steps:
        1. Click Save.
        2. Enter a name for the filter query.
        3. Click Save.
    4. Retrieve a saved filter, if you have saved filter queries earlier by performing the following steps:
      1. Click the Open filters icon Image of the icon..
        Note: To open the filter query, you must have created and saved a filter query.
      2. Select the saved filter in the Filters dialog box.
      3. Click Apply to apply the filter.
  4. Click the Execute icon Image of the icon. in the row of the identified test asset.

    The Execute test asset dialog box is displayed.

  5. Select the version of the test resources that you want to run by completing any of the following actions:
    Note: The test resources in the version can contain the test assets, datasets, AFT XML files, API environment tags, and other resources specific to projects created from any of the desktop clients.
    1. Expand the list in the Version field, find the version of the test resources, and then select the version.
      Use the following details about the version of the test resources that are displayed to identify the version that you want:
      • Commit message.
      • Tags labeled by the user for the version committed.
      • The user who committed the version to the repository.
      • Relative time of the commit. For example, 2 hours ago or 3 days ago.

      The list displays the versions of the test resources committed by all users to the branch in the repository. The versions are arranged with the latest version committed followed by the versions committed previously.

    2. Expand the list in the Version field, and search for the version that you want to select by entering a partial or the complete commit message of that version.

      The version that matches the search criteria is displayed and is selected for the test run.

  6. Select the time for scheduling the test run from the following options:
    • Select Now to initiate the test run immediately after you click Execute.
      Important: Click Execute only after you have configured the other settings in this dialog box.
    • Select Later and configure the date and time for scheduling a test to run at the scheduled date and time.

    The default time for scheduling a run is Now.

    Notes:
    • If you have configured some or all of the settings for the current test run, and you do not want to continue with those settings, you can reset the settings by clicking Reset.

    • If you are repeating a test run and do not want to use the saved settings from a previous run, you can reset all the saved settings to their default values by clicking Reset.

  7. Enter a label for the test run that helps you to identify the test on the Results page.

    After the test run completes, the label that you entered is displayed for the test under the Labels column on the Results page. After you have created a label, any member of the project can use that label.

    The default value for the Label field is null or an empty field.

    Important: The configuration that you set for the test run in the Execute test asset dialog box is preserved when you run the same test again. Those changes are not visible when another user logs in to HCL OneTest Server. For example, if you created new variables on the server, those variables are available only for you when the same test is run again.

    If you want to run the test immediately or at the scheduled time, click Execute, or continue with the next step.

  8. Click Advanced to make the following advanced configurations:
    1. Enter any Java arguments that must be passed to the test run at run time in the Java Arguments field, if applicable for the test.

      For example, you can set a maximum Java heap size.

    2. Enter program arguments that must be passed to the test run at run time in the Program Arguments, if applicable for the test.
      If the test that you want to configure supports Jaeger tracing, then do the required tasks in the following scenarios:
      If... Then...

      You want to obtain the test results as a Jaeger trace.

      Enter -history jaeger in the Program Arguments field.

      You want to remove the Jaeger trace for your test, if Jaeger is already set as a program argument.

      Delete the -history jaeger entry in the Program Arguments field.

      You want the report as a test log and as a Jaeger trace.

      Enter -history jaeger,testlog in the Program Arguments field.

      Note: The default report format is the test log format for the test reports.
    3. Enter the environment variables that must be passed to the test run at run time in the Environment Variables field, if applicable for the test.

      For example, enter the environment variables when the third-party libraries that are used in the test run refer to the environment variables for configuration.

    Note: You must separate the arguments or variables with a white space when you enter them in the same line or start each argument or variable on a new line.

    The default value for each of the fields for the advanced settings is null or an empty field.

    If you want to run the test immediately or at the scheduled time, click Execute, or continue with the next step.

  9. Follow the instructions if you are running a test asset that contains datasets:
    1. Click the DATA SOURCES tab, if it is not already open.
    2. Consider the following information about datasets before you select a dataset:

      The default value for the datasets in the DATA SOURCES tab is null if the test asset did not have an associated dataset. If the asset had an associated dataset, the default value is the associated dataset.

      You can utilize the dataset stored as an Excel or CSV file to override the original dataset associated with the Suite, test, or schedule. For example, you have associated a dataset in .xlsx, .xls, or .csv format with the test or schedule in desktop clients. If you have another set of data stored in an Excel or CSV file, you can select that dataset from the Override list. If you want to run a test or schedule by using the schema created from the Data Fabrication page, see related links.
      Remember: You must have uploaded the dataset as an Excel or CSV file into the Git repository, and ensured that both the original dataset (from the test asset) and new datasets (added to the project) have the same column names.
    3. Select the dataset that you want to use in the test run from any of the following options:
      • Select the dataset that is displayed as the default dataset when the test asset contains a single dataset.
        Note: If there is only one dataset in the test asset, then that dataset is displayed as the default dataset.
      • Select the dataset from the list.
        Note: If there are multiple datasets in the test asset, the datasets are listed in their increasing alphabetical order.
      • Select the dataset from the Override list to override the dataset that was associated with the test in the desktop client.
        Important: If the test contains an encrypted dataset, the Project Owner must classify it in the DATA SECURITY tab on the Project page before you can select it. You must have added datasets to your project from the Dataset page for the datasets to be displayed in the Override list.

    If you want to run the test immediately or at the scheduled time, click Execute, or continue with the next step.

  10. Perform the following steps to provide the variables that specify the server or cloud to which the mobile device is attached. You can either enter the variables that must be passed to the test at the test run time or import the file that contains the variables.
    1. Click the VARIABLES tab, if it is not already open.
    2. Choose one of the following methods to add the variables:
      • To add new variables manually, click the Add Variable icon Image of the Add icon, enter the name, and value of the variable.
      • To add new variables from your local computer or from the Git repository that is associated with your server project, click the Upload icon Image of the icon and select the Upload from local system or Browse from server to select the variable file.
        Note: You must have created a file with the variables before you can select the file.
  11. Click Execute.
    The test run is started.

Results

You have configured and either started or scheduled a test run of a Compound Test that contains mobile tests.

What to do next

You can choose to perform any of the following tasks after you have initiated or scheduled a run: