【问题标题】:org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetorg.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径
【发布时间】:2019-10-15 19:14:46
【问题描述】:

我在运行 testng 套件时遇到了错误,但是当我运行单个 testng 时,测试它的运行没有错误

org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: 无法找到请求目标的有效认证路径

org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效证书路径 在 org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325) 在 org.testng.remote.AbstractRemoteTestNG.initialize(AbstractRemoteTestNG.java:136) 在 org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97) 在 org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) 在 org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

【问题讨论】:

标签: testng


【解决方案1】:

使用这个 xml 标头:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

而不是官方的:

<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >

【讨论】:

  • 你能告诉我在哪里可以找到这个文件吗?我无法在 src/test/resources 或任何地方找到该文件。
猜你喜欢
  • 2021-12-04
  • 2015-02-13
  • 2021-06-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多