I'm using testng maven and selenium to run my tests, currently I have the following testng.xml file
Looks like the problem is with the &listeners and &classes lines, If I replace those lines with the xml content that I have on the referenced files it runs fine. I have used this in a previous project and it worked fine, not sure why I'm getting this error.
<?xml version = "1.0" encoding = "UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" [
<!ENTITY listeners SYSTEM "listeners.xml">
<!ENTITY classes SYSTEM "classes.xml">
]>
<suite name="Local Execution" verbose="5">
&listeners;
<test name="Core Integration Tests" time-out="800000">
<groups>
<run>
<include name="failed"/>
</run>
</groups>
&classes;
</test>
</suite>
Listener.xml content is like
<listeners>
<listener class-name="com.myclass.Listeners.TestListener"/>
</listeners>
And classes file is
<classes>
<class name="com.orders.tc_class1"/>
<class name="com.orders.tc_class2"/>
</classes>
This is part of the error I'm getting
org.testng.TestNGException:
TestNG by default disables loading DTD from unsecure 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:102)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…