Method: Res::Reporters::TestRail#initialize
- Defined in:
- lib/res/reporters/test_rail.rb
#initialize(args) ⇒ TestRail
Returns a new instance of TestRail.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/res/reporters/test_rail.rb', line 11 def initialize(args) @url = args[:url] @config = Res::Config.new([:user, :password, :namespace, :project, :suite], :optional => [:run_id, :run_name], :pre_env => 'testrail_') config.process(args) @case_status = {} @io = File.new("./.test_rail_reporter.log","w+") test_rail_project = config.project @suite_name = config.suite begin @project = tr.find_project(:name => test_rail_project) rescue @io.puts "Project: #{test_rail_project} could not be found" @io.puts " Please create a project first to contain test suite #{@suite_name}" @io.close return "Project #{test_rail_project} could not be found" end end |