Skip to content

Klov Not attaching to one Reporter? #65

Open

Description

@awang101

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

Activity

  1. spbrantan commented on Aug 25, 2020

    @spbrantan

    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

  2. filipwoz commented on Jan 26, 2021

    @filipwoz

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions