qat-cucumber 6.0.0 → 7.0.3
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/qat/cucumber/core_ext/formatter/html.rb +45 -45
- data/lib/qat/cucumber/core_ext/formatter/junit.rb +53 -53
- data/lib/qat/cucumber/core_ext/result.rb +16 -16
- data/lib/qat/cucumber/hooks/scenario.rb +34 -32
- data/lib/qat/cucumber/version.rb +1 -1
- data/lib/qat/formatter/builder.rb +86 -0
- data/lib/qat/formatter/console.rb +16 -77
- data/lib/qat/formatter/dashboard.rb +15 -59
- data/lib/qat/formatter/helper.rb +91 -0
- data/lib/qat/formatter/loggable.rb +4 -4
- data/lib/qat/formatter/scenario/name.rb +38 -19
- data/lib/qat/formatter/tags.rb +28 -31
- data/lib/qat/formatter/test_ids.rb +43 -34
- data/lib/qat/formatter/utility_function.rb +65 -0
- data/lib/qat/project/Gemfile +2 -11
- data/lib/qat/project/config/env-dummy/time.yml +1 -1
- data/lib/qat/project/features/support/hooks.rb +1 -1
- data/lib/qat/tasks/tags/test_ids/helpers.rb +5 -5
- metadata +16 -12
@@ -0,0 +1,65 @@
|
|
1
|
+
|
2
|
+
module QAT
|
3
|
+
module Formatter
|
4
|
+
# Helper for Formatters , most of the main methods are done to reduce code duplication
|
5
|
+
module UtilityFuction
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
def background(background)
|
10
|
+
@background_hash = {
|
11
|
+
keyword: background.keyword,
|
12
|
+
name: background.name,
|
13
|
+
description: background.description.nil? ? '' : background.description,
|
14
|
+
line: background.location.line,
|
15
|
+
type: 'background'
|
16
|
+
}
|
17
|
+
end
|
18
|
+
|
19
|
+
def create_feature_hash feature,uri
|
20
|
+
@feature_hash = {
|
21
|
+
id: feature.name,
|
22
|
+
uri: uri,
|
23
|
+
keyword: feature.keyword,
|
24
|
+
name: feature.name,
|
25
|
+
description: feature.description.nil? ? '' : feature.description,
|
26
|
+
line: feature.location.line
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_lines_from_scenario(scenario_source, test_case)
|
31
|
+
if scenario_source.type == :Scenario
|
32
|
+
test_case.location.lines.max
|
33
|
+
else
|
34
|
+
test_case.location.lines.min
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def calculate_row_number(scenario_source)
|
39
|
+
scenario_source.examples.table_body.each_with_index do |row, index|
|
40
|
+
return index + 1 if row == scenario_source.row
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def get_example_values(scenario_source)
|
45
|
+
scenario_source.examples.table_body.each do |row|
|
46
|
+
if row == scenario_source.row
|
47
|
+
add_values_to_examples row[:cells]
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def internal_hook?(test_step)
|
53
|
+
test_step.location.file.include?('lib/qat/cucumber/')
|
54
|
+
end
|
55
|
+
|
56
|
+
def support_hook?(test_step)
|
57
|
+
test_step.location.file.include?('features/support/hooks')
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
data/lib/qat/project/Gemfile
CHANGED
@@ -1,13 +1,4 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
# QAT is a Cucumber-based toolkit for automating tests. (https://
|
4
|
-
gem 'qat'
|
5
|
-
|
6
|
-
# QAT-Web is a browser controller for Web testing (http://gitlab.readinessit.com:8083/qa-toolkit/qat-web)
|
7
|
-
#gem 'qat-web', '~> 2.0', '>= 2.0.0'
|
8
|
-
|
9
|
-
# Ruby headless display interface (http://leonid.shevtsov.me/en/headless)
|
10
|
-
#gem 'headless', '~> 2.3', '>= 2.3.1'
|
11
|
-
|
12
|
-
# The next generation developer focused tool for automated testing of webapps (https://github.com/seleniumhq/selenium)
|
13
|
-
#gem 'selenium-webdriver', '~> 2.53', '>= 2.53.4'
|
3
|
+
# QAT is a Cucumber-based toolkit for automating tests. (https://github.com/readiness-it/qat-cucumber)
|
4
|
+
gem 'qat-cucumber'
|
@@ -15,7 +15,7 @@ module TestIds
|
|
15
15
|
|
16
16
|
update_test_ids(files, max_test_id)
|
17
17
|
else
|
18
|
-
puts "There are no scenarios without test id. Last test id given was '@test##{max_test_id}'."
|
18
|
+
Kernel.puts "There are no scenarios without test id. Last test id given was '@test##{max_test_id}'."
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
@@ -39,8 +39,8 @@ module TestIds
|
|
39
39
|
#@param files [Array] list of files to change
|
40
40
|
#@see TestIds::Helpers#map_untaged
|
41
41
|
def announce_changes(files)
|
42
|
-
puts "Giving test ids to scenarios:"
|
43
|
-
puts files.to_json({
|
42
|
+
Kernel.puts "Giving test ids to scenarios:"
|
43
|
+
Kernel.puts files.to_json({
|
44
44
|
indent: ' ',
|
45
45
|
space: ' ',
|
46
46
|
object_nl: "\n"
|
@@ -57,7 +57,7 @@ module TestIds
|
|
57
57
|
files.each { |file, lines| max_test_id = rewrite_file(file, lines, max_test_id) }
|
58
58
|
rescue
|
59
59
|
path = File.join(Dir.pwd, 'public', 'test_ids_failed.feature')
|
60
|
-
puts "Tag attribution failed! Check '#{path}' for more information!"
|
60
|
+
Kernel.puts "Tag attribution failed! Check '#{path}' for more information!"
|
61
61
|
File.write(path, file_lines.join)
|
62
62
|
end
|
63
63
|
end
|
@@ -75,7 +75,7 @@ module TestIds
|
|
75
75
|
|
76
76
|
norm_lines.size.times do
|
77
77
|
line = norm_lines.shift
|
78
|
-
puts "Editing file #{file} @ line #{line}."
|
78
|
+
Kernel.puts "Editing file #{file} @ line #{line}."
|
79
79
|
max_test_id = add_tags(file_lines, line, max_test_id)
|
80
80
|
end
|
81
81
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qat-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 7.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- QAT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 5.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 5.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,28 +72,28 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '8.0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '8.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: qat-devel
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '8.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '8.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: httparty
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,14 +138,17 @@ files:
|
|
138
138
|
- lib/qat/cucumber/time.rb
|
139
139
|
- lib/qat/cucumber/version.rb
|
140
140
|
- lib/qat/cucumber/world.rb
|
141
|
+
- lib/qat/formatter/builder.rb
|
141
142
|
- lib/qat/formatter/console.rb
|
142
143
|
- lib/qat/formatter/dashboard.rb
|
144
|
+
- lib/qat/formatter/helper.rb
|
143
145
|
- lib/qat/formatter/loggable.rb
|
144
146
|
- lib/qat/formatter/loggable/mdc.rb
|
145
147
|
- lib/qat/formatter/loggable/scenario_info.rb
|
146
148
|
- lib/qat/formatter/scenario/name.rb
|
147
149
|
- lib/qat/formatter/tags.rb
|
148
150
|
- lib/qat/formatter/test_ids.rb
|
151
|
+
- lib/qat/formatter/utility_function.rb
|
149
152
|
- lib/qat/jenkins.rb
|
150
153
|
- lib/qat/project/Gemfile
|
151
154
|
- lib/qat/project/Rakefile
|
@@ -167,10 +170,11 @@ files:
|
|
167
170
|
- lib/qat/tasks/tags/test_ids/helpers.rb
|
168
171
|
- lib/qat/tasks/tags/test_ids/report.rb
|
169
172
|
- lib/qat/tasks/test.rb
|
170
|
-
homepage: https://
|
173
|
+
homepage: https://www.readinessit.com
|
171
174
|
licenses:
|
172
175
|
- GPL-3.0
|
173
|
-
metadata:
|
176
|
+
metadata:
|
177
|
+
source_code_uri: https://github.com/readiness-it/qat-cucumber
|
174
178
|
post_install_message:
|
175
179
|
rdoc_options: []
|
176
180
|
require_paths:
|
@@ -179,14 +183,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
183
|
requirements:
|
180
184
|
- - "~>"
|
181
185
|
- !ruby/object:Gem::Version
|
182
|
-
version: '2.
|
186
|
+
version: '2.5'
|
183
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
184
188
|
requirements:
|
185
189
|
- - ">="
|
186
190
|
- !ruby/object:Gem::Version
|
187
191
|
version: '0'
|
188
192
|
requirements: []
|
189
|
-
rubygems_version: 3.0.
|
193
|
+
rubygems_version: 3.0.8
|
190
194
|
signing_key:
|
191
195
|
specification_version: 4
|
192
196
|
summary: QAT is a Cucumber-based toolkit for automating tests.
|