By default Visual studio will run tests in 1 thread. I want to run it in parallel. I have test.runsettings file with code below:
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<MaxCpuCount>4</MaxCpuCount>
</RunConfiguration>
</RunSettings>
When I rebuild solution or run the tests I'm getting the error below in OUTPUT window:
Invalid settings 'RunConfiguration'. Unexpected XmlElement: 'MaxCpuCount'.
I copy pasted the code for test.runsettings from MSDN doc and selected this file from VS Test menu.
I'm using Visual studio 2015.
Problem is solved. It will work on VS 2015 update 1 and +.
Thanks for your help.
Creating a Test
project in VS 2015 or newer according to MSDN and creating a test.runsettings
file
adding your content to this file:
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<MaxCpuCount>4</MaxCpuCount>
</RunConfiguration>
</RunSettings>
And adding it to the testsettings, works fine for me. Have a look at the MSDN-Documentation. You might have done something wrong.
EDIT:
You may have updates for your VS? if not, maybe something wrong with the solution or with your VS.
As last option, reinstall VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With