TestNG error: The reference to entity "tab" must end with the ';' delimiter.

03 January, 2014
While running the below TestNg XML file:

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
<suite name="testing test suite">
 <parameter name="googlePlayUrl" value="https://play.google.com/store?hl=en&tab=w8"/>
   <test name="checking the Google play">
    < classes>
     < class name="com.google.play.UrlVerification"/>
    </classes>
   </test>
</suite>


I got the below error:

org.testng.TestNGException: org.xml.sax.SAXParseException: The reference to entity "tab" must end with the ';' delimiter.
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:335)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:88)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:202)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:173)
Caused by: org.xml.sax.SAXParseException: The reference to entity "tab" must end with the ';' delimiter.


The solution to this error is very simple. Replace the "&" symbol with "&"

I changed my XML file as below and the error was resolved. Modified TestNG XML file:

<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
<suite name="testing test suite">
 <parameter name="googlePlayUrl" value="https://play.google.com/store?hl=en&tab=w8"/>
   <test name="checking the Google play">
    <classes>
     <class name="com.google.play.UrlVerification"/>
    </classes>
   </test>
</suite>

No comments:

Post a Comment