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

Test ng 7.1 #422

Merged
merged 7 commits into from
Feb 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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