Class: Testrail::Client
- Inherits:
-
Object
- Object
- Testrail::Client
- Defined in:
- lib/testrail/client.rb
Constant Summary collapse
- COMMANDS =
COMMANDS.each do |method_name|
define_method method_name
end
%w[add_result add_result_for_case get_test get_tests get_case get_cases add_case update_case delete_case get_suite get_suites get_section get_sections add_suite add_section get_run get_runs add_run close_run get_plan get_plans add_plan add_plan_entries close_plan get_milestone get_milestones add_milestone get_project get_projects]
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #add_case(section_id, opts = {}) ⇒ Object
- #add_milestone(project_id, opts = {}) ⇒ Object
- #add_plan(project_id, opts = {}) ⇒ Object
- #add_plan_entries(plan_id, opts = {}) ⇒ Object
-
#add_result(test_id, opts = {}) ⇒ Object
Test Results - see docs.gurock.com/testrail-api/reference-results.
- #add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
- #add_run(suite_id, opts = {}) ⇒ Object
- #add_section(suite_id, opts = {}) ⇒ Object
- #add_suite(project_id, opts = {}) ⇒ Object
- #close_plan(plan_id, opts = {}) ⇒ Object
- #close_run(run_id, opts = {}) ⇒ Object
- #delete_case(case_id, opts = {}) ⇒ Object
-
#get_case(case_id, opts = {}) ⇒ Object
Test Cases - see docs.gurock.com/testrail-api/reference-cases.
- #get_cases(suite_id, section_id, opts = {}) ⇒ Object
-
#get_milestone(milestone_id, opts = {}) ⇒ Object
Milestones - see docs.gurock.com/testrail-api/reference-milestones.
- #get_milestones(project_id, opts = {}) ⇒ Object
-
#get_plan(plan_id, opts = {}) ⇒ Object
Test Plans - see docs.gurock.com/testrail-api/reference-plans.
- #get_plans(project_id, opts = {}) ⇒ Object
-
#get_project(project_id, opts = {}) ⇒ Object
Projects - see docs.gurock.com/testrail-api/reference-projects.
- #get_projects(opts = {}) ⇒ Object
-
#get_run(run_id, opts = {}) ⇒ Object
Test Runs - see docs.gurock.com/testrail-api/reference-runs.
- #get_runs(project_id, plan_id, opts = {}) ⇒ Object
- #get_section(section_id, opts = {}) ⇒ Object
- #get_sections(suite_id, opts = {}) ⇒ Object
-
#get_suite(suite_id, opts = {}) ⇒ Object
Suites and Sections - see docs.gurock.com/testrail-api/reference-suites.
- #get_suites(project_id, opts = {}) ⇒ Object
-
#get_test(test_id, opts = {}) ⇒ Object
Test - see docs.gurock.com/testrail-api/reference-tests.
- #get_tests(run_id, opts = {}) ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #update_case(case_id, opts = {}) ⇒ Object
Constructor Details
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
4 5 6 |
# File 'lib/testrail/client.rb', line 4 def request @request end |
Instance Method Details
#add_case(section_id, opts = {}) ⇒ Object
37 38 39 |
# File 'lib/testrail/client.rb', line 37 def add_case(section_id, opts = {}) request.post('add_case', section_id, opts) end |
#add_milestone(project_id, opts = {}) ⇒ Object
121 122 123 |
# File 'lib/testrail/client.rb', line 121 def add_milestone(project_id, opts = {}) request.post('add_milestone', project_id, opts) end |
#add_plan(project_id, opts = {}) ⇒ Object
100 101 102 |
# File 'lib/testrail/client.rb', line 100 def add_plan(project_id, opts = {}) request.post('add_plan', project_id, opts) end |
#add_plan_entries(plan_id, opts = {}) ⇒ Object
104 105 106 |
# File 'lib/testrail/client.rb', line 104 def add_plan_entries(plan_id, opts = {}) request.post('add_plan_entries', plan_id, opts) end |
#add_result(test_id, opts = {}) ⇒ Object
Test Results - see docs.gurock.com/testrail-api/reference-results
11 12 13 |
# File 'lib/testrail/client.rb', line 11 def add_result(test_id, opts = {}) request.post('add_result', test_id, opts) end |
#add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
15 16 17 |
# File 'lib/testrail/client.rb', line 15 def add_result_for_case(run_id, case_id, opts = {}) request.post('add_result_for_case', run_id, case_id, opts) end |
#add_run(suite_id, opts = {}) ⇒ Object
83 84 85 |
# File 'lib/testrail/client.rb', line 83 def add_run(suite_id, opts = {}) request.post('add_run', suite_id, opts) end |
#add_section(suite_id, opts = {}) ⇒ Object
70 71 72 |
# File 'lib/testrail/client.rb', line 70 def add_section(suite_id, opts = {}) request.post('add_section', suite_id, opts) end |
#add_suite(project_id, opts = {}) ⇒ Object
66 67 68 |
# File 'lib/testrail/client.rb', line 66 def add_suite(project_id, opts = {}) request.post('add_suite', project_id, opts) end |
#close_plan(plan_id, opts = {}) ⇒ Object
108 109 110 |
# File 'lib/testrail/client.rb', line 108 def close_plan(plan_id, opts = {}) request.post('close_plan', plan_id, opts) end |
#close_run(run_id, opts = {}) ⇒ Object
87 88 89 |
# File 'lib/testrail/client.rb', line 87 def close_run(run_id, opts = {}) request.post('close_run', run_id, opts) end |
#delete_case(case_id, opts = {}) ⇒ Object
45 46 47 |
# File 'lib/testrail/client.rb', line 45 def delete_case(case_id, opts = {}) request.post('delete_case', case_id, opts) end |
#get_case(case_id, opts = {}) ⇒ Object
Test Cases - see docs.gurock.com/testrail-api/reference-cases
29 30 31 |
# File 'lib/testrail/client.rb', line 29 def get_case(case_id, opts = {}) request.get('get_case', case_id, opts) end |
#get_cases(suite_id, section_id, opts = {}) ⇒ Object
33 34 35 |
# File 'lib/testrail/client.rb', line 33 def get_cases(suite_id, section_id, opts = {}) request.get('get_cases', [suite_id, section_id], opts) end |
#get_milestone(milestone_id, opts = {}) ⇒ Object
Milestones - see docs.gurock.com/testrail-api/reference-milestones
113 114 115 |
# File 'lib/testrail/client.rb', line 113 def get_milestone(milestone_id, opts = {}) request.get('get_milestone', milestone_id, opts) end |
#get_milestones(project_id, opts = {}) ⇒ Object
117 118 119 |
# File 'lib/testrail/client.rb', line 117 def get_milestones(project_id, opts = {}) request.get('get_milestones', project_id, opts) end |
#get_plan(plan_id, opts = {}) ⇒ Object
Test Plans - see docs.gurock.com/testrail-api/reference-plans
92 93 94 |
# File 'lib/testrail/client.rb', line 92 def get_plan(plan_id, opts = {}) request.get('get_plan', plan_id, opts) end |
#get_plans(project_id, opts = {}) ⇒ Object
96 97 98 |
# File 'lib/testrail/client.rb', line 96 def get_plans(project_id, opts = {}) request.get('get_plans', project_id, opts) end |
#get_project(project_id, opts = {}) ⇒ Object
Projects - see docs.gurock.com/testrail-api/reference-projects
126 127 128 |
# File 'lib/testrail/client.rb', line 126 def get_project(project_id, opts = {}) request.get('get_project', project_id, opts) end |
#get_projects(opts = {}) ⇒ Object
130 131 132 |
# File 'lib/testrail/client.rb', line 130 def get_projects(opts = {}) request.get('get_projects', opts) end |
#get_run(run_id, opts = {}) ⇒ Object
Test Runs - see docs.gurock.com/testrail-api/reference-runs
75 76 77 |
# File 'lib/testrail/client.rb', line 75 def get_run(run_id, opts = {}) request.get('get_run', run_id, opts) end |
#get_runs(project_id, plan_id, opts = {}) ⇒ Object
79 80 81 |
# File 'lib/testrail/client.rb', line 79 def get_runs(project_id, plan_id, opts = {}) request.get('get_runs', project_id, plan_id, opts) end |
#get_section(section_id, opts = {}) ⇒ Object
58 59 60 |
# File 'lib/testrail/client.rb', line 58 def get_section(section_id, opts = {}) request.get('get_section', section_id, opts) end |
#get_sections(suite_id, opts = {}) ⇒ Object
62 63 64 |
# File 'lib/testrail/client.rb', line 62 def get_sections(suite_id, opts = {}) request.get('get_sections', suite_id, opts) end |
#get_suite(suite_id, opts = {}) ⇒ Object
Suites and Sections - see docs.gurock.com/testrail-api/reference-suites
50 51 52 |
# File 'lib/testrail/client.rb', line 50 def get_suite(suite_id, opts = {}) request.get('get_suite', suite_id, opts) end |
#get_suites(project_id, opts = {}) ⇒ Object
54 55 56 |
# File 'lib/testrail/client.rb', line 54 def get_suites(project_id, opts = {}) request.get('get_suites', project_id, opts) end |
#get_test(test_id, opts = {}) ⇒ Object
Test - see docs.gurock.com/testrail-api/reference-tests
20 21 22 |
# File 'lib/testrail/client.rb', line 20 def get_test(test_id, opts = {}) request.get('get_test', test_id, opts) end |
#get_tests(run_id, opts = {}) ⇒ Object
24 25 26 |
# File 'lib/testrail/client.rb', line 24 def get_tests(run_id, opts = {}) request.get('get_tests', run_id, opts) end |
#update_case(case_id, opts = {}) ⇒ Object
41 42 43 |
# File 'lib/testrail/client.rb', line 41 def update_case(case_id, opts = {}) request.post('update_case', case_id, opts) end |