Site Loader
Auckland, New Zealand
In the last post we saw how to run multiple test via Test Explorer and also we discussed about different types of Test Attributes in coded UI testing. In this post, we will discuss how to run multiple test in specific order.
Note In selenium we can run test in an order via TestNG using preserve-order attribute in XML testng.xml file
In visual Studio, we can run test in order using a feature called Ordered Test, as shown below Here is the complete video of the above discuss along with the source code below Complete Code
[TestMethod]
public void Login()
{
    Console.WriteLine("Login");
}

[TestMethod]
public void Settings()
{
    Console.WriteLine("Setting");
}

[TestMethod]
public void Logout()
{
    Console.WriteLine("Logout");
}

[TestMethod]
public void Admin()
{
    Console.WriteLine("Admin");
}

[TestCleanup]
public void MethodClean()
{
    Console.WriteLine("Test Cleanup");
}

Thanks for watching the video and reading the article !!! Please leave your comments and let me know if there is anything needed to be improved in the post !!! Thanks, Karthik KK

Post Author: Karthik kk

4 Replies to “Run test in order via Ordered Test”

  1. I am using visual studio 2017 and there is no code UI testing possible.
    How do achieve ordered test execution in test explorer of Vistual studio 2017, with specflow scenarios coded for mobile app using appium?

Leave a Reply

Your email address will not be published. Required fields are marked *