email2vimalraj/CucumberExtentReporter

Issue with extent report with gradle, cucumber-spring

Closed this issue · 4 comments

Hi Vimalraj,

For our project, we are using cucumber-spring framework. I am able to execute the project and all the scripts are executed successfully but no extent report is generated. Please help me to find out what is missing in this and why the report is not generated

compile 'com.sitture:cucumber-jvm-extentreport:3.1.0' have added under the dependency
classpath "com.sitture:cucumber-jvm-extentreport:3.1.0" as classpath

Have added extent-config.xml under src->resources folder
Have added plugin as
@CucumberOptions(features = "classpath:features", glue = "",
plugin = "com.sitture.ExtentFormatter:/build/reports/cucumber/extent-report/extent.html")
Under the Runner class

ExtentReporter.setConfig(new File("/src/test/resources/extent-config.xml"));

Vimal, It would be really helpful to me if you can respond on this issue

It seems like the paths you are providing are not correct. You are providing /build/reports/cucumber/extent-report/extent.html as path to the reports to be stored. When beginning with a / you are telling your program to store it in the file systems root directory. Try build/reports/cucumber/extent-report/extent.html. The same applies to your config file: Try src/test/resources/extent-config.xml instead of /src/test/resources/extent-config.xml

I corrected it later and now I am getting the below error
cucumber.runtime.CucumberException: Couldn't load plugin class: com.cucumber.listenerener.ExtentCucumberFormatter

@Udhay1316 : What is com.sitture.ExtentFormatter? I guess you reached out to wrong repo. Kindly file an issue in the respective repo. Thanks.