Cucumber.Messages.Emitter (Cucumber v1.0.0)
View SourceDrives Cucumber Messages emission through the Cucumber.RunCoordinator
sink.
Two roles:
- Configuration —
configure/6builds the run's static envelopes (meta, sources, gherkin documents, pickles, step definitions, hooks, parameter types) plus the id maps run-time messages reference, and hands them to the coordinator. Called byCucumber.Compiler.compile_features!/1whenconfig :cucumber, messages: pathis set. - Run-time sessions — the scenario runner opens a session per
scenario (
open_test_case/2emits thetestCaseenvelope), starts one attempt at a time (start_attempt/2emitstestCaseStarted), brackets steps and scenario hooks with started/finished events, and closes each attempt (close_test_case/2).
Every session function is nil-safe: when the sink is disabled the session is nil and all of this is a no-op, so the runner carries no conditionals.
Summary
Functions
Builds the run's static envelopes and id maps and configures the coordinator's message sink.
Functions
@spec configure( String.t(), [{map(), Gherkin.Pickles.Compilation.t()}], map(), [tuple()], map(), non_neg_integer() ) :: :ok
Builds the run's static envelopes and id maps and configures the coordinator's message sink.
features_with_compilations pairs each discovered feature with its
Gherkin.Pickles.Compilation; next_id continues the compilation id
sequence so every id in the stream is run-unique.