coded-ui-testsmicrosoft-test-manager

How to associate coded ui test in Microsoft Test Manager


I have few points that I couldn't understand for usage of MTM (Microsoft test Manager). I have written some Coded UI test and now I want to run them in MTM by associating them to manual tests in MTM.

I found from documents that MTM has a build mechanism, works per build, however, my tests are not in the project I connected to Server, they are just in my local pc and in a separate solution.

The points I do not understand

When connecting to TFS, MTC does not ask for a branch or solution, you select a TFT server only, that means all tests coming from all solution will appear as candidate tests to associate to my manual tests in MTM?

Since I wrote coded UI tests, they are not bound to a solution, I can run them on a separate executable screen, what should I do about this? Let's say I checked in my tests on TFS and get them from TFS in MTM, this time what I will get build is not the build that will be tested but it will be tested I will run, will that be a problem ?

Another question, I do not have a separate lab environment, I just want to run coded ui scripts on my local pc, what should I do? Should still define- my local PC as a lab environment in order to run automated tests? If so how to do that ?

Msdn pages does not give much documentation on these points, please help me.


Solution

  • Rasim,

    In order to associate tests in MTM, You'll have to build the CodedUI .dll in TFS and be able to select the individual build in MTM. Once you do that, MTM will use that .dll to execute.

    If you don't have a test lab / environment set up, you get 0 value from doing this. You will not be able to execute locally from MTM based on those automations.

    I'm not sure what context your project is in - but depending on your version of TFS etc. I cannot recommend enough abandoning your plan of associating test cases with automation in this way. Instead, I'd attempt to set up UI test execution as part of a CI/CD pipeline. It's much easier, valuable, and supported by new versions of TFS. The lack of documentation on MS's part is purposeful as CodedUI and ad-hoc execution has been dead for 2-3 years.