testrail_helper 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92fcc806b8b08ad4204980db5a20e0cfdfa4d813
4
- data.tar.gz: 18fc0e09856c9fb4e188645ad4146914d8a795b8
3
+ metadata.gz: e26437ee45d6872052262d2860a5daec723c0bbb
4
+ data.tar.gz: 685cfa9202738a7ca744cc6a2ab657a553f1c6de
5
5
  SHA512:
6
- metadata.gz: e84e206166131b01b5cfaacb39e8134b7c2f045e528b6607f82799a9902fa01eea17c30dbc1aae4a3b436180a22200e5699243f95e526f87c4f2a25c0a3e1ca2
7
- data.tar.gz: c65e6627f8cb0bf3d5210a12bd9c6bdd97a02151a279f6b650ce40f72dde6e8e0df99964615636d31788eca96d1c2a83bc01593a11b0b247d7c686a8efec0b09
6
+ metadata.gz: 0916903d1173dd552ac34b828692e1581fead9206d2d54194dc4b33f8c211abf079bbdb7651d0ee71131bb08d968f18a2293192f09a6e8c9d90cf89f5f2d09bb
7
+ data.tar.gz: 9d18287e48e1db486439edd655e4ae596512b09cec475ed9e6b6830771ed65b67df1d35bc9527c88b3dcee662ad17c6ad46f8698f5ddf6ba8f7e0af2063f1217
data/README.md CHANGED
@@ -35,6 +35,18 @@ filtered_cases_with_or = client.filter_by_fields_or(cases,priority_id: 4, creat
35
35
 
36
36
  # write list to file
37
37
  write_to_file(cases,'/output/filename')
38
+
39
+ # update a test case by simply putting the test_id
40
+ client.update_test_case(217617,type_id:1)
41
+
42
+ # get a test plan, including details on each run
43
+ client.get_plan(2609)
44
+
45
+ # get a summary of a test run
46
+ client.get_run_info(2610)
47
+
48
+ # get all test caes in a run
49
+ client.get_tests(2610)
38
50
  ```
39
51
 
40
52
  ## Development
@@ -1,3 +1,3 @@
1
1
  module TestrailHelper
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -20,7 +20,22 @@ module TestrailHelper
20
20
  @client.send_get(uri)
21
21
  end
22
22
 
23
- def filter_by_fields_and(list,params={})
23
+ def get_run_info(run_id)
24
+ uri = "get_run/#{run_id}"
25
+ @client.send_get(uri)
26
+ end
27
+
28
+ def get_tests(run_id)
29
+ uri = "get_tests/#{run_id}"
30
+ @client.send_get(uri)
31
+ end
32
+
33
+ def get_plan(plan_id)
34
+ uri = "get_plan/#{plan_id}"
35
+ @client.send_get(uri)
36
+ end
37
+
38
+ def filter_by_fields_and(list, params={})
24
39
  @master_list = list
25
40
  @temp_list = []
26
41
  h = params.map
@@ -38,7 +53,7 @@ module TestrailHelper
38
53
  @master_list
39
54
  end
40
55
 
41
- def filter_by_fields_or(list,params={})
56
+ def filter_by_fields_or(list, params={})
42
57
  @temp_list = list
43
58
  h = params.map
44
59
  h.each do |par|
@@ -54,7 +69,7 @@ module TestrailHelper
54
69
  @master_list
55
70
  end
56
71
 
57
- def update_test_case(case_id,params={})
72
+ def update_test_case(case_id, params={})
58
73
  puts "updating"
59
74
  params.merge({title:get_title(case_id)})
60
75
  puts params
@@ -68,7 +83,7 @@ module TestrailHelper
68
83
  @client.send_get(uri)
69
84
  end
70
85
 
71
- def write_to_file(list,filename)
86
+ def write_to_file(list, filename)
72
87
  File.open(filename, "w+") do |f|
73
88
  list.each { |element| f.puts(element) }
74
89
  end
data/test.rb CHANGED
@@ -1,19 +1,9 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/lib/testrail_helper')
2
2
 
3
3
  # create a new client
4
- client = TestrailHelper::Client.new(username:'',password: '',url: 'https://blarg.testrail.com/')
4
+ client = TestrailHelper::Client.new(username:'mattfairbourn@gmail.com',password: 'CanvasP@$$',url: 'https://canvas.testrail.com/')
5
5
 
6
6
  # get a list of test cases by passing in the suite_id and section_id
7
- cases = client.get_all_test_cases_in_section(suite_id: "729", section_id: "8")
7
+ # cases = client.get_all_test_cases_in_section(suite_id: "729", section_id: "8")
8
8
 
9
- # filter your list down by various required fields. AND
10
- filtered_cases_with_and = client.filter_by_fields_and(cases,priority_id: 4, created_by: 34)
11
-
12
- # filter your list down by various required fields. OR
13
- filtered_cases_with_or = client.filter_by_fields_or(cases,priority_id: 4, created_by: 34)
14
-
15
- # write list to file
16
- write_to_file(cases,'/output/filename')
17
-
18
- # update a test case by simply putting the test_id
19
- update_test_case(12345,priority_id:2,type_id:1)
9
+ puts client.get_tests(2610)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - kinezu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json