qat-cucumber 6.0.1 → 7.0.4
Sign up to get free protection for your applications and to get access to all the features.
- 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 -78
- data/lib/qat/formatter/dashboard.rb +15 -59
- data/lib/qat/formatter/helper.rb +89 -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 +58 -0
- data/lib/qat/project/Gemfile +1 -7
- 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 +13 -10
@@ -0,0 +1,58 @@
|
|
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 features?(test_step)
|
53
|
+
test_step.location.file.include?('.feature')
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/lib/qat/project/Gemfile
CHANGED
@@ -1,10 +1,4 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
3
|
# QAT is a Cucumber-based toolkit for automating tests. (https://github.com/readiness-it/qat-cucumber)
|
4
|
-
gem 'qat-cucumber'
|
5
|
-
|
6
|
-
# QAT-Web is a browser controller for Web testing (https://github.com/readiness-it/qat-web)
|
7
|
-
#gem 'qat-web', '~> 6.0'
|
8
|
-
|
9
|
-
# The next generation developer focused tool for automated testing of webapps (https://github.com/seleniumhq/selenium)
|
10
|
-
#gem 'selenium-webdriver'
|
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.4
|
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-28 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
|
@@ -180,14 +183,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
180
183
|
requirements:
|
181
184
|
- - "~>"
|
182
185
|
- !ruby/object:Gem::Version
|
183
|
-
version: '2.
|
186
|
+
version: '2.5'
|
184
187
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
188
|
requirements:
|
186
189
|
- - ">="
|
187
190
|
- !ruby/object:Gem::Version
|
188
191
|
version: '0'
|
189
192
|
requirements: []
|
190
|
-
rubygems_version: 3.0.
|
193
|
+
rubygems_version: 3.0.8
|
191
194
|
signing_key:
|
192
195
|
specification_version: 4
|
193
196
|
summary: QAT is a Cucumber-based toolkit for automating tests.
|