Skip to content

scenario_sequence_interface Class Reference

Bill Moore edited this page Sep 20, 2024 · 5 revisions

scenario_sequence_interface

Name Description
Class scenario_sequence_interface Interface for scenario-level context sequences.
get_scenario() Gets a reference to the scenario object.

Class scenario_sequence_interface

interface class scenario_sequence_interface extends pool_provider_interface;

Interface for scenario-level context sequences.

The scenario-level context sequences implement this interface. A user step definition sequence can access the current scenario-level context sequence through its get_current_scenario_sequence() function.

get_scenario()

pure virtual function gherkin_pkg::scenario get_scenario();

Gets a reference to the scenario object.

When Bathtub parses a scenario in a Gherkin feature file, Bathtub creates a gherkin_pkg::scenario object for it. The scenario-level context sequence contains a reference to the scenario object. A user step definition sequence can retrieve a reference to the scneario object with the context sequence's implementation of this function, e.g.:

gherkin_pkg::scenario my_scenario = get_current_scenario_sequence().get_scenario();