testrail-rspec 0.1.1 → 0.1.2

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: c37cbe698060956345977e7c22bbcda6c0fbfd06a3d69f568c5a2867786cc2e5
4
- data.tar.gz: be3d1a610c6d73f39d9f35e88460aff1c700f980a864ba0ceeed6b7e379e5631
3
+ metadata.gz: f15d786bada5807c4e1d28a27166818e997b7d7a19161e2cb89b1656aa5e6ce2
4
+ data.tar.gz: 3e8109e2516818146dc344ace1137c2fdc3cd35ba36999b4213e1a2d061bfd85
5
5
  SHA512:
6
- metadata.gz: 736103c99b797c5cc3ebb1e6518a09a43f104495abbea2ad80d015fca8e31a4b1e2b0fd025c3ef62c5ce0b76768f0b5304c9557880adad381e342d0e2c71fcd0
7
- data.tar.gz: 4089d93df22f0c3d894fc8c03026c59b9a55bf36a198b78c58ea7898d94a56efa9d961d082c6ff39f6b9a997b523121143254d4f409311d2e4ebea913f9c388c
6
+ metadata.gz: fc719beec78a442ed70847bd7d88c4273ed66cf7aba7e2684d182bf92357105d11cd7c93744de569cd896cd81d077ebf3391e9085f8388038ca54db5388f4886
7
+ data.tar.gz: 53c09b2d86bc4f6053d1af4ab289f3498d3cacf29664329573dbc2cd59219a603b0af933fa799ddf2c87db5b05babf569e348b7c3d44c87d38b9ddda60f66dde
@@ -22,14 +22,26 @@ module TestrailRSpec
22
22
  response = {}
23
23
  case_id = @scenario.metadata[:description].split(' ').first.scan(/\d+/).first rescue nil
24
24
 
25
- status_id = get_status_id 'passed'.to_sym if @scenario.exception == nil
26
- status_id = get_status_id 'failed'.to_sym if @scenario.exception != nil
25
+ if (@scenario.exception) && (!@scenario.exception.message.include? 'pending')
26
+ status_id = get_status_id 'failed'.to_sym
27
+ message = @scenario.exception.message
28
+ elsif @scenario.skipped?
29
+ status_id = get_status_id 'blocked'.to_sym
30
+ message = "This test scenario is skipped from test execution"
31
+ elsif @scenario.pending?
32
+ status_id = get_status_id 'blocked'.to_sym
33
+ message = "This test scenario is pending for test execution"
34
+ else
35
+ status_id = get_status_id 'passed'.to_sym
36
+ message = "This test scenario was automated and passed successfully"
37
+ end
38
+
27
39
  run_id = @config['run_id']
28
40
 
29
41
  if case_id && run_id
30
42
  response = client.send_post(
31
43
  "add_result_for_case/#{run_id}/#{case_id}",
32
- { status_id: status_id }
44
+ { status_id: status_id, comment: message }
33
45
  )
34
46
  else
35
47
  raise 'unable to get case id or run id'
@@ -1,3 +1,3 @@
1
1
  module TestrailRspec
2
- VERSION = '0.1.1'.freeze
2
+ VERSION = '0.1.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrail-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
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-23 00:00:00.000000000 Z
11
+ date: 2019-07-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -46,5 +46,6 @@ requirements: []
46
46
  rubygems_version: 3.0.4
47
47
  signing_key:
48
48
  specification_version: 4
49
- summary: Sync Rspec test results with your testrail suite
49
+ summary: Sync Rspec test results with your testrail suite. Discover an example with
50
+ Capybara in this gem source
50
51
  test_files: []