Skip to content

Introduce global attachments and global errors#628

Merged
andrcuns merged 3 commits intomasterfrom
global-attachments-and-errors-runtime-api
Apr 7, 2026
Merged

Introduce global attachments and global errors#628
andrcuns merged 3 commits intomasterfrom
global-attachments-and-errors-runtime-api

Conversation

@epszaw
Copy link
Copy Markdown
Member

@epszaw epszaw commented Apr 3, 2026

The latest versions of Allure Report supports global attachments and global errors entities, which can be created in context of entire report, not a specific test result.

Global attachment:

image

Global error:

image

Usage samples:

# frozen_string_literal: true

require "allure-rspec"

AllureRspec.configure do |config|
  config.results_directory = "allure-results"
  config.clean_results_directory = true
end

RSpec.configure do |config|
  config.before(:suite) do
    Allure.add_global_attachment(
      name: "suite-start",
      source: "Created from before(:suite) in the sample project.",
      type: Allure::ContentType::TXT
    )
  end

  config.after(:suite) do
    Allure.add_global_error(
      message: "Sample global error",
      trace: "Created from after(:suite) to demonstrate *-globals.json output."
    )
  end
end

@epszaw epszaw requested a review from andrcuns as a code owner April 3, 2026 16:21
Copy link
Copy Markdown
Collaborator

@andrcuns andrcuns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me, just one very minor point about redundant passing of default value

@andrcuns andrcuns added the feature New feature or request label Apr 3, 2026
epszaw and others added 2 commits April 7, 2026 10:36
Co-authored-by: andrejs <andrejs.cunskis@gmail.com>
Co-authored-by: andrejs <andrejs.cunskis@gmail.com>
@epszaw epszaw requested a review from andrcuns April 7, 2026 08:36
@epszaw
Copy link
Copy Markdown
Member Author

epszaw commented Apr 7, 2026

Hey, @andrcuns! Thank you for the review. Accepted the proposed changes, the tests have passed

@andrcuns andrcuns merged commit 296037f into master Apr 7, 2026
12 checks passed
@andrcuns andrcuns deleted the global-attachments-and-errors-runtime-api branch April 7, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants