res 1.2.20 → 1.2.21
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/README.md +2 -1
- data/lib/res/reporters/test_rail.rb +10 -3
- data/lib/res/version.rb +1 -1
- metadata +4 -5
- data/lib/res/parsers/xcpretty.rb +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa47591e6555761400892799664608c6d0f9ba64
|
4
|
+
data.tar.gz: 08f5b36d7700f282b9cead800f73dd9cfa180ed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9adc025bf775ed2aa7156809b6c76622ae44207cd4c157410032be3762c085167cd1266687b6d79867fedf97ff59cc1b68e1981ec93848c5ac7ad9c8e9ecc6f
|
7
|
+
data.tar.gz: b72e8249710b3a40344c15aae8d6729eac09ce9cb7f301564ba2baee653620eee14fd9bc45a06c44994c3a95e1d2fbe27ce5dce23b921edb2e50201e6fc9b9b1
|
data/README.md
CHANGED
@@ -81,8 +81,9 @@ Your config file should be called .test_rail.yaml, and should look like this:
|
|
81
81
|
project: 'MyProjectName'
|
82
82
|
suite: 'MySuite'
|
83
83
|
run_name: 'RunName' or run_id: '1234'
|
84
|
+
plan_name: 'PlanName'
|
84
85
|
|
85
|
-
Note: Above parameters can also be set through environment as TESTRAIL_#{PARAMETER} instead of config file.
|
86
|
+
Note: Above parameters can also be set through environment as TESTRAIL_#{PARAMETER} instead of config file. `plan_name` is optional.
|
86
87
|
|
87
88
|
### Testmine
|
88
89
|
|
@@ -10,7 +10,7 @@ module Res
|
|
10
10
|
attr_accessor :ir, :case_status, :config, :project, :suite
|
11
11
|
def initialize(args)
|
12
12
|
@url = args[:url]
|
13
|
-
@config = Res::Config.new([:user, :password, :namespace, :project, :suite], :optional => [:run_id, :run_name], :pre_env => 'testrail_')
|
13
|
+
@config = Res::Config.new([:user, :password, :namespace, :project, :suite], :optional => [:plan_name, :run_id, :run_name], :pre_env => 'testrail_')
|
14
14
|
config.process(args)
|
15
15
|
|
16
16
|
@case_status = {}
|
@@ -53,13 +53,20 @@ module Res
|
|
53
53
|
sync_tests(ir) if !@synced
|
54
54
|
suite = @project.find_suite(:name => @suite_name)
|
55
55
|
|
56
|
+
plan_name = @config.plan_name || args[:plan_name] || nil
|
56
57
|
run_name = @config.run_name || args[:run_name] || nil
|
57
58
|
run_id = @config.run_id || args[:run_id] || nil
|
58
|
-
|
59
|
+
|
59
60
|
if !run_name.nil?
|
60
61
|
run_name = @config.run_name
|
61
62
|
@io.puts "> Created new run with name #{run_name}"
|
62
|
-
|
63
|
+
|
64
|
+
if plan_name
|
65
|
+
plan = @project.find_or_create_plan(:name => plan_name, :id => @project.id)
|
66
|
+
run_id = @tr.add_run_in_plan(:project_id => @project.id, :plan_id => plan.id, :name => run_name, :description => args[:run_description], :suite_id => suite.id).id
|
67
|
+
else
|
68
|
+
run_id = @tr.add_run( :project_id => @project.id, :name => run_name, :description => args[:run_description], :suite_id => suite.id ).id
|
69
|
+
end
|
63
70
|
@io.puts "> Created new run: #{run_id}"
|
64
71
|
|
65
72
|
elsif !run_id.nil?
|
data/lib/res/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: res
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
version: 0.4.1
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
42
|
+
version: 0.4.1
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: ox
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +103,6 @@ files:
|
|
103
103
|
- lib/res/parsers/android_junit.rb
|
104
104
|
- lib/res/parsers/junit.rb
|
105
105
|
- lib/res/parsers/junitcasper.rb
|
106
|
-
- lib/res/parsers/xcpretty.rb
|
107
106
|
- lib/res/reporters/hive.rb
|
108
107
|
- lib/res/reporters/lion.rb
|
109
108
|
- lib/res/reporters/test_rail.rb
|
data/lib/res/parsers/xcpretty.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'res/ir'
|
2
|
-
|
3
|
-
module Res
|
4
|
-
module Parsers
|
5
|
-
class Xcpretty
|
6
|
-
|
7
|
-
def initialize instrument_output
|
8
|
-
File.write('./instruments.res',
|
9
|
-
::Res::IR.new( type: 'XCPrettyRunner',
|
10
|
-
started: '',
|
11
|
-
finished: Time.now,
|
12
|
-
results: parse(instrument_output)
|
13
|
-
).json)
|
14
|
-
end
|
15
|
-
|
16
|
-
def parse output
|
17
|
-
result = [
|
18
|
-
{
|
19
|
-
type: 'XCPretty',
|
20
|
-
name: 'XCPretty',
|
21
|
-
children: Array.new
|
22
|
-
}
|
23
|
-
]
|
24
|
-
|
25
|
-
File.open(output) do |f|
|
26
|
-
f.each_line do |line|
|
27
|
-
if line.match('\s*✓ (\S+) ')
|
28
|
-
result.last[:children] << {
|
29
|
-
type: 'Xcpretty::Test',
|
30
|
-
name: Regexp.last_match[0].strip,
|
31
|
-
status: 'passed'
|
32
|
-
}
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
result
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|