testng error while running xml file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

testng error while running xml file

sridevi
<!DOCTYPE suite SYSTEM " http://TestNG.org/TestNG-1.0.dtd ">
<suite name="Yahoo" verbose="1">
<test name="Yahoo Mail Test">
<classes>
<class name="YahooTest.java"/>
</classes>
</test>
<test name="Yahoo news Test">
<classes>
<class name="YahooNewsTest.java"/>
</classes>
</test>
</suite>

While run the above xml file in testng suite getting below error


org.testng.TestNGException: java.net.UnknownHostException: TestNG.org
        at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:341)
        at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.net.UnknownHostException: TestNG.org
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.testng.xml.XMLParser.parse(XMLParser.java:39)
        at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
        at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
        at org.testng.xml.Parser.parse(Parser.java:168)
        at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
        ... 3 more


Any one can help me

Thanks in advance
Reply | Threaded
Open this post in threaded view
|

Re: testng error while running xml file

⇜Krishnan Mahadevan⇝
Can you please try replacing : <!DOCTYPE suite SYSTEM &quot; http://TestNG.org/TestNG-1.0.dtd &quot;>

with <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
and see if that helps ?

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


On Tue, Oct 29, 2013 at 12:56 PM, sridevi <[hidden email]> wrote:
<!DOCTYPE suite SYSTEM &quot; http://TestNG.org/TestNG-1.0.dtd &quot;>
<suite name="Yahoo" verbose="1">
<test name="Yahoo Mail Test">
<classes>
<class name="YahooTest.java"/>
</classes>
</test>
<test name="Yahoo news Test">
<classes>
<class name="YahooNewsTest.java"/>
</classes>
</test>
</suite>

While run the above xml file in testng suite getting below error


org.testng.TestNGException: java.net.UnknownHostException: TestNG.org
        at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:341)
        at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
        at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.net.UnknownHostException: TestNG.org
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown
Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown
Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at org.testng.xml.XMLParser.parse(XMLParser.java:39)
        at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
        at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
        at org.testng.xml.Parser.parse(Parser.java:168)
        at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:311)
        ... 3 more


Any one can help me

Thanks in advance
<http://testng.1065351.n5.nabble.com/file/n18977/testng.png>



--
View this message in context: http://testng.1065351.n5.nabble.com/testng-error-while-running-xml-file-tp18977.html
Sent from the testng-users mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: testng error while running xml file

sridevi
Thank you very much. Its working