Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/allure_config.rb
19500 views
1
require "allure-rspec"
2
require "active_support"
3
require "active_support/core_ext/object"
4
5
AllureRspec.configure do |config|
6
config.results_directory = "tmp/allure-raw-data"
7
config.clean_results_directory = true
8
config.logging_level = Logger::INFO
9
config.logger = Logger.new($stdout, Logger::DEBUG)
10
config.environment = RbConfig::CONFIG['host_os']
11
12
# Add additional metadata to allure
13
environment_properties = {
14
host_os: RbConfig::CONFIG['host_os'],
15
ruby_version: RUBY_VERSION,
16
host_runner_image: ENV['HOST_RUNNER_IMAGE'],
17
}.compact
18
session_name = ENV['SESSION']
19
session_runtime_version = ENV['SESSION_RUNTIME_VERSION']
20
if session_name.present?
21
environment_properties[:session_name] = session_name
22
if session_runtime_version.present?
23
environment_properties[:session_runtime_version] = "#{session_name}#{session_runtime_version}"
24
end
25
end
26
environment_properties[:runtime_version] = ENV['RUNTIME_VERSION']
27
28
config.environment_properties = environment_properties.compact
29
end
30
31