The application failed to start for UI Test - visual-studio

I have a UIcoded test that works in VS2010.
I want automated it with MTM. But when I associated it with test case and run it I get this error in ViewResult :
Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToLaunchApplicationException: The application failed to start.
I am monitoring it in test agent status and every thing is ok.
how I can pass this test.
Sincerely you M.Bagheri

If you are running UI Coded test in the build process using TFS Build Service, make sure you run the build service as an interactive process.
The answer here also tells you how to make the interactive build service start when the build machine is started.
See here for how to run the build service as an interactive process.

Usually you will get a specific error if you cannot interact with the desktop.
I recently received this error. I performed the following tasks which solved the issue for me:
clear the controler temporary files
restart the agent and controller.

Related

Re-run Cypress test in Github Actions does not work

I have a cypress workflow in Github and it runs nicely. But, when the e2e tests fail for some reason and I want to re-run them using the re-run all jobs button (below), the following message appears:
The run you are attempting to access is already complete and will not accept new groups.
The existing run is: https://dashboard.cypress.io/projects/abcdef/runs
When a run finishes all of its groups, it waits for a configurable set of time before finally completing. You must add more groups during that time period.
The --tag flag you passed was:
The --group flag you passed was: core
What should I change in my configuration to make these possible? Sometimes the e2e fails because of a backend error that is fixed later.
I'd like to do this instead of a force e2e commit.
I was facing the same issue before.
I think you can try to pass GITHUB_TOKEN or add a custom build id. It fixed my issue. Hoep it helps.
https://github.com/cypress-io/github-action#custom-build-id
Check your Cypress Dashboard subscription plan. Mine got the free plan full (500 test for free and I was running in 3 different browsers 57 tests, so it got full pretty quick since this is 171 tests in one run) and after that it didn't allowed me to keep running or re running more parallel tests. Test kept running but in 1 machine out of 4 in the first browser and stages for the other 2 browsers started failing, I was able to allow the pipeline to not be failing by passing continueOnError: true in the configuration.
Quick edit, I don't remember where but I read that you could also add a delay to your pipeline and/or reduce the default wait on the Dashboard which is 60s(https://docs.cypress.io/guides/guides/parallelization#Run-completion-delay)

Pausing Teamcity builds that are running

I would like to have Teamcity build configuration that currently has 3 build steps:
Build an artifact to perform tests on & install on remote server
Kick off long running test job on remote server
Pause build awaiting external event (i.e. remote job finishing)
Retrieve results and record the report
I have had a look through the documentation and I can see how I can pause (step 3) the entire build configuration (which stops any additional builds running) ... but not just a single running build.
The Step 2 script that is running the external job has the various parameters passed to it, so that it can issue a REST call back to the teamcity server to resume the build job.
Basically I don't want to tie up a build agent waiting the entire hour the test takes to run.
I have googled and everything I can find points me at pausing the build configuration.
I am currently having to look at splitting the build configuration into two. The first will kick of the test job and finish. Then when the external test job finishes it will call teamcity to start a second job to retrieve and store the reports. But that feels disconnected to me in that I will not be able to show a single job with build/test/report.
At the moment (TeamCity v 2018.1) there is no direct way to pause the build, release the build agent, and later resume the execution.
What you described is the recommended workaround.
Also, please watch/vote for related issue: https://youtrack.jetbrains.com/issue/TW-30777

Running CodedUI tests on VM having test Agent installed,but TestCases are getting failed

I configured the test agent on VM, but when initiate a test from MTM/TFS build, the test agent is not performing the GUI test. i can see a successful call from the test controller to the VM test agent. The VM is not lock and in active window screen but somehow its not performing the GUI action that i coded. it threw below exception after test failed:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException:
The playback failed to find the control with the given search
properties. Additional Details: TechnologyName: 'MSAA'ControlType:"
followed by exception thrown from TestCleanup "DB File can not be
access as it is being used by another process
This is very common exception where cannot find the control, but the control is on the screen. the script is running fine on local system and some other Testcases are getting passed on VMS so there is no problem with testscript,testcontroller and tfs build. Is there any missing config or permission on my VM? or VM do not have mouse/keyboard causing the GUI test failure?

Queued Build is not connecting to db as it uses domainName\computerName instead of domanName\username

I am trying to queue a build in my own build definition. But the sql connection in my code throws an exception that Login failed for user 'domainName\computerName$' which is natural since it should have used domainName\userAlias.
My question is why is it using domainName\computerName, and how to make it use windows auth instead? Can some one please help me with this?
You need to set the service account that the build service uses on the server(s) running your Build Agent(s). It sounds like it's currently set to run as Network Service.
You can change it by firing up TFS Admin Console, and going to Build Configuration and changing the properties on the service:

"The process cannot access ..." when using MSBuild

I am so close to getting my TeamCity setup complete, but am stumped by this error:
(12/22/2011 2:30:15 PM) An error occurred when the request was processed on the remote computer.
An error was encountered when processing 'Web.zip'.
The error code was 0x80070020.
The process cannot access 'C:\Inetpub\wwwroot\Deneb\Website\obj\Deploy\Package\Web.zip' because it is being used by another process.
I tried deleting that file myself, and didn't have any problems. I am able to deploy this site from another server, also without any problems. I set the Team City build agent service to run as administrator, and restarted the service.
Any help would be greatly appreciated - thanks!
Realized that the checkout directory shouldn't be set the same as the web directory

Resources