package com.codeborne.selenide.testng;

import com.codeborne.selenide.logevents.*;
import org.testng.*;

/**
 * Reports for every test method in the suite
 * Annotate any test class in your suite with {@code @Listeners({GlobalTextReport.class})}
 *
 * @since Selenide 3.6
 * <p>
 * Use either {@link TextReport} or {@link GlobalTextReport}, never both
 */
public class GlobalTextReport implements IInvokedMethodListener {
	protected SimpleReport report = new SimpleReport();

	@Override
	public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
		report.start();
	}

	@Override
	public void afterInvocation(IInvokedMethod method, ITestResult testResult) {
		report.finish(testResult.getName());
	}


}

@@ -73,17 +73,104 @@
 gevents.
-*
+SimpleReport;%0Aimport org.testng.IInvokedMethod;%0Aimport org.testng.IInvokedMethodListener
 ;%0Aimport
@@ -181,17 +181,27 @@
 .testng.
-*
+ITestResult
 ;%0A%0A/**%0A 
@@ -512,17 +512,18 @@
 tener %7B%0A
-%09
+  
 protecte
@@ -567,17 +567,18 @@
 ort();%0A%0A
-%09
+  
 @Overrid
@@ -571,33 +571,34 @@
 );%0A%0A  @Override%0A
-%09
+  
 public void befo
@@ -655,26 +655,28 @@
 stResult) %7B%0A
-%09%09
+    
 report.start
@@ -683,13 +683,15 @@
 ();%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 @Ove
@@ -696,17 +696,18 @@
 verride%0A
-%09
+  
 public v
@@ -779,10 +779,12 @@
 ) %7B%0A
-%09%09
+    
 repo
@@ -820,11 +820,10 @@
 ));%0A
-%09%7D%0A%0A
+  %7D
 %0A%7D%0A

fix formatting