allure_config.rb 1006 B

12345678910111213141516171819202122232425262728
  1. require "allure-rspec"
  2. AllureRspec.configure do |config|
  3. config.results_directory = "tmp/allure-raw-data"
  4. config.clean_results_directory = true
  5. config.logging_level = Logger::INFO
  6. config.logger = Logger.new($stdout, Logger::DEBUG)
  7. config.environment = RbConfig::CONFIG['host_os']
  8. # Add additional metadata to allure
  9. environment_properties = {
  10. host_os: RbConfig::CONFIG['host_os'],
  11. ruby_version: RUBY_VERSION,
  12. host_runner_image: ENV['HOST_RUNNER_IMAGE'],
  13. }.compact
  14. meterpreter_name = ENV['METERPRETER']
  15. meterpreter_runtime_version = ENV['METERPRETER_RUNTIME_VERSION']
  16. if meterpreter_name.present?
  17. environment_properties[:meterpreter_name] = meterpreter_name
  18. if meterpreter_runtime_version.present?
  19. environment_properties[:meterpreter_runtime_version] = "#{meterpreter_name}#{meterpreter_runtime_version}"
  20. end
  21. end
  22. environment_properties[:runtime_version] = ENV['RUNTIME_VERSION']
  23. config.environment_properties = environment_properties.compact
  24. end