Configuring a Postman test run

After you added the test resources that you created and exported from Postman to the server project, you can configure a run for Postman collections on HCL OneTest Server.

Before you begin

You must have completed the following tasks:

Procedure

  1. Log in to HCL OneTest Server and open the team space that contains your project.
  2. Open the project that contains the test assets or resources that you added from the Git repository, and then click Execution.
  3. Select the branch of the repository that contains the test assets or resources that you want to run.

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

  4. Identify the test asset or resource that you want to run by performing any of the following steps:
    Note: You can either run the entire Postman collection or any of the folders within the collection.
    1. Identify the test asset or resource by scrolling through the list.
      Note: You can also identify the type of the asset from 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
      JUnit Test
      Postman resources
      Rate Schedule
      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. Select an operator, and add a rule, or a group of rules.
      3. Add or enter the relevant parameters and either select or enter the condition and the criteria for the condition.
        You can select a parameter from the following list:
        • Type
        • Test Asset Name
        • Test Asset Path
        • Last Result
        • Next Run
        • Components
      4. Apply the filter query to filter the assets based on the query.

        The test assets that match the filter criteria are displayed.

      5. Save the filter query by performing the following steps, if you want to reuse the filter query later:
        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:
      Note: To open the filter query, you must have created and saved a filter query.
      1. Click the Open filters icon Image of the icon..
      2. Select the saved filter in the Filters dialog box.
      3. Click Apply to apply the filter.

        The test assets that match the filter criteria are displayed.

  5. Click the Execute icon Image of the icon. in the row of the identified test asset.

    The Execute test asset dialog box is displayed.

  6. Select the version of the test resources that you want to run.
    Restriction: You can only select the latest version of the test asset in the selected branch in the repository.
  7. 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 want to repeat 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.

  8. 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.

  9. Click Advanced, and then enter program arguments that must be passed to the test run at run time in the Program Arguments, if applicable for the test.

    You can enter the command options that you use when you run Postman tests by using Newman, as the program arguments.

    For example, enter --verbose, if you want the details of the test run and each request sent.

    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.

  10. Follow the instructions if you want to change the location for running the test:
    1. Click the LOCATION tab, if it is not already open.
      The Default Cluster is the default location where the test runs, and it is listed under the Host column. The information about the availability of the default location is displayed.
      Important: You must have added remote Docker hosts that are registered with HCL OneTest Server to your project from the Infrastructure page. The remote Docker hosts are then displayed under the Override column.
      Notes:
      • If remote Docker hosts are not added to your project, the option No override options is displayed as the default value and the test runs in the Kubernetes cluster of HCL OneTest Server.
      • If remote Docker hosts are added to your project, the added Docker hosts are displayed along with their availability status and ownership information.
    2. Select the location where you want to run the test asset from the following options:
      • Select the Default Cluster when no remote Docker hosts are available in your project.
      • Select the remote Docker host from the list when a remote Docker host is available in your project.
      • Select No override options, if you selected any remote Docker host and want to revert to the Default Cluster to run the test asset.

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

  11. Click Execute.
    The test run is initiated.

Results

You have configured and either started or scheduled a test run of a Postman test.

What to do next

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