testrail-rspec 0.1.3 → 0.1.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 +4 -4
- data/lib/testrail-rspec/update-testrails.rb +10 -4
- data/lib/testrail-rspec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce6e7c3227ab4805455ffcce099437f8685260a0a25bc4a0fb66ed72048b6f2f
|
4
|
+
data.tar.gz: 41160a58d5b6ba71cb58b409832d9f0fd782d91b70449c711f08092ed37dba40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a06a57ebb274320420ece55a89b0ef5867e92efbcd081cb7c50bb43b8918aca5e4613b939eded0f607445596c62dcaad814405c68303544fa23b017da88d59f9
|
7
|
+
data.tar.gz: 48be8a5e373230b268587d346e2fd2081e7f451d434ad4c0578071f287e672617e60a62e3fae0701beb05755634468ed1638fa50cb7472ffcc6b44adf9ed33bc
|
@@ -20,7 +20,15 @@ module TestrailRSpec
|
|
20
20
|
def upload_result
|
21
21
|
|
22
22
|
response = {}
|
23
|
-
|
23
|
+
|
24
|
+
case_list = []
|
25
|
+
@scenario.metadata[:description].split(' ').map do |e|
|
26
|
+
val = e.scan(/\d+/).first
|
27
|
+
next if val.nil?
|
28
|
+
case_list << val
|
29
|
+
end
|
30
|
+
|
31
|
+
return if case_list.empty?
|
24
32
|
|
25
33
|
if (@scenario.exception) && (!@scenario.exception.message.include? 'pending')
|
26
34
|
status_id = get_status_id 'failed'.to_sym
|
@@ -40,13 +48,11 @@ module TestrailRSpec
|
|
40
48
|
@run_id = @@run_id rescue @@run_id = nil unless @config['run_id']
|
41
49
|
@run_id = @@run_id = client.create_test_run("add_run/#{@config['project_id']}", { "suite_id": @config['suite_id']}) if @run_id.nil?
|
42
50
|
|
43
|
-
|
51
|
+
case_list.map do |case_id|
|
44
52
|
response = client.send_post(
|
45
53
|
"add_result_for_case/#{@run_id}/#{case_id}",
|
46
54
|
{ status_id: status_id, comment: message }
|
47
55
|
)
|
48
|
-
else
|
49
|
-
raise 'unable to get case id or run id'
|
50
56
|
end
|
51
57
|
|
52
58
|
response
|
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.
|
4
|
+
version: 0.1.4
|
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-12-
|
11
|
+
date: 2019-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|