0

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

Kostas Konstantinidis
  • 13,347
  • 10
  • 48
  • 61

1 Answers1

1

Have a look at the TestContext:

    [Test]
    public void Pass()
    {
        Console.WriteLine("Test name: {0}", TestContext.CurrentContext.Test.FullName);
    }
grahamrhay
  • 2,046
  • 4
  • 19
  • 29