testrail-rspec 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f15d786bada5807c4e1d28a27166818e997b7d7a19161e2cb89b1656aa5e6ce2
4
- data.tar.gz: 3e8109e2516818146dc344ace1137c2fdc3cd35ba36999b4213e1a2d061bfd85
3
+ metadata.gz: 14c3460accfa5aef3d8f57f57c858dcd207dd1f64934fb8702c142de9d161b45
4
+ data.tar.gz: eb9bed24430b9de89dd4bbe41d5b937826dc3eaeeea79d2ebf2c396a1c7831bc
5
5
  SHA512:
6
- metadata.gz: fc719beec78a442ed70847bd7d88c4273ed66cf7aba7e2684d182bf92357105d11cd7c93744de569cd896cd81d077ebf3391e9085f8388038ca54db5388f4886
7
- data.tar.gz: 53c09b2d86bc4f6053d1af4ab289f3498d3cacf29664329573dbc2cd59219a603b0af933fa799ddf2c87db5b05babf569e348b7c3d44c87d38b9ddda60f66dde
6
+ metadata.gz: 498c38f02616e3ddbb55fe0114e24c496368387148b3bf84a2fd0fbc72f7f5b7f74e1a78e0302bee611bd1f089b357a7a13f88e0db7522914d6a42977bc20693
7
+ data.tar.gz: 328ab325f334dfd7a7557c8f0cab4265978873c03a14d96aba8fe495169079d80eed65118a0b231f578bb4336159297a4fb33ec2ccc8d13dff7d8d624c858baf
@@ -62,6 +62,11 @@ module TestRail
62
62
  _send_request('POST', uri, data)
63
63
  end
64
64
 
65
+ def create_test_run(uri, data)
66
+ @add_test = true
67
+ _send_request('POST', uri, data)
68
+ end
69
+
65
70
  private
66
71
  def _send_request(method, uri, data)
67
72
  url = URI.parse(@url + uri)
@@ -83,6 +88,7 @@ module TestRail
83
88
 
84
89
  if response.body && !response.body.empty?
85
90
  result = JSON.parse(response.body)
91
+ return result['id'] if @add_test
86
92
  else
87
93
  result = {}
88
94
  end
@@ -36,11 +36,13 @@ module TestrailRSpec
36
36
  message = "This test scenario was automated and passed successfully"
37
37
  end
38
38
 
39
- run_id = @config['run_id']
39
+ @run_id ||= @config['run_id']
40
+ @run_id = @@run_id rescue @@run_id = nil unless @config['run_id']
41
+ @run_id = @@run_id = client.create_test_run("add_run/#{@config['project_id']}", { "suite_id": @config['suite_id']}) if @run_id.nil?
40
42
 
41
- if case_id && run_id
43
+ if case_id && @run_id
42
44
  response = client.send_post(
43
- "add_result_for_case/#{run_id}/#{case_id}",
45
+ "add_result_for_case/#{@run_id}/#{case_id}",
44
46
  { status_id: status_id, comment: message }
45
47
  )
46
48
  else
@@ -1,3 +1,3 @@
1
1
  module TestrailRspec
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Prashanth Sams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-24 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2019-12-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: capybara
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: selenium-webdriver
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: site_prism
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: byebug
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '11.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '11.0'
13
111
  description:
14
112
  email:
15
113
  - sams.prashanth@gmail.com
@@ -21,7 +119,7 @@ files:
21
119
  - lib/testrail-rspec/api-client.rb
22
120
  - lib/testrail-rspec/update-testrails.rb
23
121
  - lib/testrail-rspec/version.rb
24
- homepage:
122
+ homepage: https://github.com/prashanth-sams/testrail-rspec
25
123
  licenses:
26
124
  - MIT
27
125
  metadata: