Class FeatureRuntime

java.lang.Object
io.karatelabs.core.FeatureRuntime
All Implemented Interfaces:
Callable<FeatureResult>

public class FeatureRuntime extends Object implements Callable<FeatureResult>
  • Constructor Details

  • 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 require suite != null; standalone usage has no suite but is still top-level.
    • isCalled

      public boolean isCalled()
      The inverse of isTopLevel() — true when this feature was reached via call/callonce from another feature.
    • of

      public static FeatureRuntime of(Feature feature)
    • of

      public static FeatureRuntime of(Suite suite, Feature feature)
    • call

      public FeatureResult call()
      Specified by:
      call in interface Callable<FeatureResult>
    • resolve

      public io.karatelabs.common.Resource resolve(String path)
    • getSuite

      public Suite getSuite()
    • getFeature

      public Feature getFeature()
    • getCaller

      public FeatureRuntime getCaller()
    • getCallerScenario

      public ScenarioRuntime getCallerScenario()
    • isSharedScope

      public boolean isSharedScope()
    • getCallArg

      public Map<String,Object> getCallArg()
    • getLoopIndex

      public int getLoopIndex()
    • setLoopIndex

      public void setLoopIndex(int loopIndex)
    • getLastExecuted

      public ScenarioRuntime getLastExecuted()
    • getResult

      public FeatureResult getResult()
    • getCallOnceLock

      public ReentrantLock getCallOnceLock()
    • getCallOnceCache

      public Map<String,Object> getCallOnceCache()
    • getSetupOnceCache

      public Map<String,Object> getSetupOnceCache()