Test log queries

When a test run is complete in HCL OneTest Server, if a test log is generated, you can run queries to extract and view test log data. The query is used to search for the events or activities in the test logs with a project or a result scope.

The query page contains a configuration section in which you enter and select search criteria.

The difference between an activity and an event are the following ones:
  • An activity is characterized by a duration whereas an event is characterized by a particular time.
  • An activity contains events.

When you define the search criteria and run a query, the returned test log data is displayed in a table. You can manage the data in the table by adding, moving, or deleting the columns.

Prerequisites
To get result log data queries, you must configure your tests with one of the following parameters to enable the test log and data query process:
  • For JMeter, JUnit, Postman and HCL AppScan CodeSweep Suites, set the history cisterna parameter in the Additional Configuration Parameters field in the Advanced settings .
  • For API tests and Suites, AFT Suites and Functional test, and Compound tests, set the -history cisterna parameter in the Program Arguments field in the Advanced settings. .
    Note: When you set this parameter, you can run your queries to collect test log data into HCL OneTest Server.

Query scope

A Test result query link is available in the test reports in the Results page when a test log is generated. If you click the link, it opens the query page in HCL OneTest Server where you can view all the events or all the activities for the current test result only. In the Scope field of the query page, you find the result id. You can run new queries with different properties as search criteria for this result.

You can also run new queries with different properties as search criteria for all the results in a project if you open the query page from Analyze > Queries in the navigation pane. In this case, the Scope field is at the project level.
In the Queries page, you can perform the following actions:
  • Filter the events or activities.
  • Sort your query results in an ascending or a descending order.
  • Add, move, or delete fields in the columns of the table that displays the data of the query.
  • Save a query, rename, reset or delete a query.
  • Export a query.

    You can export the queries to Shell, Curl, or PowerShell scripts. You can select the script, the output format, and the number of results that are returned by the query.