softwaremill/softwaremill-common — Issue #65: TestNG listener which allows test reordering
Author: tdziurko
Created: 2011-12-29 15:59:43+00:00
State: open

TestNG Listener modifying order in which test methods are executed in each class. It uses @FirstTest, @LastTest and @TestOrder annotations.

Beware that not all methods and classes can be reordered, only those which don't have any methods depended upon
(for more see javadoc for org.testng.IMethodInterceptor)

Example ordering in single test class when this listener is used:
- method marked @FirstTest
- method marked @TestOrder(order = 1)
- method marked @TestOrder(order = 2)
- method marked@TestOrder(order = 3)
- test method without @FirstTest / @LastTest / @TestOrder annotations
- method marked @LastTest