Module: Itriagetestrail::Suites
- Included in:
- TestRailInterface
- Defined in:
- lib/itriagetestrail/testrail_objects/suites.rb
Instance Method Summary collapse
- #add_testrail_suite(suite_name) ⇒ Object
- #testrail_suite_id(suite_name) ⇒ Object
-
#testrail_suites ⇒ Object
TestRail Suites.
Instance Method Details
#add_testrail_suite(suite_name) ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/itriagetestrail/testrail_objects/suites.rb', line 21 def add_testrail_suite(suite_name) body = { name: suite_name } res = @client.send_post("add_suite/#{@project_id}", body) testrail_suite = res['id'] # re-establish suites testrail_suites testrail_suite end |
#testrail_suite_id(suite_name) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/itriagetestrail/testrail_objects/suites.rb', line 13 def testrail_suite_id(suite_name) res = -1 @suites.each do |suite| res = suite['id'] if suite['name'] == suite_name end res end |
#testrail_suites ⇒ Object
TestRail Suites
6 7 8 9 10 11 |
# File 'lib/itriagetestrail/testrail_objects/suites.rb', line 6 def testrail_suites case @suite_mode when 2, 3 @suites = @client.send_get("get_suites/#{@project_id}") end end |