Module: TestRail::Client::Runs
- Included in:
- API
- Defined in:
- lib/testrail_api/client/runs.rb
Overview
Methods for the Runs API
Use the following API methods to request details about test runs and to create or modify test runs.
Instance Method Summary collapse
-
#add_run(project_id, data = {}) ⇒ Object
Creates a new test run.
-
#close_run(run_id) ⇒ Object
Closes an existing test run and archives its tests & results.
-
#delete_run(run_id) ⇒ Object
Deletes an existing test run.
-
#run(run_id) ⇒ Object
Returns an existing test run.
-
#runs(project_id) ⇒ Object
Returns a list of test runs for a project.
-
#update_run(run_id, data = {}) ⇒ Object
Updates an existing test run (partial updates are supported, i.e. you can submit and update specific fields only).
Instance Method Details
#add_run(project_id, data = {}) ⇒ Object
Creates a new test run.
41 42 43 |
# File 'lib/testrail_api/client/runs.rb', line 41 def add_run(project_id, data = {}) post("add_run/#{project_id}", body: data.to_json) end |
#close_run(run_id) ⇒ Object
Closes an existing test run and archives its tests & results.
:run_id The ID of the test run
60 61 62 |
# File 'lib/testrail_api/client/runs.rb', line 60 def close_run(run_id) post("close_run/#{run_id}") end |
#delete_run(run_id) ⇒ Object
Deletes an existing test run.
:run_id The ID of the test run
69 70 71 |
# File 'lib/testrail_api/client/runs.rb', line 69 def delete_run(run_id) post("delete_run/#{run_id}") end |
#run(run_id) ⇒ Object
Returns an existing test run. Please see get_tests for the list of included tests in this run.
:run_id The ID of the test run
13 14 15 |
# File 'lib/testrail_api/client/runs.rb', line 13 def run(run_id) get("get_run/#{run_id}") end |
#runs(project_id) ⇒ Object
Returns a list of test runs for a project. Only returns those test runs that are not part of a test plan (please see get_plans/get_plan for this).
:project_id The ID of the project
23 24 25 |
# File 'lib/testrail_api/client/runs.rb', line 23 def runs(project_id) get("get_runs/#{project_id}") end |
#update_run(run_id, data = {}) ⇒ Object
Updates an existing test run (partial updates are supported, i.e. you can submit and update specific fields only). With the exception of the suite_id and assignedto_id fields, this method supports the same POST fields as add_run.
:run_id The ID of the test run
51 52 53 |
# File 'lib/testrail_api/client/runs.rb', line 51 def update_run(run_id, data = {}) post("update_run/#{run_id}", body: data.to_json) end |