1

How to capture Current Test Case ID that's current being run in the MTM pragmatically using C# code?

Thanks & Regards,

woodson

Shayki Abramczyk
  • 36,824
  • 16
  • 89
  • 114
user421479
  • 11
  • 1
  • 7

1 Answers1

1

Had the same question and found the answer: how-to-retrieve-the-id-of-the-workitem-that-started-an-automated-test

Basically you get it from the TestContext with string tcId = TestContext.Properties["__Tfs_TestCaseId__"].ToString();

Community
  • 1
  • 1
AutomatedChaos
  • 7,267
  • 2
  • 27
  • 47