Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AxoCover does not detect TestClasses marked with DoNotParallelize #202

Open
Steinblock opened this issue May 27, 2019 · 0 comments
Open

Comments

@Steinblock
Copy link

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 NuGet MSTest.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
    image
  • Add the [DoNotParallelizeAttribute] to UnitTest1 and rebuild your project. AxoCover will fail to discover the test(s) from UnitTest1.
    image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant