IDEA+JUnit

1、入门

  https://blog.csdn.net/smxjant/article/details/78206279

2、比较好的JUnit例子:https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-core/src/test/java/com/amazonaws/util/TimingInfoTest.java

3、JUnit—使用IDEA进行基本操作:https://www.cnblogs.com/lesleysbw/p/6285980.html

4、https://www.cnblogs.com/tobey/p/4837495.html

5、详细:https://blog.csdn.net/Dream_Weave/article/details/83860755

JUnit测试框架:

  1、设置测试方法的执行顺序:

    JUnit是通过@FixMethodOrder注解来控制测试方法的执行顺序的。@FixMethodOrder注解的参数是org.junit.runners.MethodSorters对象,在枚举类org.junit.runners.MethodSorters中定义了如下三种顺序类型:

      1)MethodSorters.JVM:按照JVM得到的方法顺序,也就是代码中定义的方法顺序

      2)MethodSorters.DEFAULT(默认的顺序):

      3)MethodSorters.NAME_ASCENDING:按方法名字母顺序执行

posted @ 2019-03-01 10:43  淡怀  阅读(267)  评论(0编辑  收藏  举报