Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/main/java/com/seleniumboot/cucumber/CucumberHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ private static void abortQuarantinedScenario(String reason) {
}
}

/** Heuristic: a TestNG result is current only on a TestNG thread. Cucumber launched from inside a TestNG test is treated as TestNG. */
private static boolean isTestNgExecution() {
try {
return org.testng.Reporter.getCurrentTestResult() != null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.seleniumboot.unit;

import com.seleniumboot.cucumber.CucumberHooks;
import com.seleniumboot.internal.SeleniumBootContext;
import com.seleniumboot.quarantine.QuarantineLoader;
import io.cucumber.java.Before;
import io.cucumber.java.Scenario;
Expand Down Expand Up @@ -159,7 +158,6 @@ public void checkQuarantine_notQuarantined_doesNotThrow() throws Exception {
public static class QuarantineStepDefinitions {
@Before("@quarantine")
public void beforeScenario(Scenario scenario) {
CucumberHooks hooks = new CucumberHooks();
// In a real run, Cucumber invokes hooks; here we directly invoke quarantine check
try {
Method m = CucumberHooks.class.getDeclaredMethod("checkCucumberQuarantine", Scenario.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.seleniumboot.hooks.ExecutionHook;
import com.seleniumboot.hooks.HookRegistry;
import com.seleniumboot.junit5.SeleniumBootLauncherListener;
import com.seleniumboot.precondition.BaseConditions;
import com.seleniumboot.precondition.PreConditionRegistry;
import com.seleniumboot.testmanagement.TestManagementReporter;
import org.testng.annotations.AfterMethod;
Expand Down
Loading