Cucumber.Attachment (Cucumber v1.0.0)
View SourceAn 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, e.g. from abefore_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)
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 }