Closed sseenivasan89 closed 4 years ago
@sseenivasan89 Can you create a small repo and share? There is an example here which you can refer to as well.
Hi Sir, i was able to get report when i run test from class file since i used @Listeners in class file, but if i add @Listeners in testng.xml file and try to run, getting below error and here is the repo which i tried
Error : Listener Extent.Adapter.ExtentIReporterSuiteClassAdapter was not found in project's classpath
Thanks for pointing this one out, I was able to reproduce and the path to the listener was invalid. You can use any one of below (with the correct package name):
<listeners>
<listener class-name="com.aventstack.extentreports.testng.listener.ExtentITestListenerClassAdapter" />
</listeners>
<listeners>
<listener class-name="com.aventstack.extentreports.testng.listener.ExtentITestListenerAdapter" />
</listeners>
<listeners>
<listener class-name="com.aventstack.extentreports.testng.listener.ExtentIReporterSuiteClassListenerAdapter" />
</listeners>
<listeners>
<listener class-name="com.aventstack.extentreports.testng.listener.ExtentIReporterSuiteListenerAdapter" />
</listeners>
Thanks @anshooarora sir now i able to run successfully 👍
I have added ExtentITestListenerClassAdapter listener (below line) to my testng-xml suite file and when i ran got error (last line) listener class-name="com.aventstack.extentreports.adapter.listener.ExtentITestListenerClassAdapter" i just added extentreports-testng-adapter dependency to pom file and placed both extent.properties and config.xm file in src/test/resources folder, am i missing anything ?
**Error : Listener com.aventstack.extentreports.adapter.listener.ExtentITestListenerClassAdapter was not found in project's classpath**