Module: QAT::Cucumber::Hooks::Scenario

Extended by:
Scenario
Includes:
Logger
Included in:
Scenario
Defined in:
lib/qat/cucumber/hooks/scenario.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#define_test_id(scenario) ⇒ Object

Since:

  • 0.1.0



18
19
20
21
22
23
24
# File 'lib/qat/cucumber/hooks/scenario.rb', line 18

def define_test_id(scenario)
  test_id = "#{test_id(scenario)}"

  QAT[:current_test_id]     = test_id
  QAT[:current_test_run_id] = "#{test_id}_#{QAT[:test_start_timestamp].to_i}"
  log.info "Scenario has test id: #{QAT[:current_test_id]} and test run id: #{QAT[:current_test_run_id]}"
end

#scenario_tags(scenario) ⇒ Object

Since:

  • 0.1.0



14
15
16
# File 'lib/qat/cucumber/hooks/scenario.rb', line 14

def scenario_tags(scenario)
  scenario.tags.map { |tag| tag.name }.compact
end