Module: Endpoints
- Included in:
- TestRail::APIClient
- Defined in:
- lib/endpoints.rb
Instance Method Summary collapse
-
#add_case(case_id, opts = {}) ⇒ Object
Add results to a geven 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_entries(plan_id, opts = {}) ⇒ Object
Add plan entries by plan id.
-
#add_result(test_id, opts = {}) ⇒ Object
Add result to test by test id.
-
#add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
Add result to case by case id.
-
#add_run(suite_id, opts = {}) ⇒ Object
Add run by suite id.
-
#add_section(suite_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
Close run by run id.
-
#delete_case(case_id, opts = {}) ⇒ Object
Delete test case by case id.
-
#get_case(case_id, opts = {}) ⇒ Object
Return a single test case.
-
#get_cases(project_id, opts = {}) ⇒ Object
Return all test cases in a given project.
-
#get_cases_by_section(project_id, suite_id, section_id, opts = {}) ⇒ Object
Return all test cases in a given project by suite_id and section_id.
-
#get_cases_by_suite(project_id, suite_id, opts = {}) ⇒ Object
Return all test cases in a given project by suite_id.
-
#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_run(run_id, opts = {}) ⇒ Object
Get run by run id.
-
#get_runs(project_id, plan_id, opts = {}) ⇒ Object
Get runs by project id.
-
#get_section(section_id, opts = {}) ⇒ Object
Return section by id.
-
#get_sections(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
Get test by test id.
-
#get_tests(run_id, opts = {}) ⇒ Object
Get tests by run id.
-
#update_case(case_id, opts = {}) ⇒ Object
Update test result by case id.
Instance Method Details
#add_case(case_id, opts = {}) ⇒ Object
Add results to a geven test case
41 42 43 |
# File 'lib/endpoints.rb', line 41 def add_case(case_id, opts = {}) send_post("add_case/#{case_id.to_s}", opts) end |
#add_milestone(project_id, opts = {}) ⇒ Object
Add milestone to project id
129 130 131 |
# File 'lib/endpoints.rb', line 129 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
153 154 155 |
# File 'lib/endpoints.rb', line 153 def add_plan(project_id, opts = {}) send_post("add_plan/#{project_id.to_s}", opts) end |
#add_plan_entries(plan_id, opts = {}) ⇒ Object
Add plan entries by plan id
161 162 163 |
# File 'lib/endpoints.rb', line 161 def add_plan_entries(plan_id, opts = {}) send_post("add_plan_entries/#{plan_id.to_s}", opts) end |
#add_result(test_id, opts = {}) ⇒ Object
Add result to test by test id
192 193 194 |
# File 'lib/endpoints.rb', line 192 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
Add result to case by case id
201 202 203 |
# File 'lib/endpoints.rb', line 201 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_run(suite_id, opts = {}) ⇒ Object
Add run by suite id
227 228 229 |
# File 'lib/endpoints.rb', line 227 def add_run(suite_id, opts = {}) send_post("add_run/#{suite_id.to_s}", opts) end |
#add_section(suite_id, opts = {}) ⇒ Object
Add section to suite
105 106 107 |
# File 'lib/endpoints.rb', line 105 def add_section(suite_id, opts = {}) send_post("add_section/#{suite_id.to_s}", opts) end |
#add_suite(project_id, opts = {}) ⇒ Object
Add a test suite
81 82 83 |
# File 'lib/endpoints.rb', line 81 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
169 170 171 |
# File 'lib/endpoints.rb', line 169 def close_plan(plan_id, opts = {}) send_post("close_plan/#{plan_id.to_s}", opts) end |
#close_run(run_id, opts = {}) ⇒ Object
Close run by run id
236 237 238 |
# File 'lib/endpoints.rb', line 236 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
57 58 59 |
# File 'lib/endpoints.rb', line 57 def delete_case(case_id, opts = {}) send_post("delete_case/#{case_id.to_s}", opts) end |
#get_case(case_id, opts = {}) ⇒ Object
Return a single test case
6 7 8 |
# File 'lib/endpoints.rb', line 6 def get_case(case_id, opts = {}) send_get("get_case/#{case_id.to_s}", opts) end |
#get_cases(project_id, opts = {}) ⇒ Object
Return all test cases in a given project
14 15 16 |
# File 'lib/endpoints.rb', line 14 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
Return all test cases in a given project by suite_id and section_id
24 25 26 |
# File 'lib/endpoints.rb', line 24 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
Return all test cases in a given project by suite_id
33 34 35 |
# File 'lib/endpoints.rb', line 33 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
113 114 115 |
# File 'lib/endpoints.rb', line 113 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
121 122 123 |
# File 'lib/endpoints.rb', line 121 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
137 138 139 |
# File 'lib/endpoints.rb', line 137 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
145 146 147 |
# File 'lib/endpoints.rb', line 145 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
177 178 179 |
# File 'lib/endpoints.rb', line 177 def get_project(project_id, opts = {}) send_get("get_project/#{project_id.to_s}", opts) end |
#get_projects(opts = {}) ⇒ Object
Get all projects
184 185 186 |
# File 'lib/endpoints.rb', line 184 def get_projects(opts = {}) send_get('get_projects', opts) end |
#get_run(run_id, opts = {}) ⇒ Object
Get run by run id
209 210 211 |
# File 'lib/endpoints.rb', line 209 def get_run(run_id, opts = {}) send_get("get_run/#{run_id.to_s}", opts) end |
#get_runs(project_id, plan_id, opts = {}) ⇒ Object
Might be broken
Get runs by project id
219 220 221 |
# File 'lib/endpoints.rb', line 219 def get_runs(project_id, plan_id, opts = {}) send_get("get_runs/#{project_id.to_s}/#{plan_id.to_s}", opts) end |
#get_section(section_id, opts = {}) ⇒ Object
Return section by id
89 90 91 |
# File 'lib/endpoints.rb', line 89 def get_section(section_id, opts = {}) send_get("get_section/#{section_id.to_s}", opts) end |
#get_sections(suite_id, opts = {}) ⇒ Object
Get sections for suite
97 98 99 |
# File 'lib/endpoints.rb', line 97 def get_sections(suite_id, opts = {}) send_get("get_sections/#{suite_id.to_s}", opts) end |
#get_suite(suite_id, opts = {}) ⇒ Object
Return suite by suite id
65 66 67 |
# File 'lib/endpoints.rb', line 65 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
73 74 75 |
# File 'lib/endpoints.rb', line 73 def get_suites(project_id, opts = {}) send_get("get_suites/#{project_id.to_s}", opts) end |
#get_test(test_id, opts = {}) ⇒ Object
Get test by test id
244 245 246 |
# File 'lib/endpoints.rb', line 244 def get_test(test_id, opts = {}) send_get("get_test/#{test_id.to_s}", opts) end |
#get_tests(run_id, opts = {}) ⇒ Object
Get tests by run id
252 253 254 |
# File 'lib/endpoints.rb', line 252 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
49 50 51 |
# File 'lib/endpoints.rb', line 49 def update_case(case_id, opts = {}) send_post("update_case/#{case_id.to_s}", opts) end |