Highlighted
Absent Member.
Absent Member.
2634 views

How to invoke a batch file using Loadrunner

May i know how to invoke a batch file using loadrunner script, I have run the batch file using command prompt.

Example:
system ("c:\\mybatch.bat");
system("c:\\windows\\system32\\cmd.exe");


It would be very much appreciated if some one let me know how to invoke a batch file using Loadrunner and with which protocol.

Any information in this regard is appreciated.
0 Likes
3 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to invoke a batch file using Loadrunner

Sahil,

Perhaps I don't understand the question. The command you are using, system(), is the proper way to do this. The command is protocol-independent.

Are you having problems using system()?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to invoke a batch file using Loadrunner

Dear Friends,

I am very much apoligized for creating some confusion. Actually I have taken this example command system("c:\\windows\\system32\\cmd.exe"); from some old posting.

My requirement is that I have to test database performance before & after encription. For that they have provied 4 sql statements and a batch/exe file which is used to invoke these 4 sql statements, and to invoke the batch they have provided another command which is given below:

plink -l root -pw 10.2.201.144 export ORACLE_HOME=/u000/app/oracle/prod/10.4.2.1/DB/ ; export PATH=$PATH:/u000/app/oracle/product/10.4.2.1/DB/bin; sqlplus @/tmp/

I have run the above command using command prompt and i am able to run it through command prompt. now i have run the same command using Loadrunner, I dont know how to run this command using Loadrunner.

If someone having any idea on how to load this command to load runner and running it using loadrunner please let me know.

If my understanding is wrong then please let me know the right way to run this using loadrunner.

Kindly let me know if you need more details.

Any help in this regard would be appreciated.
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to invoke a batch file using Loadrunner

Why dont you just create a shortcut on the desktop for it and invoke that? Depending on the protocol you are using - you should be able to run this locally from your lrunner server
0 Likes
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.