I have to automate running UI tests remotely on a VM in Azure pipeline. I can't use build agent for it. I am using vsconsole.exe to execute the test cases. Now when i run it, through sysinternals psexec, it fails because it need "Active Desktop".(Unable to load DLL 'rasapi32.dll': A dynamic link library (DLL) initialization routine failed.) Is something that i can do for automating that?
Asked
Active
Viewed 592 times
0
-
Are you using a script in the pipeline to run the application on the VM through psexec ? If yes, you could try to directly run the same script on the VM. This [ticket](https://superuser.com/questions/302770/psexec-issue-when-running-an-application-on-a-windows-server-2008-r2-machine-fro) may be useful. You could share the pipeline definition and the debug log (set the variable: system.debug = true and run it) . – Kevin Lu-MSFT May 15 '20 at 07:38
-
yes, i use a script in the pipeline to run the application on the VM through psexec. If i run this script directly on the VM, it's works fine. – Ivan Radyuk May 19 '20 at 13:08
-
if i use windows scheduler to run this script then run schedule task with psexec, it's solve this error, but i get an error due UI tests cannot run in non interactive mode. – Ivan Radyuk May 19 '20 at 13:13
1 Answers
0
An error due UI tests cannot run in non interactive mode.
You need to determine the Agent type (Microsoft-hosted
or Self-hosted
) you are using.
For Microsoft hosted agents:
You could try to use the “vs2017-win2016” Microsoft-hosted agent.
According to this doc :
Microsoft-hosted agents are pre-configured for UI testing and UI tests for both web apps and desktop apps.
If the Microsoft-hosted agents couldn’t meet your requirements, I recommend that you could create a self-hosted agent.
You need to set the Agent as interactive mode and auto-logon enabled.
Note: Setting auto-logon mode requires running config.cmd file as an administrator role.
Here is a doc about running UI test, you could refer to it.

Kevin Lu-MSFT
- 20,786
- 3
- 19
- 28