I have Patient's FirstName and LastName in the test case of MTM. I want to use them in Coded UI. Is there any method I can call the parameters from test case to use in Coded UI?

2 Answers 2


Yes, you can do this, but you may not want to.

The only method I know of to use MTM test case parameters in Coded UI is to retrieve them via the TFS API - which is rather less simple than it appears.

There's more information about doing this available here: http://blogs.infosupport.com/accessing-test-case-parameters-in-an-associated-automation/

Caveat: I've never tried this myself, so this is as much detail as I can offer.


I know this is a rather old question, but I will answer it anyway. Recently I came across and solved this issue.

As Im sure we know, we can data drive tests with the DataSource tag. This can be used to pull the parameters out of testcases. Example following...

 [TestCategory("CodedUITest"), DataSource("Microsoft.VisualStudio.TestTools.DataSource.TestCase", "Server_Path;TestPlanName", "TestCaseID",DataAccessMethod.Sequential), TestMethod]

Public void CodedUITest
  //Do test Stuff
  String parameter = TestContext.DataRow["parameter"];

If anyone needs anything discussed in more details, feel free to ask.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.