我已经开发了一个springboot项目,在编写测试用例时使用了H2数据库,如果我们运行单独的controllerTest类,所有的测试用例都是通过的。但是我们一起运行所有的测试类,很少有测试类失败,并出现以下错误: org.springframework.dao.DataIntegrityViolationException: could not executeat org.junit.runne
我尝试按照以下步骤在eclipse中创建JUnit测试套件--右键单击源文件夹-> -> Other -> JUnit Test Suite。问题是,即使我已经在源文件夹下创建了Java应用程序和相应的JUnit测试类,我也没有在注释“test classes to include in suite”(没有类在那里)下获得测试类。在我的源文件夹中的默认包-应用程序