hiptest-publisher 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/hiptest-publisher/cli_options_checker.rb +12 -0
- data/lib/hiptest-publisher/client.rb +12 -1
- data/lib/hiptest-publisher/options_parser.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bc0afeff908897024513d4dcf2cd04f278eb730
|
4
|
+
data.tar.gz: e26fb89602bb7776af91ba8aa4bc2b707f6723c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28b55944ead93f28f267fe36aec274fcf67c9ddab8914eb1c8c41134fba96a87104b30583becf7e5c3d6e2ccd0f9b3f9b3417a9b38f224a7f60d586526f4567f
|
7
|
+
data.tar.gz: 4efec91765d95ef84a0579c4f3f4db1e53591944892a888db6e746a80f32f1cdc1b4e686ce21de9002b08633ce7165b88eea43f0016d031b9424aa4e8ce48c87
|
data/README.md
CHANGED
@@ -131,6 +131,7 @@ Specific options:
|
|
131
131
|
--filter-on-scenario-name Filter on scenario name (only one name is accepted)
|
132
132
|
--filter-on-folder-name Filter on folder name (only one name is accepted)
|
133
133
|
--filter-on-tags Filter on scenarios and folder tags (use commas to separate tags when using multiple tags)
|
134
|
+
--filter-on-status=STATUS Filter on test status in last build (use in conjunction with a test run)
|
134
135
|
-v, --verbose Run verbosely (default: false)
|
135
136
|
-H, --languages-help Show languages and framework options
|
136
137
|
-h, --help Show this message
|
@@ -22,6 +22,7 @@ module Hiptest
|
|
22
22
|
|
23
23
|
check_secret_token
|
24
24
|
check_filters
|
25
|
+
check_status_filter
|
25
26
|
|
26
27
|
if cli_options.push?
|
27
28
|
check_push_file
|
@@ -72,6 +73,17 @@ module Hiptest
|
|
72
73
|
check_tag_list(:filter_on_tags)
|
73
74
|
end
|
74
75
|
|
76
|
+
def check_status_filter
|
77
|
+
return if absent?(cli_options.filter_on_status)
|
78
|
+
|
79
|
+
if absent?(cli_options.test_run_id) && absent?(cli_options.test_run_name)
|
80
|
+
raise CliOptionError, [
|
81
|
+
"You need to specify a test run when filtering on test status.",
|
82
|
+
"Use options test_run_id or test_run_name."
|
83
|
+
].join("\n")
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
75
87
|
def check_secret_token
|
76
88
|
if absent?(cli_options.xml_file)
|
77
89
|
if absent?(cli_options.token)
|
@@ -21,7 +21,7 @@ module Hiptest
|
|
21
21
|
if cli_options.push?
|
22
22
|
"#{cli_options.site}/import_test_results/#{cli_options.token}/#{cli_options.push_format}"
|
23
23
|
elsif test_run_id
|
24
|
-
"#{base_publication_path}/test_run/#{test_run_id}"
|
24
|
+
"#{base_publication_path}/test_run/#{test_run_id}#{test_run_export_filter}"
|
25
25
|
else
|
26
26
|
"#{base_publication_path}/#{cli_options.leafless_export ? 'leafless_tests' : 'project'}#{project_export_filters}"
|
27
27
|
end
|
@@ -40,11 +40,22 @@ module Hiptest
|
|
40
40
|
value = @cli_options.send(key)
|
41
41
|
next if value.nil? || value.empty?
|
42
42
|
|
43
|
+
if [:filter_on_scenario_ids, :filter_on_folder_ids, :filter_on_tags].include?(key)
|
44
|
+
value = value.split(',').map(&:strip).join(',')
|
45
|
+
end
|
46
|
+
|
43
47
|
"#{filter_name}=#{value}"
|
44
48
|
end.compact
|
45
49
|
return options.empty? ? '' : "?#{options.first}"
|
46
50
|
end
|
47
51
|
|
52
|
+
def test_run_export_filter
|
53
|
+
value = @cli_options.filter_on_status
|
54
|
+
return '' if value.nil? || value.empty?
|
55
|
+
|
56
|
+
return "?filter_status=#{value}"
|
57
|
+
end
|
58
|
+
|
48
59
|
def fetch_project_export
|
49
60
|
response = send_get_request(url)
|
50
61
|
if response.code_type == Net::HTTPNotFound
|
@@ -203,6 +203,8 @@ class OptionsParser
|
|
203
203
|
Option.new(nil, 'filter-on-scenario-name=NAME', '', String, "Filter on scenario name (only one name is accepted)", :filter_on_scenario_name),
|
204
204
|
Option.new(nil, 'filter-on-folder-name=NAME', '', String, "Filter on folder name (only one name is accepted)", :filter_on_folder_name),
|
205
205
|
Option.new(nil, 'filter-on-tags=TAGS', '', String, "Filter on scenarios and folder tags (use commas to separate tags when using multiple tags)", :filter_on_tags),
|
206
|
+
Option.new(nil, 'filter-on-status=STATUS', '', String, "Filter on test status in last build (use in conjunction with a test run)", :filter_on_status),
|
207
|
+
|
206
208
|
Option.new('v', 'verbose', false, nil, "Run verbosely", :verbose)
|
207
209
|
]
|
208
210
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiptest-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiptest R&D
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|