Skip to content

step_attributes_interface Class Reference

William Moore edited this page Sep 16, 2024 · 9 revisions
Name Description
Class step_attributes_interface Interface for the step's run-time attributes object.
get_step() Gets the Gherkin step object.
get_current_test_sequence() Gets a reference to the test context sequence.
get_current_feature_sequence()
get_current_rule_sequence()
get_current_scenario_sequence()
print_attributes()

Class step_attributes_interface

interface class step_attributes_interface;

Interface for the step's run-time attributes object.

When Bathtub runs the user's step definition, Bathtub provisions the step with a run-time step attributes object. The attributes object implements the methods in this step_attributes_interface interface class. The step definition can use these methods to access the step attributes through the attributes object. However, all these methods are more conveniently accessed through the step definition's own step_definition_interface methods. The default step_definition_interface implementation delegates to the respective methods here in the step attributes object.

The run-time attributes are in contrast to the static step attributes, which are accessed through a different interface.

get_step()

pure virtual function gherkin_pkg::step get_step();

Gets the Gherkin step object.

The Gherkin step object contains the step string and any arguments parsed from the Gherkin feature file.

get_current_test_sequence()

pure virtual function test_sequence_interface get_current_test_sequence();

Gets a reference to the test context sequence.

Returns a reference to the test-level context sequence, whose life spans the duration of the Bathtub test run. The test-level context holds a reference to the Bathtub object. All the context sequences have a set of UVM pools the step definitions can use to store, retrieve, and share data among themselves. The test-level context has the highest scope.

get_current_feature_sequence()

pure virtual function feature_sequence_interface get_current_feature_sequence();

get_current_rule_sequence()

pure virtual function rule_sequence_interface get_current_rule_sequence();

get_current_scenario_sequence()

pure virtual function scenario_sequence_interface get_current_scenario_sequence();

print_attributes()

pure virtual function void print_attributes(uvm_verbosity verbosity);