Module: Endpoints
- Included in:
- TestRail::APIClient
- Defined in:
- lib/endpoints.rb
Instance Method Summary collapse
-
#add_case(section_id, opts = {}) ⇒ Object
Creates a new test case.
-
#add_milestone(project_id, opts = {}) ⇒ Object
Add milestone to project id.
-
#add_plan(project_id, opts = {}) ⇒ Object
Add plan to project by project id.
-
#add_plan_entry(plan_id, opts = {}) ⇒ Object
Add plan entries by plan id.
-
#add_project(opts = {}) ⇒ Object
Add a project.
-
#add_result(test_id, opts = {}) ⇒ Object
Adds a new test result, comment or assigns a test.
-
#add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
Adds a new test result, comment or assigns a test (for a test run and case combination).
-
#add_results(run_id, opts = {}) ⇒ Object
Adds one or more new test results, comments or assigns one or more tests.
-
#add_results_for_cases(run_id, opts = {}) ⇒ Object
Adds one or more new test results, comments or assigns one or more tests (using the case IDs).
-
#add_run(project_id, opts = {}) ⇒ Object
Add run by suite id.
-
#add_section(project_id, opts = {}) ⇒ Object
Add section to suite.
-
#add_suite(project_id, opts = {}) ⇒ Object
Add a test suite.
-
#close_plan(plan_id, opts = {}) ⇒ Object
Close plan by plan id.
-
#close_run(run_id, opts = {}) ⇒ Object
Closes an existing test run and archives its tests & results.
-
#delete_case(case_id, opts = {}) ⇒ Object
Delete test case by case id.
-
#delete_milestone(milestone_id, opts = {}) ⇒ Object
Add milestone to project id.
- #delete_plan(plan_id, opts) ⇒ Object
- #delete_plan_entry(plan_id, entry_id, opts = {}) ⇒ Object
-
#delete_project(project_id, opts) ⇒ Object
Delete a project.
-
#delete_run(run_id, opts = {}) ⇒ Object
Deletes an existing test run.
-
#delete_suite(suite_id, opts = {}) ⇒ Object
Delete a test suite.
-
#get_case(case_id) ⇒ Object
Returns an existing test case.
-
#get_cases(project_id, opts = {}) ⇒ Object
Returns a list of test cases for a test suite or specific section in a test suite.
-
#get_cases_by_section(project_id, suite_id, section_id, opts = {}) ⇒ Object
deprecated
Deprecated.
use get_cases instead
-
#get_cases_by_suite(project_id, suite_id, opts = {}) ⇒ Object
deprecated
Deprecated.
use get_cases instead
-
#get_milestone(milestone_id, opts = {}) ⇒ Object
Get milestone by milestone id.
-
#get_milestones(project_id, opts = {}) ⇒ Object
Get project milestones by project id.
-
#get_plan(plan_id, opts = {}) ⇒ Object
Get plan by id.
-
#get_plans(project_id, opts = {}) ⇒ Object
Get plans in project by project id.
-
#get_project(project_id, opts = {}) ⇒ Object
Get project by project id.
-
#get_projects(opts = {}) ⇒ Object
Get all projects.
-
#get_results(test_id, opts = {}) ⇒ Object
Returns a list of test results for a test.
-
#get_results_for_case(run_id, case_id, opts = {}) ⇒ Object
Returns a list of test results for a test run and case combination.
-
#get_results_for_run(run_id, opts = {}) ⇒ Object
Returns a list of test results for a test run.
-
#get_run(run_id, opts = {}) ⇒ Object
Get run by run id.
-
#get_runs(project_id, opts = {}) ⇒ Object
Get runs by project id.
-
#get_section(section_id, opts = {}) ⇒ Object
Return section by id.
-
#get_sections(project_id, suite_id, opts = {}) ⇒ Object
Get sections for suite.
-
#get_suite(suite_id, opts = {}) ⇒ Object
Return suite by suite id.
-
#get_suites(project_id, opts = {}) ⇒ Object
Return all suites in project by project id.
-
#get_test(test_id, opts = {}) ⇒ Object
Returns an existing test.
-
#get_tests(run_id, opts = {}) ⇒ Object
Returns a list of tests for a test run.
-
#update_case(case_id, opts = {}) ⇒ Object
Update test result by case id.
-
#update_milestone(milestone_id, opts = {}) ⇒ Object
Add milestone to project id.
-
#update_plan(plan_id, opts = {}) ⇒ Object
Update plan by plan id.
-
#update_plan_entry(plan_id, entry_id, opts = {}) ⇒ Object
Update plan entry by plan id.
-
#update_project(project_id, opts) ⇒ Object
Update a project.
-
#update_run(run_id, opts = {}) ⇒ Object
Updates existing test run.
-
#update_suite(suite_id, opts = {}) ⇒ Object
update a test suite.
Instance Method Details
#add_case(section_id, opts = {}) ⇒ Object
Creates a new test case
115 116 117 |
# File 'lib/endpoints.rb', line 115 def add_case(section_id, opts = {}) send_post("add_case/#{section_id.to_s}", opts) end |
#add_milestone(project_id, opts = {}) ⇒ Object
Add milestone to project id
290 291 292 |
# File 'lib/endpoints.rb', line 290 def add_milestone(project_id, opts = {}) send_post("add_milestone/:#{project_id.to_s}", opts) end |
#add_plan(project_id, opts = {}) ⇒ Object
Add plan to project by project id
355 356 357 |
# File 'lib/endpoints.rb', line 355 def add_plan(project_id, opts = {}) send_post("add_plan/:#{project_id.to_s}", opts) end |
#add_plan_entry(plan_id, opts = {}) ⇒ Object
Add plan entries by plan id
368 369 370 |
# File 'lib/endpoints.rb', line 368 def add_plan_entry(plan_id, opts = {}) send_post("add_plan_entry/:#{plan_id.to_s}", opts) end |
#add_project(opts = {}) ⇒ Object
Add a project
464 465 466 |
# File 'lib/endpoints.rb', line 464 def add_project(opts = {}) send_post("add_project", opts) end |
#add_result(test_id, opts = {}) ⇒ Object
Adds a new test result, comment or assigns a test. It’s recommended to use add_results instead if you plan to add results for multiple tests.
543 544 545 |
# File 'lib/endpoints.rb', line 543 def add_result(test_id, opts = {}) send_post("add_result/:#{test_id.to_s}", opts) end |
#add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
Adds a new test result, comment or assigns a test (for a test run and case combination)
557 558 559 |
# File 'lib/endpoints.rb', line 557 def add_result_for_case(run_id, case_id, opts = {}) send_post("add_result_for_case/:#{run_id.to_s}/:#{case_id.to_s}", opts) end |
#add_results(run_id, opts = {}) ⇒ Object
Adds one or more new test results, comments or assigns one or more tests
570 571 572 |
# File 'lib/endpoints.rb', line 570 def add_results(run_id, opts = {}) send_post("add_results/:#{run_id.to_s}", opts) end |
#add_results_for_cases(run_id, opts = {}) ⇒ Object
Adds one or more new test results, comments or assigns one or more tests (using the case IDs)
583 584 585 |
# File 'lib/endpoints.rb', line 583 def add_results_for_cases(run_id, opts = {}) send_post("add_results_for_cases/:#{run_id.to_s}", opts) end |
#add_run(project_id, opts = {}) ⇒ Object
Add run by suite id
623 624 625 |
# File 'lib/endpoints.rb', line 623 def add_run(project_id, opts = {}) send_post("add_run/:#{project_id.to_s}", opts) end |
#add_section(project_id, opts = {}) ⇒ Object
Add section to suite
251 252 253 |
# File 'lib/endpoints.rb', line 251 def add_section(project_id, opts = {}) send_post("add_section/#{project_id.to_s}", opts) end |
#add_suite(project_id, opts = {}) ⇒ Object
Add a test suite
180 181 182 |
# File 'lib/endpoints.rb', line 180 def add_suite(project_id, opts = {}) send_post("add_suite/:#{project_id.to_s}", opts) end |
#close_plan(plan_id, opts = {}) ⇒ Object
Close plan by plan id
408 409 410 |
# File 'lib/endpoints.rb', line 408 def close_plan(plan_id, opts = {}) send_post("close_plan/:#{plan_id.to_s}", opts) end |
#close_run(run_id, opts = {}) ⇒ Object
Closes an existing test run and archives its tests & results
649 650 651 |
# File 'lib/endpoints.rb', line 649 def close_run(run_id, opts = {}) send_post("close_run/#{run_id.to_s}", opts) end |
#delete_case(case_id, opts = {}) ⇒ Object
Delete test case by case id
141 142 143 |
# File 'lib/endpoints.rb', line 141 def delete_case(case_id, opts = {}) send_post("delete_case/:#{case_id.to_s}", opts) end |
#delete_milestone(milestone_id, opts = {}) ⇒ Object
Add milestone to project id
316 317 318 |
# File 'lib/endpoints.rb', line 316 def delete_milestone(milestone_id, opts = {}) send_post("delete_milestone/:#{milestone_id.to_s}", opts) end |
#delete_plan(plan_id, opts) ⇒ Object
418 419 420 |
# File 'lib/endpoints.rb', line 418 def delete_plan(plan_id, opts) send_post("delete_plan/:#{plan_id.to_s}", opts) end |
#delete_plan_entry(plan_id, entry_id, opts = {}) ⇒ Object
427 428 429 |
# File 'lib/endpoints.rb', line 427 def delete_plan_entry(plan_id, entry_id, opts = {}) send_post("delete_plan_entry/:#{plan_id.to_s}/:#{entry_id.to_s}", opts) end |
#delete_project(project_id, opts) ⇒ Object
Delete a project
490 491 492 |
# File 'lib/endpoints.rb', line 490 def delete_project(project_id, opts) send_post("delete_project/:#{project_id.to_s}", opts) end |
#delete_run(run_id, opts = {}) ⇒ Object
Deletes an existing test run.
662 663 664 |
# File 'lib/endpoints.rb', line 662 def delete_run(run_id, opts = {}) send_post("delete_run/:#{run_id.to_s}", opts) end |
#delete_suite(suite_id, opts = {}) ⇒ Object
Delete a test suite
206 207 208 |
# File 'lib/endpoints.rb', line 206 def delete_suite(suite_id, opts = {}) send_post("delete_suite/:#{suite_id.to_s}", opts) end |
#get_case(case_id) ⇒ Object
Returns an existing test case
42 43 44 |
# File 'lib/endpoints.rb', line 42 def get_case(case_id) send_get("get_case/#{case_id.to_s}") end |
#get_cases(project_id, opts = {}) ⇒ Object
Returns a list of test cases for a test suite or specific section in a test suite.
75 76 77 |
# File 'lib/endpoints.rb', line 75 def get_cases(project_id, opts = {}) send_get("get_cases/#{project_id.to_s}", opts) end |
#get_cases_by_section(project_id, suite_id, section_id, opts = {}) ⇒ Object
use get_cases instead
Return all test cases in a given project by suite_id and section_id
84 85 86 |
# File 'lib/endpoints.rb', line 84 def get_cases_by_section(project_id, suite_id, section_id, opts = {}) send_get("get_cases/#{project_id.to_s}&suite_id=#{suite_id.to_s}§ion_id=#{section_id.to_s}", opts) end |
#get_cases_by_suite(project_id, suite_id, opts = {}) ⇒ Object
use get_cases instead
Return all test cases in a given project by suite_id
93 94 95 |
# File 'lib/endpoints.rb', line 93 def get_cases_by_suite(project_id, suite_id, opts = {}) send_get("get_cases/#{project_id.to_s}&suite_id=#{suite_id.to_s}", opts) end |
#get_milestone(milestone_id, opts = {}) ⇒ Object
Get milestone by milestone id
264 265 266 |
# File 'lib/endpoints.rb', line 264 def get_milestone(milestone_id, opts = {}) send_get("get_milestone/:#{milestone_id.to_s}", opts) end |
#get_milestones(project_id, opts = {}) ⇒ Object
Get project milestones by project id
277 278 279 |
# File 'lib/endpoints.rb', line 277 def get_milestones(project_id, opts = {}) send_get("get_milestones/:#{project_id.to_s}", opts) end |
#get_plan(plan_id, opts = {}) ⇒ Object
Get plan by id
329 330 331 |
# File 'lib/endpoints.rb', line 329 def get_plan(plan_id, opts = {}) send_get("get_plan/:#{plan_id.to_s}", opts) end |
#get_plans(project_id, opts = {}) ⇒ Object
Get plans in project by project id
342 343 344 |
# File 'lib/endpoints.rb', line 342 def get_plans(project_id, opts = {}) send_get("get_plans/:#{project_id.to_s}", opts) end |
#get_project(project_id, opts = {}) ⇒ Object
Get project by project id
440 441 442 |
# File 'lib/endpoints.rb', line 440 def get_project(project_id, opts = {}) send_get("get_project/#{project_id}", opts) end |
#get_projects(opts = {}) ⇒ Object
Get all projects
452 453 454 |
# File 'lib/endpoints.rb', line 452 def get_projects(opts = {}) send_get('get_projects', opts) end |
#get_results(test_id, opts = {}) ⇒ Object
Returns a list of test results for a test
503 504 505 |
# File 'lib/endpoints.rb', line 503 def get_results(test_id, opts = {}) send_get("get_results/:#{test_id.to_s}", opts) end |
#get_results_for_case(run_id, case_id, opts = {}) ⇒ Object
Returns a list of test results for a test run and case combination
517 518 519 |
# File 'lib/endpoints.rb', line 517 def get_results_for_case(run_id, case_id, opts = {}) send_get("get_results_for_case/:#{run_id.to_s}/:#{case_id.to_s}", opts) end |
#get_results_for_run(run_id, opts = {}) ⇒ Object
Returns a list of test results for a test run
530 531 532 |
# File 'lib/endpoints.rb', line 530 def get_results_for_run(run_id, opts = {}) send_get("get_results_for_run/:#{run_id.to_s}", opts) end |
#get_run(run_id, opts = {}) ⇒ Object
Get run by run id
596 597 598 |
# File 'lib/endpoints.rb', line 596 def get_run(run_id, opts = {}) send_get("get_run/:#{run_id.to_s}", opts) end |
#get_runs(project_id, opts = {}) ⇒ Object
Get runs by project id
610 611 612 |
# File 'lib/endpoints.rb', line 610 def get_runs(project_id, opts = {}) send_get("get_runs/#{project_id.to_s}", opts) end |
#get_section(section_id, opts = {}) ⇒ Object
Return section by id
220 221 222 |
# File 'lib/endpoints.rb', line 220 def get_section(section_id, opts = {}) send_get("get_section/:#{section_id.to_s}", opts) end |
#get_sections(project_id, suite_id, opts = {}) ⇒ Object
Get sections for suite
233 234 235 |
# File 'lib/endpoints.rb', line 233 def get_sections(project_id, suite_id, opts = {}) send_get("get_sections/#{project_id.to_s}&suite_id=#{suite_id.to_s}", opts) end |
#get_suite(suite_id, opts = {}) ⇒ Object
Return suite by suite id
154 155 156 |
# File 'lib/endpoints.rb', line 154 def get_suite(suite_id, opts = {}) send_get("get_suite/:#{suite_id.to_s}", opts) end |
#get_suites(project_id, opts = {}) ⇒ Object
Return all suites in project by project id
167 168 169 |
# File 'lib/endpoints.rb', line 167 def get_suites(project_id, opts = {}) send_get("get_suites/:#{project_id.to_s}", opts) end |
#get_test(test_id, opts = {}) ⇒ Object
Returns an existing test
675 676 677 |
# File 'lib/endpoints.rb', line 675 def get_test(test_id, opts = {}) send_get("get_test/:#{test_id.to_s}", opts) end |
#get_tests(run_id, opts = {}) ⇒ Object
Returns a list of tests for a test run
688 689 690 |
# File 'lib/endpoints.rb', line 688 def get_tests(run_id, opts = {}) send_get("get_tests/:#{run_id.to_s}", opts) end |
#update_case(case_id, opts = {}) ⇒ Object
Update test result by case id
128 129 130 |
# File 'lib/endpoints.rb', line 128 def update_case(case_id, opts = {}) send_post("update_case/:#{case_id.to_s}", opts) end |
#update_milestone(milestone_id, opts = {}) ⇒ Object
Add milestone to project id
303 304 305 |
# File 'lib/endpoints.rb', line 303 def update_milestone(milestone_id, opts = {}) send_post("update_milestone/:#{milestone_id.to_s}", opts) end |
#update_plan(plan_id, opts = {}) ⇒ Object
Update plan by plan id
381 382 383 |
# File 'lib/endpoints.rb', line 381 def update_plan(plan_id, opts = {}) send_post("update_plan/:#{plan_id.to_s}", opts) end |
#update_plan_entry(plan_id, entry_id, opts = {}) ⇒ Object
Update plan entry by plan id
395 396 397 |
# File 'lib/endpoints.rb', line 395 def update_plan_entry(plan_id, entry_id, opts = {}) send_post("update_plan_entry/:#{plan_id.to_s}/:#{entry_id.to_s}", opts) end |
#update_project(project_id, opts) ⇒ Object
Update a project
477 478 479 |
# File 'lib/endpoints.rb', line 477 def update_project(project_id, opts) send_post("update_project/:#{project_id.to_s}", opts) end |
#update_run(run_id, opts = {}) ⇒ Object
Updates existing test run
636 637 638 |
# File 'lib/endpoints.rb', line 636 def update_run(run_id, opts = {}) send_post("update_run/:#{run_id.to_s}", opts) end |
#update_suite(suite_id, opts = {}) ⇒ Object
update a test suite
193 194 195 |
# File 'lib/endpoints.rb', line 193 def update_suite(suite_id, opts = {}) send_post("update_suite/:#{suite_id.to_s}", opts) end |