org.testng.TestNGException: java.net.UnknownHostException: testng.org
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:320)
at org.testng.remote.AbstractRemoteTestNG.initialize(AbstractRemoteTestNG.java:137)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:98)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.net.UnknownHostException: testng.org
本人刚刚接触自动化测试没有多久,有一次运行自动化测试脚本的时候一直报这个错误,检查了好久才发现原来是没有联网造成的,希望能给别的小白带来帮助
本文分享了一次自动化测试中遇到的网络异常问题及解决过程,揭示了测试脚本因未联网而引发的UnknownHostException错误,为新手提供了宝贵的实战经验。

2200

被折叠的 条评论
为什么被折叠?



