Class ExecutionContext

java.lang.Object
com.thoughtworks.gauge.ExecutionContext

public class ExecutionContext extends Object
Gives the information about the current execution at runtime - spec, scenario, step that is running.
  • Constructor Details

    • ExecutionContext

      public ExecutionContext(Specification specification, Scenario scenario, StepDetails stepDetails)
    • ExecutionContext

      public ExecutionContext()
  • Method Details

    • getCurrentSpecification

      public Specification getCurrentSpecification()
      Returns:
      - The Current Specification that is executing. Returns null in BeforeSuite and AfterSuite levels as no spec is executing then.
    • getCurrentScenario

      public Scenario getCurrentScenario()
      Returns:
      - The Current Scenario that is executing. Returns null in BeforeSuite, AfterSuite, BeforeSpec levels as no scenario is executing then.
    • getCurrentStep

      public StepDetails getCurrentStep()
      Returns:
      - The Current Step that is executing. Returns null in BeforeSuite, AfterSuite, BeforeSpec, AfterSpec, BeforeScenario levels as no step is executing then.
    • getAllTags

      public List<String> getAllTags()
      Returns:
      - All the valid tags (including scenario and spec tags) at the execution level.