gpt4 book ai didi

java - 带有 SureFire 插件的 Maven TestNG : unable to find valid certification path to requested target

转载 作者:行者123 更新时间:2023-11-29 04:07:17 25 4
gpt4 key购买 nike

我正在尝试使用 TestNG Maven 和 SureFire 插件调整我的测试,但出现以下错误

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.20:test (default-test) on project Demo: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\ihorh\Workspace\Demo\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] There was an error in the forked process
[ERROR] sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:665)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)

......

如果我在没有 maven(只有 test.ng 文件)的情况下运行,一切都会成功。或者,如果我从 pom.xml 中删除以下 block :

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>

最佳答案

我遇到了完全相同的问题,但我在尝试运行 testng.xml 文件时也遇到了问题。我删除了以下行: <!DOCTYPE 套件系统“https://testng.org/testng-1.0.dtd”>

这似乎解决了问题。

关于java - 带有 SureFire 插件的 Maven TestNG : unable to find valid certification path to requested target,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57836499/

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