What is test Priority in TestNG?
Priority is an attribute in TestNG that allows users to define the order in which they want test cases to run. By default, test cases are run in the given set order. Changing the priority of a specific test case will force it to run before or after other test cases.
To set test case priority in TestNG, we need to add annotation as @Test (priority=X)
Hope it helps!