Viewing test results data in Grafana

After you install and configure HCL OneTest Server Results Data, you can retrieve and view the test log data, generated in HCL OneTest Server, by using queries. Then you can analyze your test log data in a graph and a table, or in a Grafana dashboard.

Before you begin

To be able to view your test log data in the HCL OneTest Server Results Data dashboard, you must have performed the following tasks in HCL OneTest Server:
  • Run your tests with the appropriate option in the advanced settings to get test logs results in HCL OneTest Server. For more information about the procedure, refer to Test log viewer.
  • Installed the HCL OneTest Server Results Data plugin.
  • Run Grafana with one of these ports: http://localhost:3000 or http://localhost:8080.
  • Created an instance of data source for HCL OneTest Server Results Data. For more information about the procedure, refer to Installing and configuring HCL OneTest Server Results Data.

Procedure

  1. Click Configuration > Data sources in the navigation panel in Grafana.
  2. Click HCL OneTest Server Results Data in the list of data sources.
  3. Click Explore in the navigation bar.
  4. Enter the Project id.
    The Project id is required.
  5. Enter the Result id.
    The Result id is optional.
    Note: If you enter your project id only, you get all the results that are generated in your project.
  6. Click the Events or the Activities tab according to the target you want to be returned in your query.
  7. Enter the Query Filters.
  8. Enter the Timing value and Value.
    The timing values are sorted in ascending order.
    The value must be numeric so that it can be used in a graph.
    Tip: To find all the information needed in the Explore page of HCL OneTest Server Results Data (project and result numbers, query filters for the activities or the events, query filters, and timing values), perform one of the following procedures:
    • Select a result in the Queries page in HCL OneTest Server and copy the result number, query filters for the events or the activities, query filters, and timing values. You can find the project number in the URL of the Queries page.
    • Click Copy curl command in the Queries page in HCL OneTest Server and paste the curl command in a text editor. You can find all the information you need in the command. The curl command contains a query filter for the event
  9. Click Add query if you want to combine queries from different projects, results ids, or with different properties in the query filters.
  10. Click Run query.
  11. Select the appropriate time range to explore the data in the default graph and table in Grafana.

Results

Your queries are set for your project and results, you can explore the log data.

What to do next

You can build a dashboard including graphs, charts, gauges, tables to get customized visual representations of your test result data and select options to display the test result values. See Dashboard overview for more details about dashboards in Grafana.