Highlighted
Absent Member.
Absent Member.
487 views

How to invoke batch file using Loadrunner

Hi James,

Thanks a lot for you response.

Now I understood how to invoke an bat/exe file using loadrunner by using system command as given below.

Example: system("c:\\Plink.exe");

I have to execute another command using Loadrunner 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/

To run the above command I have created a batch file by keeping the above command in it and saved it sql.bat.

Now I am invoking the above batch file using system command as shown below:
system("c:\\sql.exe");

When I run the above two system command using loadrunner the Plink.exe & sql.bat files are flashing for a second and closing.

I want to understand how can I know that the two files run successful. It will be very much helpful for me if anyone can help me how to know that the two files run successful and also explain me if they are running successful then how can I make scenarios for this script to run on controller.

Any help in this regard will be appreciated.

0 Likes
1 Reply
Highlighted
Established Member..
Established Member..

Hi Sahil,

Can you please explain how you are invoking the batch file from LR?

Thank you,
Champ
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.