Class: QTest::TestRun

Inherits:
Base
  • Object
show all
Defined in:
lib/qtest/test_run.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#all, #create, find_by, #initialize, method_missing, #move, #unique

Constructor Details

This class inherits a constructor from QTest::Base

Instance Attribute Details

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/qtest/test_run.rb', line 3

def id
  @id
end

#projectObject

Returns the value of attribute project.



3
4
5
# File 'lib/qtest/test_run.rb', line 3

def project
  @project
end

#releaseObject

Returns the value of attribute release.



3
4
5
# File 'lib/qtest/test_run.rb', line 3

def release
  @release
end

#test_cycleObject

Returns the value of attribute test_cycle.



3
4
5
# File 'lib/qtest/test_run.rb', line 3

def test_cycle
  @test_cycle
end

#test_suiteObject

Returns the value of attribute test_suite.



3
4
5
# File 'lib/qtest/test_run.rb', line 3

def test_suite
  @test_suite
end

Instance Method Details

#submit_test_log(opts = {}) ⇒ Hash

Submit an execution log for the Test Run.

Parameters:

  • opts (Hash) (defaults to: {})
  • status (Hash)

    a customizable set of options

Returns:

  • (Hash)


10
11
12
13
14
15
16
17
18
19
# File 'lib/qtest/test_run.rb', line 10

def submit_test_log(opts = {})
  opts[:status] = client.execution_statuses(project: @project.id)
                        .select do |status|
                          status[:name].downcase.to_sym == opts[:status]
                        end.first

  client.submit_test_log(project: @project.id,
                         test_run: @id,
                         attributes: opts)
end