setting priority of test cases in TestNG?

Modified on Tue, 28 Mar, 2023 at 4:31 PM

To set the priority of test cases in TestNG, you can use the “priority” attribute in the @Test annotation. You can assign a priority value to each test case, with 0 being the highest priority. TestNG will run the test cases in order of their priority value.






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article