i wanted all my previous reports available along with latest report but its overwriting report every time test gets executed. please fix this issue its very much required feature for me.
@CucumberOptions(
plugin = "com.cucumber.listener.ExtentCucumberFormatter:testresults/Test_Results.html",
features ="src/test/java/features",
tags = "@rest1")
public class Runner extends AbstractTestNGCucumberTests {
@BeforeClass
public static void setup() throws IOException{
}
@AfterClass
public static void TearDown() throws InterruptedException {
Reporter.loadXMLConfig(new File("src/test/resources/extent-config.xml"));
Reporter.setSystemInfo("user", System.getProperty("user.name"));
Reporter.setSystemInfo("OS", "Windows 7");
Reporter.setSystemInfo("Environment","Demo");
Reporter.setTestRunnerOutput("Smoke Test Execution");
**Reporter.getExtentHtmlReport().setAppendExisting(true);**
}
}
In Step Definitions:
@Given("^I construct url \"([^\"]*)\" with baseURL$")
public void I_construct_url_with_baseURL(String strApiUrl) throws Throwable {
strBaseUrl = strBaseUrl+strApiUrl;
Reporter.addStepLog("url is constructed with base url and final"
+ " url is : "+"\n '"+strBaseUrl+"'");
}
Hi
i wanted all my previous reports available along with latest report but its overwriting report every time test gets executed. please fix this issue its very much required feature for me.
below is my test runner class:
package com.cgi.in;
import java.io.File; import java.io.IOException; import java.util.Date;
import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass;
import com.cucumber.listener.Reporter;
import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests;
@CucumberOptions( plugin = "com.cucumber.listener.ExtentCucumberFormatter:testresults/Test_Results.html", features ="src/test/java/features", tags = "@rest1") public class Runner extends AbstractTestNGCucumberTests {
In Step Definitions: