Module: QTest::REST::TestRun
Instance Method Summary collapse
-
#create_test_run(opts = {}) ⇒ Object
POST ‘/projects/:project/test-runs’.
-
#delete_test_run(opts = {}) ⇒ Object
DELETE ‘/projects/:project/test-runs/:id’.
- #execution_statuses(opts = {}) ⇒ Object
-
#move_test_run(opts = {}) ⇒ Object
PUT ‘/projects/:project/test-runs/:id?parentType=?&parentId=?’.
- #submit_test_log(opts = {}) ⇒ Object
-
#test_run(opts = {}) ⇒ Object
GET ‘/projects/:project/test-runs/:id’.
- #test_run_fields(opts = {}) ⇒ Object
-
#test_runs(opts = {}) ⇒ Object
GET ‘/projects/:project/test-runs’.
-
#update_test_run(opts = {}) ⇒ Object
PUT ‘/projects/:project/test-runs/:id’.
Methods included from Utils
#decode_response_body, #delete, #get, #handle_response, #post, #put
Instance Method Details
#create_test_run(opts = {}) ⇒ Object
POST ‘/projects/:project/test-runs’
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/qtest/rest/test_run.rb', line 29 def create_test_run(opts = {}) query = QueryBuilder.new .(:json) .project(opts[:project]) .test_runs .data(opts[:attributes]) .determine_parent!(opts) .build post(query) end |
#delete_test_run(opts = {}) ⇒ Object
DELETE ‘/projects/:project/test-runs/:id’
65 66 67 68 69 70 71 72 |
# File 'lib/qtest/rest/test_run.rb', line 65 def delete_test_run(opts = {}) query = QueryBuilder.new .project(opts[:project]) .test_run(opts[:id]) .build delete(query) end |
#execution_statuses(opts = {}) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/qtest/rest/test_run.rb', line 74 def execution_statuses(opts = {}) return @execution_statuses if @execution_statuses query = QueryBuilder.new .project(opts[:project]) .test_runs .with('execution-statuses') .build @execution_statuses = get(query) end |
#move_test_run(opts = {}) ⇒ Object
PUT ‘/projects/:project/test-runs/:id?parentType=?&parentId=?’
42 43 44 45 46 47 48 49 50 |
# File 'lib/qtest/rest/test_run.rb', line 42 def move_test_run(opts = {}) query = QueryBuilder.new .project(opts[:project]) .test_run(opts[:id]) .determine_parent!(opts) .build put(query) end |
#submit_test_log(opts = {}) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/qtest/rest/test_run.rb', line 96 def submit_test_log(opts = {}) query = QueryBuilder.new .(:json) .project(opts[:project]) .test_run(opts[:test_run]) .with('test-logs') .data(opts[:attributes]) .build post(query) end |
#test_run(opts = {}) ⇒ Object
GET ‘/projects/:project/test-runs/:id’
7 8 9 10 11 12 13 14 15 |
# File 'lib/qtest/rest/test_run.rb', line 7 def test_run(opts = {}) query = QueryBuilder.new .project(opts[:project]) .test_run(opts[:id]) .determine_parent!(opts) .build get(query) end |
#test_run_fields(opts = {}) ⇒ Object
86 87 88 89 90 91 92 93 94 |
# File 'lib/qtest/rest/test_run.rb', line 86 def test_run_fields(opts = {}) query = QueryBuilder.new .project(opts[:project]) .test_runs .with('fields') .build get(query) end |
#test_runs(opts = {}) ⇒ Object
GET ‘/projects/:project/test-runs’
18 19 20 21 22 23 24 25 26 |
# File 'lib/qtest/rest/test_run.rb', line 18 def test_runs(opts = {}) query = QueryBuilder.new .project(opts[:project]) .test_runs .determine_parent!(opts) .build get(query) end |
#update_test_run(opts = {}) ⇒ Object
PUT ‘/projects/:project/test-runs/:id’
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/qtest/rest/test_run.rb', line 53 def update_test_run(opts = {}) query = QueryBuilder.new .(:json) .project(opts[:project]) .test_run(opts[:id]) .data(opts[:attributes]) .build put(query) end |