Choose order to execute JUnit tests

后端 未结 8 1041
执笔经年
执笔经年 2020-12-11 03:32

I wanted to choose the order to execute the JUnit tests. I have 4 classes with several test methods in it, my goal is to execute, for instance, method Y of class A, then met

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-11 03:37

    If the previous answer is not satisfying I have noticed with the Sun JVM JUnit always seems to execute unit tests in the order of which they are defined. Obviously this is not a good idea to rely on this.

提交回复
热议问题