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/
Related
I have created a test plan for 10 test cases. I have automated 5 test cases in visual studios 2019. I need to run the automated testcase from testplan, as that i have to execute the remaining manual testcase and failed automation tests manually in the testplan after the run overs.
We can run all tests in Azure DevOps.The only Failed test cases can be re-run using the Azure DevOps VS test task.
If you want to provide a test plan, you can use "Test filter criteria" option in the VS test task
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
We are running selenium E2E tests as part of VSTS Release. We're using Visual Studio Test task which runs vstest.console.exe as a NT AUTHORITY\SYSTEM user. How can we specify a different account?
Sorry, this could not be achieved for now. Please take a look at this thread: Test agent, Test Controller and MSTEST FAQ (Qustion 21), it should be also applied to VS test.
Will Test Agents allow you to impersonate another user? Or does the
Test Agent always kick of tests as the user its configured start up
as?
There is no built in support for impersonation, so by default tests
run under the identity of the test agent. If this is something you
really need, you could write a unit test extension that does the
impersonation for you.
We could not specify the user in the "Visual Studio Test" step, the test will running with the agent.
As a workaround, you can try to change the agent service account to the specific account of the user. Or just deploy a new agent to run with the specific account, a sample for your reference : Running Unit Tests on different machine during TFS 2015 build
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
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