Reputation: 51
I'm using VS2013, running 120 c# selenium tests, with a .testsetting file that contains the following parameters Execution parallelTestCount="5" and test timeout of 6000ms(6 seconds). The tests duartion are more than 6 seconds, I used this configuration to reproduce the problem. After 6 seconds 5 tests are failing and the rest are skipped. This is what i'm getting in the output window: "Test run is aborting on Machine-Name, number of hung tests exceeds maximum allowable '5'."
Testsettings file
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="RemoteWebDriver" id="e293abd4-745a-43f5-a831-2064f9305fc6" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment>
<DeploymentItem filename="TfsAutomation\testDefintionSources.config" />
<DeploymentItem filename="TfsAutomation\TfsAutomationCore.config" />
</Deployment>
<Scripts setupScript="TestScriptRemoteWebDriver.bat" />
<Execution parallelTestCount="5">
<Timeouts runTimeout="10000000" testTimeout="6000" />
<TestTypeSpecific>
<UnitTestRunConfig testTypeId="13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b">
<AssemblyResolution>
<TestDirectory useLoadContext="true" />
</AssemblyResolution>
</UnitTestRunConfig>
</TestTypeSpecific>
<AgentRule name="LocalMachineDefaultRole">
</AgentRule>
</Execution>
<Properties />
</TestSettings>
Upvotes: 2
Views: 2048
Reputation: 16201
This question has led me to this and was reading for while. It's worth mentioning that the internal structure of MsTest hasn't been change a lot since then a lot, at least according to the the reference above and my knowledge. I can only conclude the discussion saying MSTest parallel mechanism isn't for UI testing in parallel without knowing the internal structure the architecture of your test environment. Secondly, the number of cores does matter in parallelism in MsTest parallel execution. Refer to this SO answer to see more about thread management. So, the question is what is the best solution then. Without having a lot of knowledge on MSTest but having enough knowledge on Selenium I would say Selenium-Grid. Let's grid control the parallel execution to be in safe side.
Upvotes: 1