Export run results to InfluxDB or JSON

Using the Raw Results Exporter tool, you can export scenario results to an InfluxDB database or to files in JSON format.

Exporting raw data to other formats is useful when, for example, the run results are too large for Analysis to handle, or when you want to use test data in applications developed for your specific needs.

About exporting data to InfluxDB

Note: Micro Focus encourages you to ensure secure configuration, purging, monitoring, and hardening of the InfluxDB—this is not provided by Micro Focus.

If you do not implement secure configuration, purging, monitoring, and proper hardening, you may expose the system to increased security risks. You understand and agree to assume all associated risks and hold Micro Focus blameless for the same. It remains at all times solely the responsibility of the customer to assess their own regulatory and business requirements. Micro Focus does not represent or warrant that its products comply with any specific legal or regulatory standards applicable to the customer while conducting the customer's business.

Exporting raw results to an InfluxDB database enables you to use the data in applications other than Analysis.

The data exported to InfluxDB is output to the InfluxDB server, which must be up and running.

To reduce the time spent collating and exporting data at the end of a scenario run, you can export data to an InfluxDB database during runtime. Use the option Automatically export results to InfluxDB in the Collate Settings dialog box (supported from version 2020 SP3). Refer to Collate scenario run results.

Controller supports two methods for exporting data to InfluxDB, as described in the following sections.

The data exported to InfluxDB is stored in the database as follows.

LoadRunner Professional 2020 SP3:

Table Description
Error The error events that occurred during the scenario run.
Transaction Complete transaction information.
TransactionBreakdown Transaction breakdown information.
VuserCount Vuser count during the scenario run.
DataPoint Datapoint information recorded during the script run.
MonitorDataPoint Datapoint information recorded by monitors during the run.

 

LoadRunner Professional 2020 SP2:

Table Description
Error The error events that occurred during the scenario run.
Transaction Complete transaction information.
TransactionBd Transaction breakdown information.
RunInfo Information about the scenario run.
VuserInfo Information about the Vusers that ran during the scenario run.
Datapoint The web-related datapoints recorded during the run.
MonitorDatapoint Datapoints recorded by offline monitors during the scenario run.
MonitorMetadata Additional metadata for the offline monitor datapoints recorded during the scenario run.

Tip: In your InfluxDB configuration file, we recommend you set max-values-per-tag= 0 to allow for unlimited values per tag. For details, refer to the InfluxDB product documentation.

Note: After data has been exported to InfluxDB, you can use a customized Grafana dashboard for visualizing the LoadRunner data. You can download the dashboard from Grafana.

Back to top

Export data to InfluxDB from the UI

Using the UI is the simplest method for exporting results data to InfluxDB.

To export run results to InfluxDB:

  1. In the Controller menu, select Results > InfluxDB Settings.

    The InfluxDB Settings dialog box opens.

  2. In the dialog box opens, configure the export:

    • Server URL. This is an external, customer server, and not part of the LoadRunner Professional system. Define the URL of the database server, and include the port number.

      For example: http://my-influx-url:8086

      HTTPS URLs are supported, as long as the appropriate certificates have been installed.

    • Database name. Enter a name for the exported database.
    • Username and password. These settings must be completed if the InfluxDB server requires authentication; otherwise, they can remain blank.
  1. Save these settings. The settings remain in effect until changed.
  1. In the Controller menu, select Results > Export to InfluxDB.

    A notification pane opens. During the export, status and messages are displayed in this pane.

  2. When the export is complete, click Close.

Back to top

Export data to InfluxDB from the command line

If you prefer, you can export results data to InfluxDB from the command line.

To export raw data to an InfluxDB database, use the following command line instruction:

 LrRawResultsExporter -source_dir <folder_path>
     [-to_influx -influx_url <server url> -database <database name>] [-user <username> -password <password>]
     [-proxy_server <server url> -proxy_user <username> -proxy_password <password>]
     [-target_dir <folder_path> -to_json] 

where:

Option Description

-source_dir

The location of the source file (.lrr) containing the scenario run results.
-to_influx Instructs the Exporter to export the raw data to InfluxDB.
-database The InfluxDB database name.
-influx_url

The InfluxDB server address, including the port number.

HTTPS URLs are supported, as long as the appropriate certificates have been installed.

-password The InfluxDB password.
-username The InfluxDB user name.
-proxy_url The proxy server address, including the port number.
-proxy_user The proxy username. Include if proxy requires authentication.
-proxy_password The proxy password. Include if proxy requires authentication.
-to_json Exports the data to the target directory in JSON format (see Export data to JSON). Data can be exported simultaneously to both JSON and InfluxDB.

Back to top

Export data to JSON

Exporting test results to files in JSON format enables you to use the data in applications other than Analysis.

The data exported to JSON is output to a folder, and contained in a set of files:

RunInfo.txt

Contains information about the scenario run that generated the processed raw results.

offline.txt Contains the offline monitor data recorded by the monitors set up in the scenario run.
offlineMetadata.txt Contains additional metadata for the offline monitor datapoints stored in offline.txt.
*.eve As in the original .eve files, these files contain all the information recorded from the run: transaction data, transaction breakdown data, errors (only script errors) and web related datapoints.

To export raw data in JSON format, use the following command line instruction:

LrRawResultsExporter -source_dir <folder_path> -target_dir <folder_path> -to_json [-f]

where:

Option Description

‑source_dir

The location of the source file (.lrr) containing the scenario run results.
-target_dir -to_json Instructs the Exporter to export the raw data to JSON files in the specified target folder.

-f

Forces the execution of the application, automatically overwriting the target directory if it already exists.

Back to top

See also: