Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Reports gets appends instead of separate file for each suite #118

Open
balakumarmanoharan opened this issue Mar 3, 2020 · 0 comments
Open

Comments

@balakumarmanoharan
Copy link

balakumarmanoharan commented Mar 3, 2020

I am currently running multiple cucumber runner classes via testng.run() option using multi threading.

Runner1.class:
```
@CucumberOptions(features={"src//test//java//features"},
glue = {"stepdefinition"},
tags = {"@Login,"},
plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/Reports1.html"},
monochrome = true)

@Test
public class Runner1 extends AbstractTestNGCucumberTests
	{
		@AfterClass
		public static void writeExtentReport() throws Exception 
			{
				RunCucumberTests rct = new RunCucumberTests();
				rct.writeExtentReports();
				//Reporter.loadXMLConfig(SignInInterface.HomePath+"/extent-config.xml");
			}
	}

Runner2.class:
       ```
@CucumberOptions(features={"src//test//java//features"},
				 glue = {"stepdefinition"},
				tags = {"@Login,"},
				 plugin = { "com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/Reports2.html"},
				 monochrome = true)
					
	@Test
	public class Runner2 extends AbstractTestNGCucumberTests
		{
			@AfterClass
			public static void writeExtentReport() throws Exception 
				{
					RunCucumberTests rct = new RunCucumberTests();
					rct.writeExtentReports();
					//Reporter.loadXMLConfig(SignInInterface.HomePath+"/extent-config.xml");
				}
		}

Now I want separate reports for each runner class as mentioned Report1.html and Report2.html.

But what is happening right now is, Runner2.class results gets appends to Report1.html itself. There is not separate report.

I suspect this is due to static variables in ExtentCucumberFormatter.java and other listeners.

Kindly help me to get separate reports.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant