1
votes

I have created a number of (standalone) automated test-cases captured using CodedUITest in Visual Studio 2013, to test webpages.

They work fine within Visual Studio, individually; and when several of them are put into a single project as a solution, to create a kind of playlist.

However, I'm trying to use Microsoft Test Manager as a 'front-end' - in order to be able to select which tests, create play-lists, decide how many times a specific test-case should be run etc, with the results stored.

TFS is being used to both store my (individual) test-cases, and, where I'd like to deposit the resultant output of pass/fail etc.

Trouble is, even though the test-automation part functions very well within Visual Studio, getting Microsoft Test Manager to function with what I have, and its associated environment is proving a COMPLETE NIGHTMARE.

My system is simple; I have a virtual machine setup with the testing environment which allows (within VS) for me to run these automated tests.

Why is this proving so difficult to work with MTM? It should be easy - I should simply be having to point MTM at the folder my test-cases are stored, and use its GUI to tell it what and how many tests I want to run.

Anyone else have a similar problem, or a similar setup?

All MS do is point me to (countless) pages which I've already read - for which the whole lot seems to be much deeper than it needs to be.

2

2 Answers

1
votes

You cant just point MTM at a folder and tell it to run the tests as it would have no idea where to put the data. The results of each codedui running are associated with a corresponding test case in mtm.

You also need to have an automated build create the output (your assemblies) for you. Idealy everything goes together with your application. As your application changes, so will your tests.

You should add your CodedUI projects to the same solution that is used to build the application that you are testing. Then when the automated build for that application kicks off your code is picked up to. Both things, test and application, end up in a drop location. It is that drop location that MTM will use to find your test assemblies.

If, while you have the main solution open, you open/create a Test Case you can go to the automation tab in Visual Studio and associate one of your CodedUI tests with that Test Case. The test case will then show up as Automated in MTM.

Now that we have the versioned bits and know where to find them MTM needs somewhere to run them. If you open MTM and switch to the Lab center you can create a Standard environment to run your tests. This will automatically go install the agents required so you wikk need admin on those boxes.

Now that we have both versioned tests and an environment you can find the Test Case in MTM and see that it is "automated". If you right-click on it and say run you will get a box requesting an environment, and which version of the bits to go run. It will then go off and run those tests against that environment and feed the result back into the Test Case.

Does that help?

0
votes

You'll need to setup Test controller and Test agent and associate you build with a Test Plan in MTM.In Test Lab you need to associate Test Agent to the Test Controller.

Once done you'll need to allow File & Printer sharing exception

And then you will have to add Test Controllers and Agents to Appropriate Groups.

Control Panel->All Control Panel Items->Administrative Tools->Computer Management