- How to prioritize test cases (For selenium Automation – TestNG Framework)
When Multiple test cases are written under one class, it will execute according to the alphabetical order(ASCII), for making it execute based on our condition, we will prioritize the test cases
→ ByDefault all the tests in the class will be executed in the ASCII order
→ By providing Priority Attribute beside @ Test method, we can customize the order in which the individual tests need to be executed
→ If you don’t specify the priority, by default it will be settled as zero
→ Able to add negative value to set the priority, so it will be executed before the default prioritized method
→ If the same Priority is given to the methods then they will execute according to the ASCII order
