Software Development

Execute Tests in Order in JUnit 4

Using @FixMethodOrder [wp_ad_camp_5] To execute tests in a order in JUnit 4, annotate the class with @FixedMethodOrder passing one of enum MethodSorters items as parameter. Either one of the following can be used are parameter to @FixMethodOrder. MethodSorters.NAME_ASCENDING: This sorts