How to run automated test cases through MTM 2015 - automation

I am trying to execute automated test cases (codedui) from Microsoft Test Manager 2015. I have executed by triggering tfs bui. But my requirement is to run through MTM 2015.
So far I have done the following:
Created an environment in lab - MTM
Created XAML Build definition

If you just want to run code ui test through MTM, seems not related to XAML build.
What you need to do is importing the test methods to TFS as test case and then which can be added to MTM through tcm testcase /import
Such as creating test suites which are tied to the CodedUI tests, and use these sub-selections of tests to complete a test run that validates a specific change made to the system.
More detail steps please refer this tutorial: How to manage and run CodedUI tests using Microsoft Test Manager

Related

Associate automated tests Robotframework with test cases in TFS

I am working using TFS to create test case. I have a automated test written in Robotframework with Selenium2Library.
I'd like to be able to associate these tests with test cas in test. Is it possible to link the automated test cases with the test case in TFS, and if so, how is it done?
The web Test page does not support to run automatic tests associated with test cases in TFS.
You can achieve the same goals using the Build & Release features in Team Foundation Server (TFS). (https://www.visualstudio.com/en-us/docs/test/lab-management/use-build-or-rm-instead-of-lab-management). Simply integrate Selenium testing into a continuous integration/continuous delivery pipeline.
Instead of build, suggest you use a step in a release pipeline. Take a look at this question:How can i run automated selenium tests using TFS build 2015?
More detail steps about how to integrate with TFS please go through the official tutorials from MSDN: Get started with Selenium testing in a CD pipeline

How to configure MTM with TFS?

I have several test cases in TFS. I would like to run those test cases using MTM(Microsoft test manager) automatically and update the test results. How to connect or configure MTM with TFS so that I can automate all the test cases.
Connecting TFS from MTM is easy, just enter the TFS name or URL and choose your team project:
Details of Automate a test case in Microsoft Test Manager, check: https://msdn.microsoft.com/en-us/library/dd380741(v=vs.120).aspx
If you use TFS 2015.2 and later versions, then it's not needed to use MTM, you can use new build system and Run Functional Tests task to executing automated tests, check: https://blogs.msdn.microsoft.com/visualstudioalm/2016/03/31/executing-automated-tests-in-build-vnext-using-test-plan-test-suites/

Run Automation UI Testing through Selenium and Coded UI Without Build from TFS

Our web application codes are stored on SVN instead with TFS. We are trying to set up our automated UI testing.
These are following tools our team are considered to use.
- Microsoft Test Manager (Create Test cases associate with User stories)
- Coded UI (Connect to TFS and Microsoft Test Manager)
- Selenium (Automated UI coded)
- Team Foundation Server 2015 (Test cases and User stories)
Web Application with URL
We only want to configure automated UI testing for our website. Is there any way to run the set up the automated testing without build through TFS?
Thank you and any feedback is appreciated.
So here is the thing,
Coded Ui is not a connector to TFS & MTM it by itself an automation
framework/tool like selenium
You don't need both Selenium & Coded UI for your automation. You only need either of it
If all you want is to get started with automation for your application, you can do it just with a version of visual studio which has Coded Ui. (The latest supporting version is Visual Studio 2015 Enterprise edition)
See this like to know How to create Coded Ui Tests , see this link to know how to Run a Coded Ui Test
It's based on your workflow. Whether your app/code is on-premises or in the cloud, you can automate build-deploy-test workflows and choose the technologies and frameworks, then test your changes continuously in a fast, scalable, and efficient manner. And just as Prageeth said, Coded Ui is an automation framework/tool just like selenium.
In TFS either code ui or selenium test more like continuous testing. The workflow is such as bleow:
First make sure that your app still works after every check-in and
build using TFS. Find problems earlier by running tests
automatically with each build. When your build is done, review your
test results to start resolving the problems that you find.
Add some related tutorials for your reference:
How to run Code UI in TFS: Executing Automated tests in Build vNext
using Test Plan, Test Suites
How to run Selenium in TFS: Get started with Selenium testing in a
continuous integration pipeline
If you insist on without building from TFS, you could also use the Code UI function with VS on local.
You can setup Test controller and Test Agent VMs in MTM test lab. This will allow you to execute your automated tests on Test Agent directly in MTM. Otherwise, you can execute Coded UI tests locally in Visual Studio.

Microsoft Test Manager - Test Automation

I have written a bunch of automated test scripts using visual studio 2013, and have categorized those in the hierarchy of Test Plan & Test suite using Microsoft Test Manager.
When I am executing a test suite, I am getting proper result whether a test case has failed or passed.
I can select a failed test case and create a bug in TFS project collection.
Is there any way which will automatically create the bugs for each failed test case instead of the tester creating the bug manually?
I'm afraid you need to create bug manually. In TFS, there is no event associated with test run failed, so you can't determine when test run failed.

Run CodedUI from MTM 2013

I want to run a codedUI test case using MTM 2013
Here is what I already have so far:
I have codedUI test cases to test my web application.
The solution of these test cases has got nothing to do with my web application.
Now I have few test cases written in MTM 2013 (initially for manual execution). Later I had plan to automate these Test Cases Using codedUI and associate these automated Test cases to MTM test cases so that I don't have to open VSTS to run my automated test cases. Also this may serve the purpose that any other tester can also execute them using MTM.
Here is all I have done so far:
Installed and configured "Test Controller" in my TFS server.
Installed "Test Agent" on the machine I want to execute the automated test cases.
Created Physical Lab Environment successfully in MTM.
Associated the codedUI automation with test cases in MTM.
Now when I go to play test case in MTM, it gives me an error "Cannot create automated test run. A build associated with the active test plan is required to submit an automated test run."
Can you please help me with this. This is the first time I am using MTM test cases to associate codedUI automated test cases.
You need to assign a build to your test plan that contains your Coded UI tests. Otherwise, how does it know which version of your tests to run, and which version of your coded is being tested?
MSDN: http://msdn.microsoft.com/en-us/library/dd490760(v=vs.100).aspx
Check the answers to following SO questions, they may help you to understand how it is working:
Couldn't run my test using Microsoft Test Manager
Attach Current Build to Test