Getting error while executing suite-files in testng.xml file. | Selenium Forum
P
pratyush Posted on 18/06/2023

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Suite">
<Suite-files>
<suite-file path="suitA.xml"/>
<suite-file path="suitB.xml"/>
</Suite-files>
</suite> <!-- Suite -->

 

Compilation error :

[RemoteTestNG] detected TestNG version 7.0.0
org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 4; columnNumber: 15; Element type "Suite-files" must be declared.

 

independently both suitA.xml and suitB.xml giving me correct results. Attached screenshot for reference.


P
pratyush Replied on 18/06/2023

hello Ashish, please ignore.

 

Issue resolved now. Used Caps S in <Suite-files>.. requried <suite-files>.


P
pratyush Replied on 18/06/2023

I think , testNG error statement would be more approriate if we get like :

Element type "suite-files" must be declared. OR Element type "Suite-files" is not valid.

in place of , Element type "Suite-files" must be declared.

:)