gpt4 book ai didi

maven - 如何修复转储文件(如果存在)[date].dump、[date]-jvmRun[N].dump 和 [date].dumpstream。在使用 maven surefire 插件 3.0.0-M4 时

转载 作者:行者123 更新时间:2023-12-02 01:43:14 25 4
gpt4 key购买 nike

执行命令 mvn clean test 时出现以下错误。即使我更改了 surefire 插件的版本,但我仍然面临同样的错误。

错误日志:[错误] 无法在 pr 上执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test)项目信息:有测试失败。[错误][ERROR] 个人信息请引用C:\Users\Sheik Mohammed\eclipse-workspace\info\target\surefire-reportsl 测试结果。错误 1:[错误] 请引用转储文件(如果存在)[date].dump、[date]-jvmRun[N].dump 和 [date].dumpstream。错误 2:[错误] ExecutionException fork 的 VM 没有正确说再见就终止了。 VM 崩溃或调用 System.exit?错误 3:[错误] 命令是 cmd.exe/X/C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java""-javaagent:C:\Users\SheikMohammed.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:MaxPermSize=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647270359642587079"2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp“错误 4:[ERROR] 启动 fork 时出错,检查日志中的输出[错误] 进程退出代码:1[错误] org.apache.maven.surefire.booter.SurefireBooterForkException:ExecutionException fork 的 VM 终止d 没有正确地说再见。 VM 崩溃或调用了 System.exit?[错误] 命令是 cmd.exe/X/C ""C:\Program Files\Java\jdk1.8.0_311\jre\bin\java""-javaagent:C:\Users\SheikMohammed.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:MaxPermSize=256m org.apache.maven.surefire.booter.ForkedBooter "C:\Users\Sheik Mohammed\AppData\Local\Temp\surefire8647270359642587079"2022-02-27T09-33-26_575-jvmRun1 surefire8833373504517140594tmp surefire_08041519546226636871tmp“[ERROR] 启动fork时出错,检查日志输出

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>

最佳答案

你可以试试这个:在 pom.xml 的插件部分添加此代码

<plugin>  
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>

你可以看到这个链接 https://programmerah.com/solved-there-are-test-failures-please-refer-to-djava_studyspringbootspringboot-sugon-3targetsurefire-reports-for-the-individual-test-results-28892/

关于maven - 如何修复转储文件(如果存在)[date].dump、[date]-jvmRun[N].dump 和 [date].dumpstream。在使用 maven surefire 插件 3.0.0-M4 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71282385/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com