Listeners are fetching some issues | Selenium Forum
M
Posted on 19/07/2016
Hi,

I am trying simple program for custom report

My custom report class is :
package CustomReports;

import java.util.List;

import org.testng.IReporter;
import org.testng.ISuite;
import org.testng.xml.XmlSuite;

public class CustomeReporter implements IReporter{

@Override
public void generateReport(List<XmlSuite> xmlSuites, List<ISuite> suites, String outputDirectory) {

System.out.println("*********Insite Custom Reporter************");

/*for(int suiteno=0;suiteno<=suites.size();suiteno++)
{
ISuite CurrentTestSuite = suites.get(suiteno);
System.out.println("Test Suite Name --> "+ CurrentTestSuite.getName());
System.out.println(CurrentTestSuite.getResults());
}*/

}

My Suite testng.xml is
<suite name="Simple Reporter Suite">
<listeners>
<listener class-name="CustomReports.CustomReporter"/>
</listeners>


<suite-files>
<suite-file path = "./SuiteA.xml"/>
<suite-file path = "./SuiteB.xml"/>
</suite-files>

</suite>

if i am taking out the listener plugin then its working fine. If i am keeping this listener plugin then getting error "org.testng.TestNGException:
Listener CustomReports.CustomReporter was not found in project's classpath"

Please help me here to resolve this issues. i tried my best but no luck..

M
Replied on 20/07/2016

try

CustomReports.CustomReporter.java