Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

How to specify number of iterations while running Vugen script through command line

$
0
0

Hi Team,

My requirement is to run vugen script with specified number of iterations through command line.

I have tried below. Please provide your suggestions on this

1. mdrv.exe -usr "path of usr file" -loop "2" -- This command not iterating the scirpt 2 times.

2. mdrv.exe -usr "path of usr file" -threads "2" -- This command is iterating two times. My problem is for 2 iterations

same value is being passed.It is not taking different value.

 I have created parameter with two values  with the specified option "change value for each iteration".

3. I have also tried running below command flollowing below steps:

mdrv.exe -usr "path of usr file" -iter "no_of_iters"

In VuGen, select Run-Time Settings -> Additional attributes.
2. Create an argument name (for example, "iter"), and give a default argument value of 2.
3. Use a for loop in the Action item, and repeat the action "iter" number of times.

Example:


Action()
{
int iterations, i;
iterations = atoi(lr_get_attrib_string("iter"));

for (i = 1; i <= iterations; i++)
{
// action recorded
lr_output_message("This is a test, iteration is %s", lr_get_attrib_string("iter"));
}
return 0;
}

In this also same parameter value is passing for every iteration.

Please guide me what needs to be done to pass different value for each iteration.

 

 


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>