How can we execute test cases using MTM - tfs

I am using VS 2012, TFS and MTM. I have created test cases manually in MTM. When I try to run the test case it does not launch the browser. Please let me know what needs to be done.

MTM does not launch the browser for you. I would recommend to get a clean test\recording that you:
Open the browser & Naviage to site
X number of steps to perform the test
Reset and Close the broswer
That way when you generate a CodedUI test from the recording you get something that can easily be automated.

Related

How to see test cases results running using test agents in real time with TFS 2018?

Since MTM lab management is deprecated in TFS 2018 and we are setting up test agents as part of build definition ,How can we see test cases results in real time ?
For example if user wants to know how many test cases are in progress ,passed,failed.
In MTM we can see while running test cases using TCM.exe till tfs 2017
Could any one please help
Thanks
Unfortunately real-time output for tests is not supported for now.
There are some similar user voices submitted to suggest the feature:
Provide VStest.console.exe \ Test Explorer Real Time Test Execution
Status DURING Test Execution
That I could see the reports that I see in the MTM tool, from a
Confluence Page (real time updated info on testing status).
You can go and vote them up or submit a new user voice to suggest the feature again to achieve the feature in future release.
Similar threads for your reference:
Real time status/logs of test execution not available on VSTS
console
Real time logs/stats of unit test execution on VSTS console

TFS on Automation Tests Suits - How to Run

I have 2 executables, an app and an automation test app who will perform actions on the app. My automation tests are basically NUNIT tests who calls Chrome Web Driver.
Everything is hosted at TFS. In my build definition, i run sanity checks for every PR. I wanted to expand that. The automation tests are divided into many different categories (being Sanity a category). I've been seeing some stuff related to TFS Test Suits, and my idea was to make in a way whenever when someone makes a PR, he could choose some test category to run on that PR using that build. So in a easyer way of sayng, if my PR changes how 'blue buttons work' ill run the 'blue buttons test suit' on my pr.
Would using Test Suits be the best solution for this ? Has any1 done this or have any nice information on how to achieve this ?
Thanks for any responses !! Best regards !
You could be able to use the Visual Studio Test Agent Deploy and Run Functional tests steps in your build definition to run auto tests on build agents.
Associated test methods with test cases in Visual Studio.
Create a build definition to build your project and add the 2 steps I mentioned above. In the Run Functional Test step, select the test suites which contains those test cases in step1.
More details please refer this blog: Executing Automated tests in Build vNext using Test Plan, Test Suites

Can Coded UI tests and MTM be used to create a test suite that will automatically play all test cases?

When creating a test suite in selenium ide it is possible to let all test cases in a test suite run in a continuous manner and see results when finished. I'm looking into creating test suites in Microsoft test manager and possibly automating with the code with cuit, my question is, is it possible to run the tests one after another with no manual interaction, as from what I've seen so far, it seems you have to manually verify the test results in each step for MTM tests and manually verify the pass or fail status at the end of the test?
You can create a test case and tie an automated test case (Selenium/CUIT) to it in Visual Studio. This flips a flag in the test case work item to "automated", and allows you to automatically execute those test cases on test agents.
https://msdn.microsoft.com/en-us/library/dd380741.aspx

How to integrate specflow unit test with MTM test cases

How to integrate specflow unit test with MTM test cases.
1) I have created the automated unit tests in specflow-C#-BDD style.
2) I already have manual test cases in MTM
3) I am connected to TFS and my project is checkedin.
I need to make sure the unit test methods (automation) are run against the manual test cases in the mtm from my local machine. I have referred various articles over the internet but unable to reach to a solution. It was found that i need to create test agents , controllers and environment which i am unable to do.
Please guide me from here.
You can integrate any MS Test Unit Test with a test case.
If you are using Specflow you need to make sure that you implement using MS Test. This is fairly strait forwards and allows you to execute the automation in a test environment. In visual studio if you open your solution that contains the tests you can also open the test case and associate on the automation tab.
You then add your environment within which you want to run the tests to Lab Manager as a Standard Environment.
http://nakedalm.com/standard-environments-for-automated-deployment-and-testing/

Specify Order in which Coded UI Tests are executed for TFS Test Agent

I'm trying to setup TFS 2010 Lab Management based Automated Testing system and I have a "Test suite" (Created in TFS Test Manager) with following tests:
1) Start and Login
2) Create group
3) Create user and add to the group
These have order specified properly in Testing Center->Plan->(Test suite)->Order column
However, when they are executed (on TFS Lab Management Build) by Test Agent they run out of order: 2nd then 1st and then 3rd.
Is there a way to make Test Agent run these tests in order?
Thanks.
Create an Ordered Test, it's a simple list of which test methods should run and in what order.
I also had the same issue. I solved it by installing VS2010 Service Pack and TFS 2010 Service Pack in both the Test controller machine and Test agent machines. Please go through the following link for more details
http://social.msdn.microsoft.com/Forums/en-US/vsmantest/thread/29ac3c7b-b0cd-40f3-9992-f5f3c2285331
Unfortunately, There's a blog regarding ordering test cases which says:
Please note this only applies to the manual tests but not automated
tests. For automated tests, the order you set here will not be
respected during test execution.
http://blogs.msdn.com/b/vstsqualitytools/archive/2009/11/21/run-your-tests-in-the-order-you-want.aspx
I don't know if it's a new feature but you can create Ordered tests. Just right click on your project in Solution Explorer and choose Add -> Ordered Test. Select you tests in order.
In Test Explorer, run you ordered test.
Details are in the link below but all I had to do is what I'd said above. I am using VS 2015 Enterprise.
https://msdn.microsoft.com/en-us/library/ms182631.aspx

Resources