An attachment recorded during a cucumber run via Cucumber.attach/4,
Cucumber.log/2, or Cucumber.link/2.
Attachments are attributed to the execution that recorded them:
phase-:step,:before_scenario, or:after_scenario(nil when recorded outside the scenario lifecycle, i.e. from abefore_allorafter_allhook)step_text/step_line- set whenphaseis:stepfeature_file/scenario_name- the owning scenarioattempt- the scenario's 1-based retry attempt (nil when recorded outside the scenario lifecycle)
Run-hook attachments (from before_all/after_all) belong to no
scenario: their scenario fields are nil. With Cucumber Messages output
enabled they are emitted as attachment envelopes carrying the hook's
testRunHookStartedId, between that hook's testRunHookStarted and
testRunHookFinished envelopes.
body holds text as-is (encoding: :identity) or Base64-encoded bytes
(encoding: :base64), mirroring the Cucumber Messages attachment
contentEncoding field.
Summary
Types
@type t() :: %Cucumber.Attachment{ attempt: pos_integer() | nil, body: String.t(), encoding: :identity | :base64, feature_file: String.t() | nil, filename: String.t() | nil, media_type: String.t(), phase: :step | :before_scenario | :after_scenario | nil, scenario_name: String.t() | nil, step_line: non_neg_integer() | nil, step_text: String.t() | nil }