Working with file results publishers

To automatically publish the results of a test suite after it is run in HCL OneTest™ API, you can use the Results Publishers feature.

Before you begin

Ensure that the project settings have valid Connection Details for a Results database and the project has a test suite.

Procedure

  1. Open the project and click Tools > Custom Reports.

    The Custom Reports Manager window is displayed.

    The custom reports manager window.

  2. Click Add. The Add Custom Reports window is displayed.
    Image of the Add Custom Reports window.
  3. Enter a name for the report and click Add.

    The Add Report Segment window is displayed.

    The Add Report Segment window.
  4. Add details of your custom report in the Additional text field.

    For example, you can add the name of the custom report, type of the report, the format of the report, and the method of attachment.

    The Add Report Segment screen showing the additional text.
  5. Click OK to save the custom report segment.

    The Add Custom Reports window displays the report segment you added.

    The Add Custom Reports window showing report segment.

  6. From the menu in HCL OneTest API, go to Project > Project Settings, click the Results Publishers tab and then, click Add.

    The Add Result Publisher window is displayed.

    The Add Result Publisher window.
  7. Complete the following steps in the Add Result Publisher window.
    1. Select the Results Publisher Type to File.
    2. Provide a name in the Result Publisher Name field and path location to save the published result file.
    3. Click OK. In the Project Settings window, click OK.
  8. Edit a Test Suite that passes all its tests. Navigate to the Publish Results tab.
    The Publish Results tab for a test suite.
  9. Click Add. The Add Results Publisher Settings window is displayed.
    Image of the Add Publish Results Settings window.
  10. Select the option you want for the Results Publisher, Custom Report, and When to publish fields, and then click OK.
  11. Save the test suite.
  12. Run the test suite. The console log of the test indicates the results publishers used.
    Image of the console log.

Results

The Custom Report is published as a file in the specified format and is available in the path specified in Step 7. The file name contains the Custom Report name specified and is appended with the date and time stamp when it was generated. For example, the published Custom Report with the name MyReport_Details_Attached_2018-11-27_12-25-43-810 located in the path c:\Reports\Successful.

What to do next

You can navigate to the folder containing the Custom Report published and open the file to view its contents. Ensure that you have installed the associated readers to open such file formats on your system.

Feedback