Class: Testrail::Client
- Inherits:
-
Object
- Object
- Testrail::Client
- Defined in:
- lib/testrail/deprecated/client.rb
Constant Summary collapse
- COMMANDS =
COMMANDS.each do |method_name|
define_method method_nameend
%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).freeze
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
#initialize ⇒ Client
Returns a new instance of Client.
5 6 7 |
# File 'lib/testrail/deprecated/client.rb', line 5 def initialize @request = Testrail::Request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
3 4 5 |
# File 'lib/testrail/deprecated/client.rb', line 3 def request @request end |
Instance Method Details
#add_case(section_id, opts = {}) ⇒ Object
36 37 38 |
# File 'lib/testrail/deprecated/client.rb', line 36 def add_case(section_id, opts = {}) request.post('add_case', section_id, opts) end |
#add_milestone(project_id, opts = {}) ⇒ Object
120 121 122 |
# File 'lib/testrail/deprecated/client.rb', line 120 def add_milestone(project_id, opts = {}) request.post('add_milestone', project_id, opts) end |
#add_plan(project_id, opts = {}) ⇒ Object
99 100 101 |
# File 'lib/testrail/deprecated/client.rb', line 99 def add_plan(project_id, opts = {}) request.post('add_plan', project_id, opts) end |
#add_plan_entries(plan_id, opts = {}) ⇒ Object
103 104 105 |
# File 'lib/testrail/deprecated/client.rb', line 103 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
10 11 12 |
# File 'lib/testrail/deprecated/client.rb', line 10 def add_result(test_id, opts = {}) request.post('add_result', test_id, opts) end |
#add_result_for_case(run_id, case_id, opts = {}) ⇒ Object
14 15 16 |
# File 'lib/testrail/deprecated/client.rb', line 14 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
82 83 84 |
# File 'lib/testrail/deprecated/client.rb', line 82 def add_run(suite_id, opts = {}) request.post('add_run', suite_id, opts) end |
#add_section(suite_id, opts = {}) ⇒ Object
69 70 71 |
# File 'lib/testrail/deprecated/client.rb', line 69 def add_section(suite_id, opts = {}) request.post('add_section', suite_id, opts) end |
#add_suite(project_id, opts = {}) ⇒ Object
65 66 67 |
# File 'lib/testrail/deprecated/client.rb', line 65 def add_suite(project_id, opts = {}) request.post('add_suite', project_id, opts) end |
#close_plan(plan_id, opts = {}) ⇒ Object
107 108 109 |
# File 'lib/testrail/deprecated/client.rb', line 107 def close_plan(plan_id, opts = {}) request.post('close_plan', plan_id, opts) end |
#close_run(run_id, opts = {}) ⇒ Object
86 87 88 |
# File 'lib/testrail/deprecated/client.rb', line 86 def close_run(run_id, opts = {}) request.post('close_run', run_id, opts) end |
#delete_case(case_id, opts = {}) ⇒ Object
44 45 46 |
# File 'lib/testrail/deprecated/client.rb', line 44 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
28 29 30 |
# File 'lib/testrail/deprecated/client.rb', line 28 def get_case(case_id, opts = {}) request.get('get_case', case_id, opts) end |
#get_cases(suite_id, section_id, opts = {}) ⇒ Object
32 33 34 |
# File 'lib/testrail/deprecated/client.rb', line 32 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
112 113 114 |
# File 'lib/testrail/deprecated/client.rb', line 112 def get_milestone(milestone_id, opts = {}) request.get('get_milestone', milestone_id, opts) end |
#get_milestones(project_id, opts = {}) ⇒ Object
116 117 118 |
# File 'lib/testrail/deprecated/client.rb', line 116 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
91 92 93 |
# File 'lib/testrail/deprecated/client.rb', line 91 def get_plan(plan_id, opts = {}) request.get('get_plan', plan_id, opts) end |
#get_plans(project_id, opts = {}) ⇒ Object
95 96 97 |
# File 'lib/testrail/deprecated/client.rb', line 95 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
125 126 127 |
# File 'lib/testrail/deprecated/client.rb', line 125 def get_project(project_id, opts = {}) request.get('get_project', project_id, opts) end |
#get_projects(opts = {}) ⇒ Object
129 130 131 |
# File 'lib/testrail/deprecated/client.rb', line 129 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
74 75 76 |
# File 'lib/testrail/deprecated/client.rb', line 74 def get_run(run_id, opts = {}) request.get('get_run', run_id, opts) end |
#get_runs(project_id, plan_id, opts = {}) ⇒ Object
78 79 80 |
# File 'lib/testrail/deprecated/client.rb', line 78 def get_runs(project_id, plan_id, opts = {}) request.get('get_runs', project_id, plan_id, opts) end |
#get_section(section_id, opts = {}) ⇒ Object
57 58 59 |
# File 'lib/testrail/deprecated/client.rb', line 57 def get_section(section_id, opts = {}) request.get('get_section', section_id, opts) end |
#get_sections(suite_id, opts = {}) ⇒ Object
61 62 63 |
# File 'lib/testrail/deprecated/client.rb', line 61 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
49 50 51 |
# File 'lib/testrail/deprecated/client.rb', line 49 def get_suite(suite_id, opts = {}) request.get('get_suite', suite_id, opts) end |
#get_suites(project_id, opts = {}) ⇒ Object
53 54 55 |
# File 'lib/testrail/deprecated/client.rb', line 53 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
19 20 21 |
# File 'lib/testrail/deprecated/client.rb', line 19 def get_test(test_id, opts = {}) request.get('get_test', test_id, opts) end |
#get_tests(run_id, opts = {}) ⇒ Object
23 24 25 |
# File 'lib/testrail/deprecated/client.rb', line 23 def get_tests(run_id, opts = {}) request.get('get_tests', run_id, opts) end |
#update_case(case_id, opts = {}) ⇒ Object
40 41 42 |
# File 'lib/testrail/deprecated/client.rb', line 40 def update_case(case_id, opts = {}) request.post('update_case', case_id, opts) end |