Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..
647 views

Cannot figure out how to record a .bat application with LoadRunner

Hi...

I've been using LoadRunner at my job to record our various applications. This time I cannot figure out what to do. I am trying to record a script where I invoke a java client using a .bat file. What protocol should I use? I assume I should still be using WEB HTTP\HTML, but I am not sure.

When I start recording, a black box appears with java.exe on top, but nothing else. The recording box shows Recording...(1) and I'm stuck. Can someone help me figure out how to get a successful recording?

Record: Windows application

Application: c:\Program Files(x86)\Java\jdk1.6.0_45\bin\java.exe

Program args: c:\...myapp.bat

Working directory: d:\Program Files(x86)\HP|LoadRunner\bin\

 

0 Likes
2 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Cannot figure out how to record a .bat application with LoadRunner

I guess that normally your java application is started by the myapp.bat. But when you select java.exe as application. This application is started with as argument the myapp.bat, but the myapp.bat is not a valid argument for your java.exe program.

You might consider to enable echo 'echo on' just before the java application is started in the batch file, so you can capture the command line and add that you your recording window. Note that some batch scripts setup environment variables that are picked up by java.exe like CLASSPATH. You need to add those also to your command line.

 

I'm not sure if LR can pickup your network settings of your java application. Esp. when your application does special things. LR's Proxy settings are normally  pickup up by java, but you might need to setup a manual proxy and change the network settings of your java application accordingly.

Signature:
Reward community members who take time to respond and help.
0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Cannot figure out how to record a .bat application with LoadRunner

the application should be CMD, the argument is the patch file.

Micro Focus Performance Core.
Functional Architect
your performance, our passion!
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.