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.

    The team space that contains your project is displayed.

  2. Open the project that contains the test assets, and then click Execution.
  3. Select the branch of the repository that contains the test assets.
    The test assets that are contained in the selected branch of the repository are displayed in the following tabs on the Execution page:
    Tab Description
    SUITES Lists all Suites, compound tests, Rate Schedules, or VU Schedules that are in the selected branch of the repository.
    TESTS Lists all API tests, functional tests, and performance tests that are in the selected branch of the repository.
    ADVANCED Lists all assets that are displayed when custom filters are applied for assets in the selected branch of the repository.
  4. Identify the test asset that you want to run by performing any of the following actions:
    • Scroll through the list.
      Tip: You can hover over the icon in the Type column to know the type of the test asset.
      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 Listed in the SUITES tab Listed in the TESTS tab Listed in the ADVANCED tab
      API test image of checkmark image of checkmark
      Functional test image of checkmark image of checkmark
      Performance test image of checkmark image of checkmark
      AFT Suite image of checkmark image of checkmark
      API Suite image of checkmark image of checkmark
      Compound Test image of checkmark image of checkmark
      Rate Schedule image of checkmark image of checkmark
      VU Schedule image of checkmark image of checkmark
    • Search for the test asset by entering any text contained in the test asset name in the Search field.
    • Click the Filter icon Image of the filter icon in the SUITES or TESTS tab to filter the displayed assets based on the asset type.

      For example, select API Suite in the SUITES tab to display all API Suites or select Functional Test in the TESTS tab to display all functional tests that are in the selected branch of the repository.

    • Click the Filter icon Image of the filter icon in the ADVANCED tab, and then create a filter query by using the New filter option by performing the following steps:
      1. Click New filter.
      2. Enter a name for the filter.
      3. Select an operator, and add a rule or a group of rules.
      4. 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
      5. Save the filter query to save and apply the filter query to filter the assets based on the query.

        The test assets that match the filter criteria are displayed.

    • Retrieve and apply a saved filter query, if you have saved filter queries previously by performing the following steps:
      Note: The filter query applied previously is selected and the assets based on that filter query are displayed. To apply a different filter query, you must have created and saved the filter query.
      1. Click the Filter icon Image of the filter icon in the ADVANCED tab.

        The filter queries that you created and saved are displayed.

      2. Click the filter that you want to apply.

        The test assets that match the filter criteria are displayed.

    You have identified the test asset that you want to run.

  5. Click the Execute icon Image of the icon. in the row of the identified test asset.
    The Execute test asset dialog is displayed.
    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.

  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:
    • No action is required if you want to initiate the test run immediately after you click Execute.
      Important: Click Execute only after you have configured the other settings in this dialog.
      Note: The default time for scheduling a run is Now.
    • Select Later and configure the date and time to schedule a test run.

    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 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 the registered remote Kubernetes clusters to your project that are then displayed under the Override column:
      Notes:
      • If the remote clusters 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 clusters are added to your project, the added clusters 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 clusters are available in your project.
      • Select the remote cluster from the list when a remote cluster is available in your project.
      • Select No override options, if you selected any remote cluster and want to revert to the Default Cluster to run the test asset.
  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: