Class AllureExecutionContext

java.lang.Object
io.qameta.allure.internal.AllureExecutionContext

public final class AllureExecutionContext extends Object
Mutable execution context that stores a stack of running Allure executable keys.
  • Constructor Details

    • AllureExecutionContext

      public AllureExecutionContext()
      Creates an empty execution context.
  • Method Details

    • getCurrent

      public Optional<AllureExternalKey> getCurrent()
      Returns last (most recent) key.
    • getRoot

      public Optional<AllureExternalKey> getRoot()
      Returns first (oldest) key.
    • getCurrentExecutable

      public Optional<AllureExternalKey> getCurrentExecutable()
      Returns the executable key new executable items should be attached to.
    • start

      public void start(AllureExternalKey key)
      Adds new key.
    • getLocalKeys

      public List<AllureExternalKey> getLocalKeys()
      Returns a snapshot of the locally bound keys, most recent first.
      Returns:
      local keys, top of the stack first
    • copy

      public AllureExecutionContext copy()
      Returns a copy of this execution context.
      Returns:
      context snapshot
    • child

      public AllureExecutionContext child()
      Returns a child execution context linked to this context.
      Returns:
      child context
    • stop

      public Optional<AllureExternalKey> stop()
      Removes latest locally added key. Ignores empty local context.
      Returns:
      removed key.