Test suites from MTM not running in the expected order - tfs

We are running automation using xaml builds (automationdeploymenttemplate.xaml) and we were OK with whatever order it was picking the test cases from a particular suite.
After running all the test cases from that suite, it picks the next suite in alphabetical order.
It always follows the suite ordering, but all of sudden It's not following the previous suite order and picking test cases from any suite randomly.
How can we get the suites to run in alphabetical order again?

Related

Include tests from child suites when exporting test plans in TFS

When Exporting Test plan , i get plenty of Test Suites with 0 Test cases .
Though Every one of those Test Suites have multiple Child Test Suites with Multiple Test cases each .
How am i able to include the Test cases from the Child Test Suite in the Exported Report ?
It works well in my side, the test case is located under corresponding test suite.
When you do the export through right click the test plan, please make sure you have selected selected suite+children and check the test cases with step option.
Update:
Simply select the test plan you want to export, and right click the test plan, select Export.

TFS Test Suite automation execution order

Currently I am using TFS vNext Run Functional Tests (RFT) using ​Test Plan.  I would like to be able to run specific tests first in a specified order before running other tests.  I thought that I could maybe do this by using a parent-suite that had tests that I wanted to run first, and then have a child-suite under that parent that would run all other tests.  I am not sure if TFS executes suites in any particular order.  I haven't found much documentation stating if parent-suites execute before their child-suites execute.  Is this a safe assumption on my part or is there some other way to execute tests in a specific order using RFT?
For VSTS and TFS 2017 and later versions, you can order the test suites as per your needs. Prior to this capability, the suites were only ordered alphabetically. Now, using the drag-and-drop capability in Test hub, suites can be reordered among the peer suites or moved to another suite in the hierarchy.

How can I change the order of the execution of automated tests when a build is run in TFS?

I have a build which executes the Coded UI tests on TFS. When I run the build, I've noticed that the tests are executed in the alphabetical order of the name of the test methods.
I tried setting the order in MTM but later came across this which states:
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
Is there any way that I could specify the order in which the tests are to be executed?
To run tests in order in Vnext build , you could add an Ordered Test file in your test project and run it in Vnext Build.
In the Test Drop location put the complete Project, and in the Executions options put the ordered test.
You can use Ordered Tests which are explained here: https://msdn.microsoft.com/en-us/library/ms182631.aspx

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

TFS MTM 2013 Test Suite, Test Run on the basis of suite State

Can we disable run button when Test Suite state is “In Planning” or “Completed”.
Basically we don't want the test cases to run when Test Suite state is “In Planning” or “Completed”..
No. This is not possible. You can set a filter on the Test Plan/Suite to not show these tests.
Why would you want to be unable to run the tests? Running the tests early could give you important feedback on mismatches between understanding of the specification by coders or testers. Running them when they are completed might be for additional verification or just to be sure that something hasn't changed.

Resources