RE: How to run test methods in specific order in TestNG ?

Hi,

My xml script is executing methods in alphabetical order, I wanted to execute my tests in my own order

Can anyone suggest How to run test methods in specific order in  TestNG  xml?

Aruna Train Asked on March 5, 2015 in Selenium WebDriver.
Add Comment
2 Answers

Aruna, try using the priority attribute to your @Test annotation like this. @Test(priority=1) .  Choose the priority in an order starting from 1 and test will be executed from 1 2 3 to the max number.

Virender

Professor Answered on March 6, 2015.

Virender, This really worked..

Thank you

on March 9, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.