Changes to the community structure and the menu bar
Significant changes have happened to the structure of our community and our drop down menu bar. READ ABOUT IT HERE
LoadRunner User Discussions
cancel

How to invoke multiple batch files from LoadRunner

Highlighted
Soumya
Visitor.

How to invoke multiple batch files from LoadRunner

Hi,

I want to invoke multiple batch files from  the load runner. Can someone suggest on the approach to do that.

I have tried to parameterize batch filenames and pass them to the System function but it is not working.

Looking for the suggestions ASAP.

 

 

 

2 REPLIES
 Honored Contributor... orenga  Honored Contributor...
 Honored Contributor...

Re: How to invoke multiple batch files from LoadRunner

Hi

It's works for me with system command :     system("C:\\1.bat");

I attach also a screenshot .

Maybe you have any permission  issue to open CMD ,

try launch VuGen as Administrator .

 Oren

 

bat.jpg

 

JHF Remmelzwaal  Honored Contributor..
 Honored Contributor..

Re: How to invoke multiple batch files from LoadRunner

In addition to Orens reply,

When you want to invoke the batch files in background (do not wait till the batch file completes) use the command:

    system("%ComSpec% /C start /B action.bat");

Put your action.bat in your script directory, add it to Extra Files (else it is not transferred to your Load Generator).

End your action.bat with the command 'exit' to close the command window. There is no need to parameterize your batch file names. It will make things more complicated. You might just use arguments for your batch file:

system(lr_eval_string("%ComSpec% /C start /B action.bat {ARG1}"));

My action.bat looks like

:: Content action.bat
echo %1
pause
exit