Sha256: ad1fddfa0df594ad1fad7f7ada1f568b2c21383823588ba03410271165ac7883
Contents?: true
Size: 1.67 KB
Versions: 8
Compression:
Stored size: 1.67 KB
Contents
Before do @service = ->(klass) { klass.new } @pubsub = Google::Cloud::PubSub.new end After do |scenario| exception_message(scenario) end def exception_message(scenario) scene = scenario.failed? return unless scene == true print_reason(scenario) end def print_reason(scenario) puts "\n--------------------------------------------------------------------------------------------" puts 'Reason:' puts "\n - Request body: #{@payload.to_json}" puts "\n - Response code: #{@response.response.code}" puts "\n - Response body: #{@response.parsed_response.to_json}" puts "\nš„š„š„šššš„š„š„ #{scenario.exception.message}" puts "--------------------------------------------------------------------------------------------\n" end AfterConfiguration do |config| config.on_event(:test_case_finished) do |event| puts "\n--------------------------------------------------------------------------------------------------" puts 'Results:' puts " - Scenario......: #{event.test_case.name}" puts " - Result..: [ #{event.result.passed? ? 'ā ]' : 'ā ]'}" puts "--------------------------------------------------------------------------------------------------\n" end end at_exit do @infos = { 'Data do Teste' => Time.now.strftime('%d/%B/%Y'), 'Hora do Teste' => Time.now.strftime('%HH%MM%SS') } ReportBuilder.configure do |config| config.input_path = 'report/report.json' config.report_path = 'report/report' config.report_types = [:html] config.include_images = true config.report_title = '[SAUDE ID] MY - TITLE' config.additional_info = @infos config.collor = 'indigo' end ReportBuilder.build_report end
Version data entries
8 entries across 8 versions & 1 rubygems