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

3.6k Views Asked by At

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.

4

There are 4 best solutions below

1
On

Create an Ordered Test, it's a simple list of which test methods should run and in what order.

0
On

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

0
On

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

0
On

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