Skip to content

Commit

Permalink
add support for testng 7.1 (via #422)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillbilchenko authored Feb 18, 2020
1 parent 6565635 commit 435a4c0
Showing 1 changed file with 4 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.testng.IClass;
import org.testng.IConfigurationListener;
import org.testng.IInvokedMethod;
import org.testng.IInvokedMethodListener2;
import org.testng.IInvokedMethodListener;
import org.testng.ISuite;
import org.testng.ISuiteListener;
import org.testng.ITestClass;
Expand Down Expand Up @@ -102,7 +102,7 @@
public class AllureTestNg implements
ISuiteListener,
ITestListener,
IInvokedMethodListener2,
IInvokedMethodListener,
IConfigurationListener {

private static final Logger LOGGER = LoggerFactory.getLogger(AllureTestNg.class);
Expand Down Expand Up @@ -367,13 +367,8 @@ public void onTestFailedButWithinSuccessPercentage(final ITestResult result) {

@Override
public void beforeInvocation(final IInvokedMethod method, final ITestResult testResult) {
//do nothing
}

@Override
public void beforeInvocation(final IInvokedMethod method, final ITestResult testResult,
final ITestContext context) {
final ITestNGMethod testMethod = method.getTestMethod();
final ITestContext context = testResult.getTestContext();
if (isSupportedConfigurationFixture(testMethod)) {
ifSuiteFixtureStarted(context.getSuite(), testMethod);
ifTestFixtureStarted(context, testMethod);
Expand All @@ -382,6 +377,7 @@ public void beforeInvocation(final IInvokedMethod method, final ITestResult test
}
}


private void ifSuiteFixtureStarted(final ISuite suite, final ITestNGMethod testMethod) {
if (testMethod.isBeforeSuiteConfiguration()) {
startBefore(getUniqueUuid(suite), testMethod);
Expand Down Expand Up @@ -468,12 +464,6 @@ private FixtureResult getFixtureResult(final ITestNGMethod method) {

@Override
public void afterInvocation(final IInvokedMethod method, final ITestResult testResult) {
//do nothing
}

@Override
public void afterInvocation(final IInvokedMethod method, final ITestResult testResult,
final ITestContext context) {
final ITestNGMethod testMethod = method.getTestMethod();
if (isSupportedConfigurationFixture(testMethod)) {
final String executableUuid = currentExecutable.get();
Expand Down

0 comments on commit 435a4c0

Please sign in to comment.