Hi,
I am getting the below warning when I try to run the TestNG.xml file.
Can you please help out.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="My Test Suite">
<groups>
<run>
<!-- <include name="smoke"></include> -->
<include name="sanity"></include>
<exclude name="smoke"></exclude>
</run></groups>
<listeners>
<listener class-name="listener.MyListener"></listener>
</listeners>
<suite-files>
<suite-file path="suitea.xml"></suite-file>
<suite-file path="suiteb.xml"></suite-file>
<suite-file path="suitec.xml"></suite-file>
</suite-files>
</suite>
Output for the above code-
[RemoteTestNG] detected TestNG version 7.4.0
[TestNG] [WARN] Ignoring duplicate listener : listener.MyListener
[TestNG] [WARN] Ignoring duplicate listener : listener.MyListener
[TestNG] [WARN] Ignoring duplicate listener : listener.MyListener
===============================================
Suite A
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
===============================================
===============================================
Suite B
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
===============================================
===============================================
Suite C
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
===============================================
===============================================
My Test Suite
Total tests run: 0, Passes: 0, Failures: 0, Skips: 0
===============================================
Thanks
Instructor
Ashish Thakur Replied on 21/03/2022
Please define listener in suite xml files
Thanks Ashish sir for the help, it is working fine now.