TestNG Priority and Sequencing

Опубликовано: 28 Октябрь 2024
на канале: QA-Automated
636
8

Hi everyone, in this post we will see how to priorities Test cases in TestNG and how to sequence it as per our requirement. If you create a test class and add multiple test cases and run it then each time test case execution sequence is randomly selected .
With TestNG annotations @Test and parameter "priority" we can define sequence and priority for executing test cases. Let us consider the below example and if you run the test class given below multiple times you can see that each time execution sequence/flow is different hence to define a fixed execution flow we user TestNG annotation priority.

Blog Post URL - http://www.qaautomated.com/2018/06/te...

Contact Me @ -

Email - [email protected]

Facebook -   / qaautomated  

Instagram -   / bhattanuja  

LinkedIn -   / anuja-jain-bhatt-1641a15b  

Twitter -   / shinystarin  

StackOverflow - http://stackoverflow.com/users/582071...