Is there a way to remotely execute LoadRunner via WinRM?
Question ID: 106180
0
0

I am trying to remotely execute LoadRunner from another machine using WinRM to execute the Wlrun.exe program. On the local system I can run the load test as follows:

wlrun.exe -TestPath -ResultPath u:administrator wlrun.exe -TestPath ….etc….

Marked as spam
Posted by (Questions: 1, Answers: 5)
Asked on July 20, 2015 8:04 pm
283 views
Answers (9)
0
Private answer

Not that familiar with winrs, but here are my thoughts.
Is your syntax correct? Is it ''-r'' or ''/r''? Or will both work?
Also, can you enable winrs on the LR box and execute winrs without the -r using the default localhost successfully? Also, i think you should refer to the remote machine running LR with fully qualified machine name instead of http:/... just ''winrs /r: myserver command''. Also I would say you probably need to qualify the administrator to the domain on the remote machine.

Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on July 22, 2015 3:30 pm
0
Private answer

I have done the winrs with several variations of -r and host name. BTW, I can execute notepad.exe this way remotely. The notepad.exe process shows up in the task list so I know it got started. Furthermore, I can get Wlrun.exe to work without options remotely. With the options I can get Wlrun.exe to execute locally and execute the tests. I have even tried to wrap Wlrun.exe with the options in powershell and cmd scripts to see if that would work.

Marked as spam
Posted by (Questions: 1, Answers: 5)
Answered on July 22, 2015 3:57 pm
0
Private answer

You are using:

winrs -r:http:/ u:administrator wlrun.exe -TestPath ....etc....

Try using:

winrs -r:http:// u:administrator wlrun.exe -TestPath ....etc....

Please note the ''//''

Marked as spam
Posted by (Questions: 4, Answers: 41)
Answered on July 22, 2015 8:28 pm
0
Private answer

I have now wrapped the start of wlrun.exe into a powershell script. The current command line for winrs is as follows:

PS C:UsersAdministratorLoadRunnerScripts> winrs -r:http://192.168.2.201 -u:Administrator C:UsersAdministratorLoadRunnerScriptsmywlrun.ps1
Enter the password for 'Administrator' to connect to 'http://192.168.2.201':

The powershell script *mywlrun.ps1* is as follows:

date
$startExe=''Wlrun.exe''
$startArgs=''-TestPath C:UsersAdministratorLoadRunnerScriptsScenario1.lrs -ResultPath C:UsersAdministratorLoadRunnerScriptsresults -Run''
Start-Process -FilePath $startExe -ArgumentList $startArgs -WindowStyle Hidden
date

When I run this script the process just hangs. I do not see the *Wlrun.exe* process in the task list. If I run the *mywlrun.ps1* script when I'm logged on to the console *Wlrun.exe* starts and runs the tests. I'm not having a problem getting *winrs* to work, I'm having problems getting *Wlrun.exe* to run headless.

I need to be able to remotely start *Wlrun.exe* to run the performance tests and be able to collect the results.

Marked as spam
Posted by (Questions: 1, Answers: 5)
Answered on July 23, 2015 11:32 am
0
Private answer

You did not indicate that you had run winrm quickconfig prior to runnning winrs. Just checking to see if you had enabled the service prior to running your power shell script. Everything else appears correct.

Marked as spam
Posted by (Questions: 4, Answers: 41)
Answered on July 23, 2015 1:08 pm
0
Private answer

I also noticed that I get the following error message in the Application Event Log:

Log Name: Application
Source: HP.LT.Logger
Date: 7/23/2015 9:20:41 AM
Event ID: 0
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: XXXXXXXXXXXXXXXXXXX
Description:
HP.LT.Logger configuration failed creating context provider of the type: HP.PC.Security.SSO.AppContextLoggingProvider, HP.PC.Security.SSO
Event Xml:



0
3
0
0x80000000000000

718
Application
XXXXXXXXXXXXXXXXXXXXXXXX



HP.LT.Logger configuration failed creating context provider of the type: HP.PC.Security.SSO.AppContextLoggingProvider, HP.PC.Security.SSO

Marked as spam
Posted by (Questions: 1, Answers: 5)
Answered on July 23, 2015 1:23 pm
0
Private answer

Instead of trying to execute Wlrun.exe via powershell is there a way to execute tests on the load runner box via a REST API through the Web Controler?

Marked as spam
Posted by (Questions: 1, Answers: 5)
Answered on July 23, 2015 3:52 pm
0
Private answer

Yeah, that would work, although it will take coding an App to do it.

The HP Performance Center REST API enables you to write applications to create and run load tests without using the HP ALM Performance Center REST API Reference user interface. This API provides only a subset of the functionality provided by the user interface.

Before accessing any other resource, you must authenticate the user. See Authenticate.

Once the user is authenticated, you can:

**Run a test. See Start a Test Run**
Stop a run. See stop, stopNow, and abort.
Get run data. See Get Run Status, Results (metadata), Results/{ID} (metadata), and Results/{ID}/data (report).
Define tests. See tests, testInstances, Groups/{name}, Groups/{name}/RTS, and tests/{ID}/validity
Before your application closes, logout from the server.

The Performance Center REST API can be used with the HP ALM Performance Center REST API Reference REST API. The ALM REST API Reference is available from the help library of ALM.

Marked as spam
Posted by (Questions: 6, Answers: 167)
Answered on July 23, 2015 10:19 pm
0
But the REST API is in the ALM platform of PC, I see that you are attempting this with just LR, so that wouldn't be relevant.
( at July 23, 2015 10:33 pm)
0
Private answer

Where can get the REST API documentation? Is that in the ALM11.00_REST_API.pdf?

Marked as spam
Posted by (Questions: 1, Answers: 5)
Answered on July 23, 2015 10:41 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top