Package io.karatelabs.core
Class FeatureRuntime
java.lang.Object
io.karatelabs.core.FeatureRuntime
- All Implemented Interfaces:
Callable<FeatureResult>
-
Constructor Summary
ConstructorsConstructorDescriptionFeatureRuntime(Suite suite, Feature feature) FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg) FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg, String callTagSelector) FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg, String callTagSelector, Set<Integer> callLineFilters) FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, Map<String, Object> callArg) FeatureRuntime(Feature feature) -
Method Summary
Modifier and TypeMethodDescriptioncall()intintgetSuite()booleanisCalled()The inverse ofisTopLevel()— true when this feature was reached via call/callonce from another feature.booleanbooleanA top-level feature is one executed directly (as a root feature), not via call/callonce.static FeatureRuntimestatic FeatureRuntimeio.karatelabs.common.ResourcevoidsetLoopIndex(int loopIndex)
-
Constructor Details
-
FeatureRuntime
-
FeatureRuntime
-
FeatureRuntime
-
FeatureRuntime
public FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg) -
FeatureRuntime
public FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg, String callTagSelector) -
FeatureRuntime
public FeatureRuntime(Suite suite, Feature feature, FeatureRuntime caller, ScenarioRuntime callerScenario, boolean sharedScope, Map<String, Object> callArg, String callTagSelector, Set<Integer> callLineFilters)
-
-
Method Details
-
getCallDepth
public int getCallDepth() -
isTopLevel
public boolean isTopLevel()A top-level feature is one executed directly (as a root feature), not via call/callonce. This is the canonical "not a called feature" predicate — many behaviours (result-listener notifications, locking, line filters, after-feature hooks, abort handling) are gated to top-level features only. Note that suite-level concerns additionally requiresuite != null; standalone usage has no suite but is still top-level. -
isCalled
public boolean isCalled()The inverse ofisTopLevel()— true when this feature was reached via call/callonce from another feature. -
of
-
of
-
call
- Specified by:
callin interfaceCallable<FeatureResult>
-
resolve
-
getSuite
-
getFeature
-
getCaller
-
getCallerScenario
-
getCallArg
-
getLoopIndex
public int getLoopIndex() -
setLoopIndex
public void setLoopIndex(int loopIndex) -
getLastExecuted
-
getResult
-
getCallOnceLock
-
getCallOnceCache
-
getSetupOnceCache
-