Unable to understand error in testng.xml | Selenium Forum
P
Pravin V. Kumbhare Posted on 20/08/2020

I'm practicing the grouping of Tests in TestNG framework. On running the testng.xml file, I get the exception as below

org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 4; The element type "suite" must be terminated by the matching end-tag "</suite>".

This exception tells that the <suite> tag in my xml is not terminated, but that is not the actual case.

Below is my testng.xml, where all the tags are correctly terminated.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Test Suite Main">
<groups>
<run>
<include name="smoke" />
</run>
</groups>

<listeners>
<listener class-name="listeners.CustomListener" />
</listeners>

<suite-files>
<suite-file path="suitea.xml" />
<suite-file path="suiteb.xml" />
<suite-file path="suitec.xml" />
</suite-files>

</suite>
<!-- Default suite -->

 

I don't understand what exactly the issue is. Please help.


A
Ashish Replied on 22/08/2020

This file looks good. I hope its saved. At times we dont save it and try to run, we face issues

 


P
Pravin V. Kumbhare Replied on 24/08/2020

The file is saved.

Tried multiple times, also restarted Eclipse couple of times.


Related Posts