Commit c1d3f201 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Attach browser logs to allure test reports

parent 2ce161f7
...@@ -76,6 +76,15 @@ module QA ...@@ -76,6 +76,15 @@ module QA
RSpec.configure do |config| RSpec.configure do |config|
config.add_formatter(AllureRspecFormatter) config.add_formatter(AllureRspecFormatter)
config.add_formatter(QA::Support::Formatters::AllureMetadataFormatter) config.add_formatter(QA::Support::Formatters::AllureMetadataFormatter)
config.append_after do |example|
Allure.add_attachment(
name: 'browser.log',
source: page.driver.browser.logs.get(:browser).map(&:to_s).join("\n\n"),
type: Allure::ContentType::TXT,
test_case: true
)
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment