运行就报错,testng下载导入都是成功的
来源:5-3 注解实战@Test标签

woshiyu
2020-09-06
org.testng.TestNGException:
TestNG by default disables loading DTD from unsecured Urls. If you need to explicitly load the DTD from a http url, please do so by using the JVM argument [-Dtestng.dtd.http=true]
at org.testng.xml.TestNGContentHandler.resolveEntity(TestNGContentHandler.java:115)
写回答
2回答
-
rkniu
2020-11-06
Run > Edit Configurations ->对应的configuration下的'VM options' 更改为'-ea -Dtestng.dtd.http=true'
我这边亲试已经PASS。
然后还要设置下Edit Templates的TestNG里的VM options参数,不然每次在代码行运行还是会一样的错误出现
10 -
大周
2020-09-07
TestNG by default disables loading DTD from unsecured Urls.
这句话说的是你的testng配置文件里边加载了不安全的url,你把配置文件中最上边的那行DTD限制去掉试一下。 就这个这个配置文件的事儿。
032020-11-06
相似问题