How can I specify JUnit test dependencies?

后端 未结 6 1110
南方客
南方客 2020-12-23 09:37

Our toolkit has over 15000 JUnit tests, and many tests are known to fail if some other test fails. For example, if the method X.foo() uses functionality from Y.bar() and YTe

6条回答
  •  囚心锁ツ
    2020-12-23 10:06

    org.junit.FixMethodOrder

    @FixMethodOrder(MethodSorters.NAME_ASCENDING) This goes on top of your Unit test class.

    You can name your methods public void step1_methodName etc

提交回复
热议问题