Why do ReSharper and the built-in MSTest runner ignore my tests that aren't supposed to be ignored?

StackOverflow https://stackoverflow.com/questions/21690824

문제

I'm running Visual Studio 2013 (with latest updates) with ReSharper 8.1 (latest stable version). I'm trying to run my tests as usual, but they keep acting as if they're ignored. Both Run Unit Tests (ReSharper) and Run Tests (built-in test runner) act as if the tests are ignored.

I've tried: restarting Visual Studio, uninstalling and reinstalling ReSharper, clearing ReSharper caches, rebooting my Windows 7 machine, removing all [Ignore] annotations throughout the project... nothing works.

Even a very simple test like:

    [TestMethod]
    public void CrapTest()
    {
        Assert.IsFalse(false);
    }

Will immediately go to an ignored state.

I've searched online but can't find any solutions. Help! This is driving me nuts.

도움이 되었습니까?

해결책

Deleting this file fixed it:

Solution Items / TestSettings.testsettings

One of our devs was trying to set up distributed testing for our TFS / CI test runs using this file.

다른 팁

I know this is an old post, but identical symptoms can come from a different root cause. If a test case is marked Explicit then Resharper will ignore the test. In this case this is not an error, but rather works as designed.

<Test(), Explicit()>

Will cause tests to be ignored.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top