3939import org .testng .IClass ;
4040import org .testng .IConfigurationListener ;
4141import org .testng .IInvokedMethod ;
42- import org .testng .IInvokedMethodListener2 ;
42+ import org .testng .IInvokedMethodListener ;
4343import org .testng .ISuite ;
4444import org .testng .ISuiteListener ;
4545import org .testng .ITestClass ;
102102public class AllureTestNg implements
103103 ISuiteListener ,
104104 ITestListener ,
105- IInvokedMethodListener2 ,
105+ IInvokedMethodListener ,
106106 IConfigurationListener {
107107
108108 private static final Logger LOGGER = LoggerFactory .getLogger (AllureTestNg .class );
@@ -367,13 +367,8 @@ public void onTestFailedButWithinSuccessPercentage(final ITestResult result) {
367367
368368 @ Override
369369 public void beforeInvocation (final IInvokedMethod method , final ITestResult testResult ) {
370- //do nothing
371- }
372-
373- @ Override
374- public void beforeInvocation (final IInvokedMethod method , final ITestResult testResult ,
375- final ITestContext context ) {
376370 final ITestNGMethod testMethod = method .getTestMethod ();
371+ final ITestContext context = testResult .getTestContext ();
377372 if (isSupportedConfigurationFixture (testMethod )) {
378373 ifSuiteFixtureStarted (context .getSuite (), testMethod );
379374 ifTestFixtureStarted (context , testMethod );
@@ -382,6 +377,7 @@ public void beforeInvocation(final IInvokedMethod method, final ITestResult test
382377 }
383378 }
384379
380+
385381 private void ifSuiteFixtureStarted (final ISuite suite , final ITestNGMethod testMethod ) {
386382 if (testMethod .isBeforeSuiteConfiguration ()) {
387383 startBefore (getUniqueUuid (suite ), testMethod );
@@ -468,12 +464,6 @@ private FixtureResult getFixtureResult(final ITestNGMethod method) {
468464
469465 @ Override
470466 public void afterInvocation (final IInvokedMethod method , final ITestResult testResult ) {
471- //do nothing
472- }
473-
474- @ Override
475- public void afterInvocation (final IInvokedMethod method , final ITestResult testResult ,
476- final ITestContext context ) {
477467 final ITestNGMethod testMethod = method .getTestMethod ();
478468 if (isSupportedConfigurationFixture (testMethod )) {
479469 final String executableUuid = currentExecutable .get ();
0 commit comments