문제

Is there a way to get the name of the currently executing test from ie the Setup method of a test fixture?

도움이 되었습니까?

해결책

Have a look at the TestContext:

    [Test]
    public void Pass()
    {
        Console.WriteLine("Test name: {0}", TestContext.CurrentContext.Test.FullName);
    }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top