Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Klov Not attaching to one Reporter? #65

Open
awang101 opened this issue Aug 24, 2020 · 2 comments
Open

Klov Not attaching to one Reporter? #65

awang101 opened this issue Aug 24, 2020 · 2 comments

Comments

@awang101
Copy link

awang101 commented Aug 24, 2020

image

We run tests via parallel in our testNG,

We attempt to connect to method that starts klov/extent reporter via

	public void beforeSuite() {

		synchronized (lock) {
            if (!initialised) {
                startResult();
                initialised = true;
            }
	}

However, we still see Klov being attached to multiple views although they have same report # 3

Best

@spbrantan
Copy link

spbrantan commented Aug 25, 2020

Basically you want all the parallel run results flushed to a single launch. Let say into launch #1167..
I am also looking for the same

@filipwoz
Copy link

Hi, I got it working similarly as in your code by keeping ExtentReports, ExtentKlovReporter & ExtentSparkReporter static:

private static ExtentReports extent = null;
private static ExtentKlovReporter klovReporter = null;
private static ExtentSparkReporter htmlReporter = null;

and initializing them only once when they are still null:

public synchronized static ExtentReports getReporter() {
if (extent == null)
extent = new ExtentReports();
return extent;
}

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

No branches or pull requests

3 participants