介绍

UnitTest

@RunWith就是一个运行器

@RunWith(JUnit4.class)就是指用JUnit4来运行

@RunWith(Suite.class)的话就是一套测试集合

Spring Test

@RunWith(SpringJUnit4ClassRunner.class),让测试运行于Spring测试环境

GenericApplicationContext

@ContextConfiguration spring测试时配置文件或配置类,可以为多个

SpringBoot Test

MockMvc

参考