问题:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project eureka-server: There are test failures.
Please refer to F:\demo\hscms\eureka-server\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
解决:
产生这个问题一般是测试类问题。
1、忽略测试类 mvn clean package -Dmaven.test.skip=true
2、如果要修改test类,检查test包下的test类,是否存在缺少@Test注解、public关键字等情况
下面是我的问题示例,
- @SpringBootTest
- class EurekaClientApplicationTests {
- @Test
- void contextLoads() {
- }
- }
改为:
- @SpringBootTest
- @RunWith(SpringRunner.class)
- public class EurekaClientApplicationTests {
- @Test
- public void contextLoads() {
- }
- }