jeudi 29 octobre 2015

NUnit tests don't appear in TFS choose test dialog using Visual Studio 2013 (C#)

We are using Visual Studio 2013 and TFS for a new project started more than a month ago. I've chosen NUnit a test framework mainly because I was use to it using Resharper and Teamcity. During the build we have configured TFS to run the tests (using NUnitTestAdapter) and everything is OK. We have now discovered that you can link a unit test to a test case item in TFS and it seems a pretty good thing but in the choose test dialog of a test case item I am able to see only MsTest tests (with TestClass and TestMethod attributes) not NUnit tests.

One option we have is to convert to MSTest (any advise? test set is still small less than 200 tests and it will be mainly replacing the class and method attributes)

For example of the following 2 tests I can only see the first one

[TestClass]
public class TestATestWithMSTest
{

    [TestMethod]
    public void TryItTest()
    {
        true.ShouldBeTrue();
    }

}

[TestFixture]
public class TestATestWithNUnitTest
{

    [Test]
    public void TryItTest()
    {
        true.ShouldBeTrue();
    }

}

Aucun commentaire:

Enregistrer un commentaire