VSTest 2013 Agent Stopped Working After First Test - visual-studio-2013

We have been running into an issue where we are running our interactive Coded UI tests, and when our second test starts, the QTAgent32.exe stops working. Our setup is through TFS where we queue a new build that tells a controller to run our tests on VMs. These tests are directly sent to the VMs designated by a .testsettings file. Once the tests are distributed on the VMs, the tests start to work on the WPF application under test. A test can mainly take an hour to run due to the complexity of what needs to be tested. After the test completes and the agent shows '1/10 Completed' we get a windows message that QTAgent32.exe has stopped working.
Problem Event Name: BEX
Application Name: QTAgent32_40.exe
Application Version: 12.0.21005.1
Fault Module Name: StackHash_83e2
Fault Model Version: 0.0.0.0
If we close out the Windows message, another will pop up with different details.
Problem Event Name: APPCRASH
Application Name: QTAgent32_40.exe
Application Version: 12.0.21005.1
Fault Module Name: msxml6.dll
Fault Model Version: 6.30.7601.18431
If we close the second message, the test will be claimed as complete with a failure in the test results. We also see that the Agent will continue running the next test until it fails on the fourth test!
We have looked at event viewer on both the controller and agents. The controller shows nothing. The agent shows failures with the same details as the errors above. We have repaired the agent and looked into .Net. We know that we can run these tests in any order and that they do all pass without this issue when ran locally. The errors described above are only when ran on our VMs/Agents.
Anyone have ideas on how to either get more details during the test runs? Has anyone else ran into an issue like this before?
Thank you all in advance for taking a look and helping out!

After much investigation and NextInLine's help, we found that the issue was with how our test was accessing and using the msxml6.dll. We repaired the installation of this dll and others, and resolved the issue.

Related

.Net 5 RC 1.20451 Blazor App Fails to launch

I realise this is pretty 'bleeding edge' stuff so no complaints. I just wonder if anyone else is having the same issue. I am trialing .Net 5 Blazor Web Assembly and have been expanding out from the template app. Local server with built in auth. I have reached a point, size, complexity.. hard to pin down where the app just crashes out when trying to run a debug build. It seems to kill the .NET Host because if I go and remove it using task manager, with a clean start, I can then run it just fine -once.
On the second occasion there is an exception and the launch adapter fails to start.. see the two errors in the image:
There is very little more information since it has failed in 'external code' and I can't get to it to see if I have set something up incorrectly as a null ?
This error message came from the 'Copy Details link':
Any ideas anyone... I was hoping the RC would be about ready for primetime, but I realise that is why it is a release candidate...
I am using VS 2019 16.8.0 Preview 3.2

running unit tests causes .NET Core Host to stop working

This just started happening. I've been running my tests successfully for weeks but all of a sudden I get this error (see screenshot):
When I debug, it takes me to places in my mocks where I'm setting up GUIDs. I've tried commenting those out and then it fails on other things. What's weird is that I can build and run the solution just fine in my browser, it's only my test project that is causing this issue.
I have rebooted, doesn't fix it. I have another solution that is scaffolded almost identically to this one that is running the tests just fine.
...not really sure where to look next?

Xcode bot fails with "no activity for too long" error

