allure-rspec 2.14.3 → 2.16.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 +17 -1
- data/lib/allure_rspec/config.rb +13 -7
- data/lib/allure_rspec/formatter.rb +8 -1
- data/lib/allure_rspec/metadata_parser.rb +4 -3
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c31ffb55b6546c589047d46597dabe77f33e858d5665c2e32b476759218fa4e
|
4
|
+
data.tar.gz: ad67ce9f4de3071ba9d7f02f640dd508a54a77d258df75c4b1d2110e13d67457
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a75ce5c4bf4ab3a054a941c7f5861f636e83bc461f81046f5ef6e62884c92a66ff50efe9c6a8b14cee599014362187aae57a867fdd6aebce7b3b5587a413630
|
7
|
+
data.tar.gz: f42966b4b5a903bd667d5d67d0b2efcde9cda60cb4b066d7348e63c831f802f065dcc12b1b0223b1a4910c04583d2075d37039ccd752743f1712708d3000b60b
|
data/README.md
CHANGED
@@ -152,7 +152,23 @@ it "some test case", allure_1: "visual_test", allure_2: "core_functionality" do
|
|
152
152
|
end
|
153
153
|
```
|
154
154
|
|
155
|
-
All
|
155
|
+
All other metadata tags are also automatically added as labels:
|
156
|
+
|
157
|
+
```ruby
|
158
|
+
it "some test case", :visual_test, :core_functionality do
|
159
|
+
# test
|
160
|
+
end
|
161
|
+
```
|
162
|
+
|
163
|
+
#### Skipping certain tags
|
164
|
+
|
165
|
+
To skip adding certain tags as labels, following configuration can be added:
|
166
|
+
|
167
|
+
```ruby
|
168
|
+
AllureRspec.configure do |config|
|
169
|
+
config.ignored_tags = [:core_functionality, :generic_metadata_to_ignore]
|
170
|
+
end
|
171
|
+
```
|
156
172
|
|
157
173
|
### Behavior driven test grouping
|
158
174
|
|
data/lib/allure_rspec/config.rb
CHANGED
@@ -65,36 +65,42 @@ module AllureRspec
|
|
65
65
|
:severity_tag,
|
66
66
|
:epic_tag,
|
67
67
|
:feature_tag,
|
68
|
-
:story_tag
|
68
|
+
:story_tag,
|
69
|
+
:ignored_tags
|
69
70
|
|
70
71
|
# @return [Symbol]
|
71
72
|
def tms_tag
|
72
|
-
@
|
73
|
+
@tms_tag || DEFAULT_TMS_TAG
|
73
74
|
end
|
74
75
|
|
75
76
|
# @return [Symbol]
|
76
77
|
def issue_tag
|
77
|
-
@
|
78
|
+
@issue_tag || DEFAULT_ISSUE_TAG
|
78
79
|
end
|
79
80
|
|
80
81
|
# @return [Symbol]
|
81
82
|
def severity_tag
|
82
|
-
@
|
83
|
+
@severity_tag || DEFAULT_SEVERITY_TAG
|
83
84
|
end
|
84
85
|
|
85
86
|
# @return [Symbol]
|
86
87
|
def epic_tag
|
87
|
-
@
|
88
|
+
@epic_tag || DEFAULT_EPIC_TAG
|
88
89
|
end
|
89
90
|
|
90
91
|
# @return [Symbol]
|
91
92
|
def feature_tag
|
92
|
-
@
|
93
|
+
@feature_tag || DEFAULT_FEATURE_TAG
|
93
94
|
end
|
94
95
|
|
95
96
|
# @return [Symbol]
|
96
97
|
def story_tag
|
97
|
-
@
|
98
|
+
@story_tag || DEFAULT_STORY_TAG
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [Array]
|
102
|
+
def ignored_tags
|
103
|
+
@ignored_tags || []
|
98
104
|
end
|
99
105
|
end
|
100
106
|
end
|
@@ -19,6 +19,7 @@ module AllureRspec
|
|
19
19
|
RSpec::Core::Formatters.register(
|
20
20
|
self,
|
21
21
|
:start,
|
22
|
+
:stop,
|
22
23
|
:example_group_started,
|
23
24
|
:example_group_finished,
|
24
25
|
:example_started,
|
@@ -45,7 +46,6 @@ module AllureRspec
|
|
45
46
|
# @return [void]
|
46
47
|
def start(_start_notification)
|
47
48
|
lifecycle.clean_results_dir
|
48
|
-
lifecycle.write_environment
|
49
49
|
lifecycle.write_categories
|
50
50
|
|
51
51
|
RSpec::Core::Example.class_eval do
|
@@ -53,6 +53,13 @@ module AllureRspec
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
+
# Start test run
|
57
|
+
# @param [RSpec::Core::Notifications::StopNotification] _stop_notification
|
58
|
+
# @return [void]
|
59
|
+
def stop(_stop_notification)
|
60
|
+
lifecycle.write_environment
|
61
|
+
end
|
62
|
+
|
56
63
|
# Starts example group
|
57
64
|
# @param [RSpec::Core::Notifications::GroupNotification] example_group_notification
|
58
65
|
# @return [void]
|
@@ -144,8 +144,8 @@ module AllureRspec
|
|
144
144
|
return [] unless link_pattern
|
145
145
|
|
146
146
|
metadata
|
147
|
-
.select { |
|
148
|
-
.map { |
|
147
|
+
.select { |key| __send__("#{type}?", key) }
|
148
|
+
.map { |key, value| Allure::ResultUtils.public_send("#{type}_link", key.to_s, value, link_pattern) }
|
149
149
|
end
|
150
150
|
|
151
151
|
# Special allure metadata tags
|
@@ -157,7 +157,8 @@ module AllureRspec
|
|
157
157
|
config.severity_tag,
|
158
158
|
config.epic_tag,
|
159
159
|
config.feature_tag,
|
160
|
-
config.story_tag
|
160
|
+
config.story_tag,
|
161
|
+
*config.ignored_tags
|
161
162
|
].include?(key)
|
162
163
|
end
|
163
164
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.16.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allure-ruby-commons
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.16.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: 2.16.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,7 @@ metadata:
|
|
66
66
|
documentation_uri: https://github.com/allure-framework/allure-ruby/blob/master/allure-rspec/README.md
|
67
67
|
source_code_uri: https://github.com/allure-framework/allure-ruby/tree/master/allure-rspec
|
68
68
|
wiki_uri: https://github.com/allure-framework/allure-ruby/wiki
|
69
|
+
rubygems_mfa_required: 'false'
|
69
70
|
post_install_message:
|
70
71
|
rdoc_options: []
|
71
72
|
require_paths:
|
@@ -81,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
82
|
- !ruby/object:Gem::Version
|
82
83
|
version: '0'
|
83
84
|
requirements: []
|
84
|
-
rubygems_version: 3.
|
85
|
+
rubygems_version: 3.3.3
|
85
86
|
signing_key:
|
86
87
|
specification_version: 4
|
87
88
|
summary: Allure rspec ruby adaptor
|