Class: QTest::TestSuite
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#project ⇒ Object
Returns the value of attribute project.
-
#release ⇒ Object
Returns the value of attribute release.
-
#test_cycle ⇒ Object
Returns the value of attribute test_cycle.
Instance Method Summary collapse
-
#create_test_run(opts = {}) ⇒ QTest::TestRun
Create a Test Run under the Test Suite.
-
#move_to(opts = {}) ⇒ QTest::TestSuite
(also: #move_under)
Move the Test Suite under a different parent.
-
#test_runs ⇒ Array[QTest::TestRun]
Get all Test Runs for the Test Suite.
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
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/qtest/test_suite.rb', line 3 def id @id end |
#project ⇒ Object
Returns the value of attribute project.
3 4 5 |
# File 'lib/qtest/test_suite.rb', line 3 def project @project end |
#release ⇒ Object
Returns the value of attribute release.
3 4 5 |
# File 'lib/qtest/test_suite.rb', line 3 def release @release end |
#test_cycle ⇒ Object
Returns the value of attribute test_cycle.
3 4 5 |
# File 'lib/qtest/test_suite.rb', line 3 def test_cycle @test_cycle end |
Instance Method Details
#create_test_run(opts = {}) ⇒ QTest::TestRun
Create a Test Run under the Test Suite.
15 16 17 18 19 20 |
# File 'lib/qtest/test_suite.rb', line 15 def create_test_run(opts = {}) create(QTest::TestRun, project: @project.id, test_suite: @id, attributes: opts) end |
#move_to(opts = {}) ⇒ QTest::TestSuite Also known as: move_under
Move the Test Suite under a different parent.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/qtest/test_suite.rb', line 25 def move_to(opts = {}) move(project: @project.id, test_suite: @id, release: opts[:release], test_cycle: opts[:test_cycle]) if opts[:release] @release = unique(QTest::Release, project: @project.id, release: opts[:release]) elsif opts[:test_cycle] @test_cycle = unique(QTest::TestCycle, project: @project.id, test_cycle: opts[:test_cycle]) end self end |
#test_runs ⇒ Array[QTest::TestRun]
Get all Test Runs for the Test Suite.
8 9 10 |
# File 'lib/qtest/test_suite.rb', line 8 def test_runs all(QTest::TestRun, project: @project.id, test_suite: @id) end |