extent-framework / extentreports-cucumber4-adapter

Cucumber4 Adapter for Extent Framework
http://extentreports.com/docs/versions/4/java/cucumber2.html
Apache License 2.0
39 stars 22 forks source link

Extent-report folder is not generating #36

Closed mounikaakuthota12 closed 4 years ago

mounikaakuthota12 commented 4 years ago

Hi, I am facing the same issue, it does not create extent report folder under test-output.Below is my extent dependency in pom.xml file

4.2.0 3.141.59 1.2.1 1.7.21 4.7.2 2.7.0 1.3.2 3.4 1.18.8 3.2.0 7.0.0 1.6 2.22.2 1.6.0 3.1.0 3.8.1 4.8.0 6.14.2 UTF-8 2.5 1.8 5.1.6 2.6.3

org.apache.maven.plugins maven-compiler-plugin ${maven-compiler-plugin} ${utf-8} ${java-version} ${java-version} org.apache.maven.plugins maven-surefire-plugin ${maven-surefire-plugin} test test test 4 true 4 false -Duser.language=en -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 false ${testToRun} true org.codehaus.mojo exec-maven-plugin ${mojo-exec-maven-plugin} test java com.cbs.test.ReportMerger target/cucumber-report/ org.apache.maven.plugins maven-resources-plugin ${maven-resource-plugin} ${utf-8} src/main/resources true net.masterthought maven-cucumber-reporting ${maven-cucumber-reporting} execution test generate cucumbertests target/cucumber-report/cucumber-html-reports target/cucumber-report **/*cucumber.json src/main/resources true com.aventstack extentreports-cucumber4-adapter 1.0.7 io.cucumber cucumber-java io.cucumber cucumber-core io.cucumber cucumber-java8 ${cucumber.version} io.cucumber cucumber-testng ${cucumber.version} test And the runner class where I have the extent pluigin package com.cbs.test; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; //import cucumber.api.CucumberOptions; //import cucumber.api.testng.AbstractTestNGCucumberTests; @CucumberOptions(features = "target/test-classes", tags = { "@MobileSA" }, monochrome = true, plugin = { "pretty", "html:target/cucumber-report/webapp", "json:target/cucumber-report/webapp/cucumber.json", "rerun:target/cucumber-report/webapp/rerun.txt", "com.aventstack.extentreports.cucumber.adapter.ExtentCucumberAdapter:" }, glue = { "com.cbs.test.framework.hooks", "com.cbs.test.step_definitions.mobile" }) public class RunAndroidAppSuite extends AbstractTestNGCucumberTests { public RunAndroidAppSuite() { DriverObject.android(); } } extent.properties: extent.reporter.html.start=true extent.reporter.logger.start=true extent.reporter.spark.start=true extent.reporter.html.config=src/test/resources/extent-config.xml extent.reporter.logger.config=src/test/resources/extent-config.xml extent.reporter.spark.config=src/test/resources/extent-config.xml extent.reporter.html.out=test-output/HtmlReport/ExtentHtml.html extent.reporter.logger.out=test-output/Logger extent.reporter.spark.out=test-output/Spark screenshot.dir=test-output/HtmlReport/ Could you please look into the issue? --
thomasdeurloo commented 4 years ago

is it running your tests correctly? if yes, then maybe it is not loading the properties. you can try to set the properties in the system properties instead of a properties file. add somethings like this in your testrunner:

public class RunAndroidAppSuite extends AbstractTestNGCucumberTests {

@BeforeClass
public static void startExtentReport() {
    System.setProperty("extent.reporter.html.start", "true");
    System.setProperty("extent.reporter.html.out", "test-output/HtmlReport/ExtentHtml.html");
}

public RunAndroidAppSuite() {
DriverObject.android();
}
}

Does that make any difference?

anshooarora commented 4 years ago

I am marking this issue as invalid. Please format your question properly so its easily read. Feel free to open a new ticket if the issue still persists, thank you.