My Xcode bot integrations fail with the following error.
Assertion: Running task was terminated because it produced no activity for too long.
From the bottom of the log:
Sampling completed, processing symbols...
Sample analysis of process 4470 written to file /Library/Developer/XcodeServer/Integrations/Integration-ef7a2c98cd2307fc71923f1123ea23f7/4470.sample
sample[5774]: sample cannot find any existing process you have access to which has a name like 'Interface Builder Cocoa Touch Tool'; try running with `sudo`.
sample[5775]: sample cannot find any existing process you have access to which has a name like 'ibtool'; try running with `sudo`.
sample[5776]: sample cannot find any existing process you have access to which has a name like 'ibtoold'; try running with `sudo`.
** BUILD INTERRUPTED **
Interestingly, the integrations worked the day before and started failing today without any known changes to the server configuration. Is there a way to fix those errors and make the integrations run?
OS X 10.11 (15A244d), Xcode 7.0 (7A176x), OS X Server 4.1.56 (15S2186i)
This did the trick for us when we ran into the same issue today:
https://stackoverflow.com/a/22637896/43996
Created a new bot with exact configuration and that did the trick for me. Stackoverflow xcode-server-ibtool-build-failures
I created a new simple project to test Xcode Bot and the same problem happened.
I have try several ways including allow all items to access keychain, however, it didn't work until I unchecked the Code coverage.

MSTest: No test discoverer is registered to perform discovery of test cases

I created a console application that was designed to be completely self-reliant and contain all the necessary DLLs to run. I was able to do this and get it to run locally, but when copying to another computer I began to receive this message...
"No test discoverer is registered to perform discovery of test cases. Register a test discoverer and try again."
I found this Microsoft bug report, but it was closed as could not reproduce:
https://connect.microsoft.com/VisualStudio/feedback/details/770093/unit-test-project-not-discovering-test-cases
I didn't want to sit around waiting for Microsoft to say they couldn't reproduce so I dug into it and found that the reason I was getting this error message is because I was missing the DLL file "Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll".
This is the file that contains the test discoverer and it needs to be in directory of the executable that is running the tests as well as the directory of the test files themselves. It is easy to miss because the assemblies to run the tests appear to be completely contained within the "Microsoft.VisualStudio.TestPlatform" namespace and the tests appear to only require a reference to "Microsoft.VisualStudio.TestTools.UnitTesting".
I decided to post this "knowledge share" post because there was no other information about the issue on the internet and Microsoft's documentation of their MSTest framework is bad at best.
Just come across this issue with some unit tests originally written in .Net 3.5 and running (or not) in vs 2013.
The UnitTestFramework.dll mentioned by Love2Learn was present however updating to .Net 4.5 seems to resolve the problem.
I'm sure someone out there can explain why but my gut feeling is that this has something to do with this being a multi-platform solution and that .Net 4.5 is just better at running 32bit unit tests against 64bit projects.

vs2010 unit tests aborting for no reason

We recently had our TFS 2008 server go down. It was rebuilt with TFS 2010 server. Now, when I selected VS unit tests and run, the first few are marked as "Aborted" and the others are "Not Executed"...
This happens without any input from me.
The unit tests were working fine before the crash.
What could be causing that?
Thanks.
I'm not sure but I have similar problem but on my local machine and with VS 2008. I cannot run some tests and have their status aborted with no reason. In the test run results I only have message "Test host process exited unexpectedly." Seems like with no reason. But I found more info on connect.microsoft.com site. The problem is my code rises StackOverflowException and it prevents the test from running. So fixing this problem heals my tests. Hope somebody it helps.
Unit test result only shows "aborted"/"test run error" for unrecoverable errors
I was getting this same issue, however in my case ALL tests were being skipped, and the error was reproducible on an empty test project, so code was ruled out.
Checking the EventViewer led me to the cause in my case; somehow the C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\QTAgent32.exe.config file had been removed from my machine?!? I copied one from another machine here and I'm back in action.
Same thing happened to me and as Mike said it was because I had a stack overflow exception somewhere in my code. As soon as I fixed the SO exception the problem went away. Finding the SO exception was quite hard, but I just had to step through the code until I finally found a recursive call that would cause an SO.
I suffered a similar problem which stopped me completely.
To get round it, firstly I ran the NUnit test via debug (TEST --> Debug --> All Tests) which allowed me to step through.
The error was related to the use of Entity Framework. If your project under test uses Entity Framework then the NUnit project needs a reference to EntityFramework and EntityFramework.SqlServer (or whichever provider you're using).

Resources