Unable to generate an automatic Rich Report in Loadrunner Analysis through a Windows batch.

Hi everyone!

Here's the deal:

- We have a Report Template named "CustomReportTemplate" (created in Reports -> Reports Templates...) and an Analysis Template called MyTemplate (created in Tools -> Templates).

- CustomReportTemplate is called by MyTemplate in order to generate an automatic rich report (we just want an Excel document). When applying MyTemplate to the .lrr file that has been open (click on Apply to Session), an .lra Analysis Session is automatically generated and saved, and the Rich Report is also generated with it.

- Using these templates, we want to automate the opening of a .lrr file, the application of MyTemplate to it, and thus the generation of a .lra session AND of a Rich Report - the latter being ultimately what we want to retrieve. We ticked the Automatically Save Session and Automatically Close Analysis after Saving Session boxes for a complete automation.

- We have found a Windows Command line that could potentially work:

C:\HP\Analysis\bin\AnalysisUI.exe -resultpath <complete .lrr filepath> -TemplateName MyTemplate

Using this command, the .lrr is open, the template is applied, the session (.lra) is created and saved, but the Rich Report is not generated.

- But if I do everything above manually (open the .lrr file then apply MyTemplate), it creates a Session but still no Rich Report. On the other hand, when I apply MyTemplate a second time to the session, it works! The Rich Report file is generated in the Session folder.

- So I tried a second batch opening the .lra file and applying MyTemplate:

C:\HP\Analysis\bin\AnalysisUI.exe -resultpath <complete .lra filepath> -TemplateName MyTemplate

But it doesn't work... the session is opened but no template is applied.

Any ideas or suggestions?

Of course, if some details are missing, please let me know! :)

I'm on Analysis 12.53, no patch installed (maybe an existing patch that I don't know of could help....)

Many thanks in advance!

  • Hi

    It seems there is an issue and I was able to reproduce. We will investigate it.

    In the meantime, I would suggset trying to use the Analysis API:

    using the Analysis.ApiLib.dll, create a new object of the type TemplateManager

    and then use the method defined in this class, ApplyTemplateFile

    An example of the call and the meaning of the parameters

    public void ApplyTemplateFile(     string aSessionName,    string aTemplateFileName )

    'Declaration   Public Sub ApplyTemplateFile( _    ByVal aSessionName As String, _    ByVal aTemplateFileName As String _ ) 




    The name of the LRA file with Analysis session to which template is applied  


    The name of the template file (*.tem) to apply to the session.


  • Hi,

    Thanks for your feedback. We will check out the API workaround.

    In the meantime, please let me know if you find anything on your side, once you've investigated this issue.

    Best regards.