如何修复转储文件(如果存在)[date].dump、[date]-jvmRun[N].dump 和 [date].dumpstream。使用 Maven Surefire 插件 3.0.0-M4 时
执行命令 mvn clean test 时出现以下错误。即使我更改了 Surefire 插件的版本,但我仍然面临同样的错误。
错误日志:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on pr
oject info: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\Sheik Mohammed\eclipse-workspace\info\target\surefire-reports for the individua
l test results.
**Error 1:**
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
**Error 2:**
[ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
**Error 3:**
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java" "-javaagent:C:\Users\Sheik
Mohammed\.m2\repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" " -Dcucumber.options=--plu
gin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm" --add-modules java.base ${argLine} -Xmx1024m -XX:MaxPerm
Size=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647
270359642587079" 2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp
"
**Error 4:**
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] **org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminate
d without properly saying goodbye. VM crash or System.exit called?**
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java" "-javaagent:C:\Users\Sheik
Mohammed\.m2\repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" " -Dcucumber.options=--plu
gin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm" --add-modules java.base ${argLine} -Xmx1024m -XX:MaxPerm
Size=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647
270359642587079" 2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp
"
[ERROR] Error occurred in starting fork, check output in log
pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.10</aspectj.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm"
--add-modules java.base ${argLine} -Xmx1024m -XX:MaxPermSize=256m
</argLine>
<systemPropertyVariables>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
<allure.link.issue.pattern>https://example.org/browse/{}</allure.link.issue.pattern>
<allure.link.tms.pattern>https://example.org/browse/{}</allure.link.tms.pattern>
</systemPropertyVariables>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>4.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tech.grasshopper</groupId>
<artifactId>extentreports-cucumber6-adapter</artifactId>
<version>2.6.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>pdfbox2-layout</artifactId>
<groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.8.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>4.8.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber4-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber4-jvm</artifactId>
<version>2.13.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-maven -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.13.0</version>
</dependency>
<!-- <dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>3.0.0-M4</version>
<type>pom</type>
</dependency>-->
</dependencies>
I got the below error while executing the command mvn clean test. Even though I changed the versions of the surefire plugin but still I'm facing the same error.
Error Log:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on pr
oject info: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\Sheik Mohammed\eclipse-workspace\info\target\surefire-reports for the individua
l test results.
**Error 1:**
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
**Error 2:**
[ERROR] ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
**Error 3:**
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java" "-javaagent:C:\Users\Sheik
Mohammed\.m2\repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" " -Dcucumber.options=--plu
gin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm" --add-modules java.base ${argLine} -Xmx1024m -XX:MaxPerm
Size=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647
270359642587079" 2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp
"
**Error 4:**
[ERROR] Error occurred in starting fork, check output in log
[ERROR] Process Exit Code: 1
[ERROR] **org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminate
d without properly saying goodbye. VM crash or System.exit called?**
[ERROR] Command was cmd.exe /X /C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java" "-javaagent:C:\Users\Sheik
Mohammed\.m2\repository/org/aspectj/aspectjweaver/1.8.10/aspectjweaver-1.8.10.jar" " -Dcucumber.options=--plu
gin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm" --add-modules java.base ${argLine} -Xmx1024m -XX:MaxPerm
Size=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647
270359642587079" 2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp
"
[ERROR] Error occurred in starting fork, check output in log
pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.10</aspectj.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
<forkedProcessExitTimeoutInSeconds>120</forkedProcessExitTimeoutInSeconds>
<forkCount>3</forkCount>
<reuseForks>true</reuseForks>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumber4jvm.AllureCucumber4Jvm"
--add-modules java.base ${argLine} -Xmx1024m -XX:MaxPermSize=256m
</argLine>
<systemPropertyVariables>
<allure.results.directory>${project.build.directory}/allure-results</allure.results.directory>
<allure.link.issue.pattern>https://example.org/browse/{}</allure.link.issue.pattern>
<allure.link.tms.pattern>https://example.org/browse/{}</allure.link.tms.pattern>
</systemPropertyVariables>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>4.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>tech.grasshopper</groupId>
<artifactId>extentreports-cucumber6-adapter</artifactId>
<version>2.6.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>pdfbox2-layout</artifactId>
<groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>4.1.2</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.8.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-testng -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>4.8.1</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>6.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber4-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber4-jvm</artifactId>
<version>2.13.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-maven -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.13.0</version>
</dependency>
<!-- <dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>3.0.0-M4</version>
<type>pom</type>
</dependency>-->
</dependencies>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
你可以试试这个:
将此代码添加到 pom.xml 的插件部分中
您可以看到此链接
https://programmerah.com/solved-there-are-test-failures-please-refer-to-djava_studyspringbootspringboot-sugon-3targetsurefire-reports-for-the-individual-test-results-28892/
You can try this:
Add this code in the plugins section of your pom.xml
You can see this link
https://programmerah.com/solved-there-are-test-failures-please-refer-to-djava_studyspringbootspringboot-sugon-3targetsurefire-reports-for-the-individual-test-results-28892/
解决方案 1:由于单元测试失败,我遇到了错误。要解决此错误,请检查失败的单元测试并确保其成功通过,因为修复测试将绕过该错误。
如果您的 Spring Boot 应用程序由于单元测试失败而遇到错误,最好的方法是识别并修复导致测试失败的问题。
识别失败的单元测试
解决方案 2:如果您因单元测试失败而遇到错误,并且您的 pom.xml 文件中包含此配置以跳过测试。
在您的 maven pom.xml 中添加插件
我希望这有帮助!如果您有任何疑问或者还有什么我可以帮助您的,请告诉我。
快乐编码!
Solution 1: I encountered an error due to a failed unit test. To resolve this error, please review the failed unit test and ensure that it passes successfully, as fixing the test will bypass the error.
If you are experiencing an error in your Spring Boot application due to a failed unit test, the best approach is to identify and fix the issue causing the test failure.
Identify the failed unit test
Solution 2: If you are facing an error due to a failed unit test and you have this configuration in your pom.xml file to skip the test.
Add the plugin in your maven pom.xml
I hope this helps! Let me know if you have any questions or if there's anything else I can assist you with.
Happy coding! ????????
我遇到了这个错误,它是由于单元测试失败而发生的。因此,您只需检查失败的单元测试并使其通过即可绕过此错误。
I had this error and it happened because of a failed unit test. So, you just need to check the failed unit test and make it pass to bypass this error.
尝试此命令:
示例
注意:它不会跳过任何测试用例。
Try this command:
Example
Note: it won't skip any test cases.
可以通过改变MVN的执行环境来解决这个问题。
尝试这个命令:
The problem can be solve by changing the environnement excecution of MVN.
Try this command: