org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径 [英] org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

查看:66
本文介绍了org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 testng 套件时出现错误,但是当我运行单个 testng 测试时,它的运行没有错误

I am running the testng suite getting the error, but when i am running single testng test its running without error

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

org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

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)

org.testng.TestNGException: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:325) at org.testng.remote.AbstractRemoteTestNG.initialize(AbstractRemoteTestNG.java:136) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:97) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

推荐答案

使用这个 xml 标头:

use this xml header:

<?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" >

这篇关于org.testng.TestNGException:sun.security.provider.certpath.SunCertPathBuilderException:无法找到请求目标的有效认证路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