Styrow.dev
Question 13 of 14
TestNG Topic: General medium

How do you preserve order in TestNG?

Question

How do you preserve order in TestNG?

Answer

By default, TestNG will run your tests in the order they are found in the XML file. If you want the classes and methods listed in this file to be run in an unpredictable order, set the preserve-order attribute to false