Start TestExecute from TeamCity
Hi,
To test our desktop application we have a Master project that runs the Slave project on different VMs. The Master project is started on a Management machine.
We are currently moving our Build process to TeamCity. On this Management machine we have a Build Agent from TeamCity. The Build Agent is running as service with a System Account (not the Local System Account).
We are not using the Local System Account (that can interact to the Desktop) because we need a domain account to access domain resources. And we don't want to start the Agent as a process, we want to keep it at a service.
Right now, we can't start TestExecute directly from TeamCity because TestExecute requires an interactive session and the Account of the Build Agent can't interact with Desktop.
We tried with a script (executed from TeamCity) to create a PSSession with a normal user that have access to Desktop and start TestExecute from this PSSession. But this is not working either.
Here is the exception that we had:
Start-Process : This command cannot be run due to the error: This operation requires an interactive window station. At line:3 char:9 + Start-Process "D:\SmartBear\TestExecute 12\Bin\TestExecute.ex ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Does anyone have a solution to start tests with TestExecute from TeamCity (with the Agent running as service with a particular system account and not the local one) ? Is it possible for a domain system account (like the one we are using) to interact with the Desktop ?
Thank you for your answers,
Camille
I figured it out.
My problem was that I didn't disable "uiAccess" in the "TestExecute.exe.manifest".<security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security>
So the Desktop interaction was needed according to the Manifest of the app.
With this attribute to false, TE doesn't require a Desktop / UI Access. So I can start my test directly from TeamCity and this domain system account without interaction with the Desktop.
Thank you all for your help !!