Usage
Uploading Reports to Codestation
After the Run Test Scenario step successfully executes you can utilize the Versions plug-in to upload the results to code station. This plug-in is installed by default in the DevOps Deploy server, so there is no need to install it separately.
When the HP LoadRunner plug-in runs analysis on the test results it creates a folder inside of the steps working directory. This folder holds all the reports generated during analysis. It also holds the files used to run the analysis, including the LRR (LoadRunner Results) file. The name for this directory will be determined by the value specified in the LoadRunner Results Name field of the plug-in step.
Here is the default configuration for the Run Test Scenario step:

Using this default configuration, you will find the analysis results in the UCD_LR_RESULTS directory in your agents working directory. The default analysis template UCD_ANALYSIS_TEMPLATE generates an HTML report called Report1.

Note that if you were to provide a different working directory, the folder would be created there instead of in the <agent_install_dir>/var/work/ directory.
To upload the report generated in this folder to codestation, you can utilize the Create Version step of the Versions plug-in. Further documentation on this step can be found in the Deploy Versions steps document.

In this example I am creating a new version to hold the reports. For this reason, the component process that I have designed is an operational process that does not require an already created version to run. It is possible to use a similar approach with a deployment type component process, and modify the component version that is being used for the deployment. This approach would require usage of the udclient command-line utility, or the UCD REST API directly. For more information, see the addVersionFiles documentation page.
In the Create Version steps configuration you will need to specify a name for the component, the version name, and the files to include. In this example I am using the current component as the component to create the new version on, by referencing the component.name property.

As stated, this process will be executed without a component version. Instead created is a version.name property as an application process property. When the application process is run, it will prompt for a version name. As you can see above, that version.name property is being used to create the new component version.
The Includes field will determine which files and directories will be published to the new component version. I have chosen to include everything in the results directory.

After this process runs, a new version is created on the component with the name specified for the version.name application process property at runtime. This new version contains everything generated in the results directory. This includes all reports and results files. You can further specify exactly which reports and directories you want to create on the version in the Includes field of the Create Version step.

Customizing Analysis Templates
The HP LoadRunner plug-in allows you to specify custom defined analysis templates. You may need to use a custom analysis template if:
- You are unable to give the agent user permissions to the LRAnalysis80.ini file. Please see the Default UCD Analysis doc for more information.
- You require specialized graphs or different report file types to be generated.
Before you can create your own custom HP LoadRunner Analysis template, you'll need to generate a MicroFocus LoadRunner Result File (LRR).
You can generate a MicroFocus LoadRunner Result File in one of two ways:

- Run the HP LoadRunner plug-in
- This will generate the LRR file in your plug-in steps working directory under a subdirectory of the name you've specified for the plug-in steps LoadRunner Results Name field.
- For instance, if you use the default working directory of a component named LR Test and specify the plug-in steps LoadRunner Results Name as the default UCD_LR_RESULTS, you'll find the UCD_LR_RESULTS.lrr file located in the following directory:
Creating the analysis template in HP LoadRunner
After you open the LRR file in your HP LoadRunner Controller, you can open the templates tool under the tools tab.

From here you'll select to add a new template and give it a name. It should be noted that it is a bad idea to select UCD_ANALYSIS_TEMPLATE as your new template name. If youve ever run the plug-in with the default UCD_ANALYSIS_TEMPLATE template that is provided with the plug-in, creating a new template of the same name will overwrite the imported one in HP LoadRunner. Also, if you intend to run with the plug-ins UCD_ANALYSIS_TEMPLATE in the future it will overwrite your custom-made template of the same name.

After you create the new template, you can configure all the report generation options that you desire. Two of the options that you need to configure for the plug-in to work with your custom template are the Automatically save the session as and Automatically close Analysis after saving session. If these two boxes are not checked your plug-in step will continue executing until you go into the machine and manually close the Analysis tool.

To use the template in the plug-ins Run Test Scenario step, you can specify the name that you have created the template with for the Template Name field. This will run the specified test scenario and then run the analysis using your custom analysis template.

Default UCD Analysis Template
This plug-in comes with a predefined HP LoadRunner analysis template called UCD_ANALYSIS_TEMPLATE. Specifying this template for the plug-in steps Template Name field will automatically install and use the template for analysis. UCD_ANALYSIS_TEMPLATE is also set as the default value for the Template Name field.

To use the default template, the agent user must have the privilege to read and write to the LRAnalysis80.ini file. This configuration file can be found at the following system path \config\LRAnalysis80.ini.

After executing this step you will notice a new template in your LoadRunner Analysis tool. Open the LoadRunner Analysis tool and click on templates under the tools tab.

You can view all the preconfigured settings of the UCD_ANALYSIS_TEMPLATE. It should be noted that any manual changes to this template will be overwritten when the plug-in step runs again. For this reason, if you require a more custom template, you may create your own and specify the name in the plug-in step. Please see the plug-in document entitled Customizing Analysis Templates for more information on using custom templates.

After the step runs it will generate an HTML report file called An_Report1.html in your working directory. This directory will be the components working directory in the UCD agent by default.