AxoCover
AxoCover copied to clipboard
AxoCover does not detect TestClasses marked with `DoNotParallelize`
I am using MSTest V2 because of the great InAssembly Test parallelization feature and use axocover for code coverage. While most of my tests are thread safe, some of them can't be run in parallel. To avoid random failueres I marked the test classes with the DoNotParallelizeAttribute
Stepls to reproduce
- Create a new
Unit Test Project (.NET Framework) C#with a current version of Visual Studio 2017. The project will reference MSTest V2 Assemblies from NuGetMSTest.TestAdapter 1.3.2 and MSTest.TestFramework 1.3.2 - Create a Test Class
[TestClass] public class UnitTest1 { [TestMethod] public void TestMethod1() { } } [TestClass] public class UnitTest2 { [TestMethod] public void TestMethod2() { Assert.IsTrue(true); } } - Build the project, AxoCover will detect and execute your test as expected

- Add the
[DoNotParallelizeAttribute]toUnitTest1and rebuild your project. AxoCover will fail to discover the test(s) fromUnitTest1.