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

Tuesday, May 1

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


Today I have faced problem 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>

When I run the above TestNG XML file I got bellow 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.

Solution to the above problem is very simple. Replace the "&" symbol with "&amp;"

I have changed my XML file like below and it was successed.

<!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&amp;tab=w8"/>
  <test name="checking the Google play">
    <classes>
       <class name="com.google.play.UrlVerification"/>
    </classes>
  </test>
</suite>

No comments:

Post a Comment