Highlighted
Super Contributor.
Super Contributor.
1550 views

Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hi,

I'm wondering if it's possible when launching the analysis via the command line, can I specify a template that isn't imported in the LoadRunner analysis?

I have copied the template files from loadrunner, and put them in a directory:  C:\LoadrunnerCI\Templates\Percentile90\

When I try any of the variations below, it just brings up the analsys but doesn't create the reports and shutdown the analysis (as instructed in the template configuration).

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME " & "C:\LoadrunnerCI\Templates\Percentile90\Percentile90.tem"

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME " & "C:\LoadrunnerCI\Templates\Percentile90\"

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME " & "C:\LoadrunnerCI\Templates\Percentile90"

 

But, if I manually import that template into the LoadRUnner analysis and run it, it works.

I take it I must have the template imported before I can use it?

Cheers,

J

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hello @john_s123,

Currently Analysis doesn't accept non-imported templates so in order to apply custom template you need to import it first.

Best Regards,
Vitalii

View solution in original post

0 Likes
9 Replies
Highlighted
Super Contributor.
Super Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Ergh, just seen an error in my syntax  😞   Let me fix and try again. Sorry

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

OK, looks like I did try it correctly but copied and pasted incorrectly.  So, I still can't get it to work trying:

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME Percentile90 -----WORKS when loaded in the analysis

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME C:\LoadrunnerCI\Templates\Percentile90\Percentile90.tem -- Doesn't work

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME C:\LoadrunnerCI\Templates\Percentile90\  -- doesn't work

"C:\Program Files (x86)\HP\LoadRunner\bin\AnalysisUI.exe" -RESULTPATH C:\Bamboo\Results\NamePassedIn\NamePassedIn.lrr -TEMPLATENAME C:\LoadrunnerCI\Templates\Percentile90 -- doesn't work

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hi John,

You should locate the template under the built-in AnalysisTemplates folder located under LR_HOME directory and use -TEMPLATENAME <NAME_ONLY> command line argument.

Regards,

Shlomi

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hi,


Thanks for your reply.  However, it also doesn't work.  I have the latest LR with patches but still, it only works if I have the templated loaded and available in the LR Analysis.  Please see attached.

  1. Copied template folders into directory.  These work and will work if I import them into the analysis.
  2. Files not loaded in analysis which is what I want
  3. Command syntax to launch analysis using template.  This only works if I have the template imported into the LoadRunner analysis
  4. The outcome from the command line execution.  Template doesn't get executed (it should generate the HTML report and shut down.

 

Cheers,

J

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

We'll have a look at that and get back to you

Regards,

Shlomi

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hello @john_s123,

Currently Analysis doesn't accept non-imported templates so in order to apply custom template you need to import it first.

Best Regards,
Vitalii

View solution in original post

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hi mate,

Ah, OK, no worries.  Many thanks for confirming!


Cheers,

John

0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

@Vitalii, thanks for confirming

@John, can you please share the use case? I would like to understand whether we need to make it work without forcing the import.

Regards,

Shlomi

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Re: Can I specify an Analysis template (not imported) when calling from command line

Jump to solution

Hi mate,

 

I'm launching the analysis via the command line because I want to automatically export the values from the generated summary.html file to a database after each test run.  But, I wanted to make this configurable so the user (me!) can change what percentiles get reported.  Some projects want the 90th where others want the 95th.

It's not really a big deal to have them already imported into the analysis as a pre-requisite.  It just would have been much more slick if I could generate whatever percentile on the fly rather than assuming that the required templates have already been imported into the LR Analysis.

Cheers,

J

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.