Why is the xUnit Runner not finding my tests

后端 未结 8 1309
陌清茗
陌清茗 2020-11-27 05:25

I have a xUnit.net Test as follows:

static class MyTestClass
{
    [Fact]
    static void MyTestMethod() 
    {
    }
         


        
8条回答
  •  执笔经年
    2020-11-27 05:51

    For me, the combination of my test class and test method names were too long; xUnit appears to have some cap on this combination.

    Shortening the name of just the test method allowed xUnit to discover that single test. Shortening the name of the entire class allowed xUnit to discover all tests in the class.

    Threshold of class name + method name appears to be 172 characters.

提交回复
热议问题