allure-rspec 2.14.1 → 2.14.5
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 +35 -11
- data/lib/allure_rspec/config.rb +18 -8
- data/lib/allure_rspec/formatter.rb +2 -0
- data/lib/allure_rspec/metadata_parser.rb +4 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea0e2b39d052ab6ce62ec713aea67c85761948ad99644a7ab38454344c2cf038
|
4
|
+
data.tar.gz: 27ef4883b72bc051330fbdfa1589473510a38ada321031c44d81ddc2e0124042
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2258be4e6a31a40e7ba71620e3ad43c96e39c59b63e29824d61aa23bade64374b1db82b8e67194121b11d82a0c2344877ec28d5a87a27dce616e570b8ebeb467
|
7
|
+
data.tar.gz: 01e06499b28f67b637a4aff5a2337e715ed14af550394c55f35892074ebdb1114d2cb21ee3756786d7d56a3d27deaeeacc8879c63510744be259d0c056e91577
|
data/README.md
CHANGED
@@ -23,17 +23,25 @@ require "allure-rspec"
|
|
23
23
|
Following configuration options are supported:
|
24
24
|
|
25
25
|
```ruby
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
AllureRspec.configure do |config|
|
27
|
+
config.results_directory = "report/allure-results"
|
28
|
+
config.clean_results_directory = true
|
29
|
+
config.logging_level = Logger::INFO
|
30
|
+
config.logger = Logger.new($stdout, Logger::DEBUG)
|
31
|
+
config.environment = "staging"
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
# these are used for creating links to bugs or test cases where {} is replaced with keys of relevant items
|
34
|
+
config.link_tms_pattern = "http://www.jira.com/browse/{}"
|
35
|
+
config.link_issue_pattern = "http://www.jira.com/browse/{}"
|
36
|
+
|
37
|
+
# additional metadata
|
38
|
+
# environment.properties
|
39
|
+
config.environment_properties = {
|
40
|
+
custom_attribute: "foo"
|
41
|
+
}
|
42
|
+
# categories.json
|
43
|
+
config.categories = File.new("my_custom_categories.json")
|
44
|
+
end
|
37
45
|
```
|
38
46
|
|
39
47
|
## Usage
|
@@ -144,7 +152,23 @@ it "some test case", allure_1: "visual_test", allure_2: "core_functionality" do
|
|
144
152
|
end
|
145
153
|
```
|
146
154
|
|
147
|
-
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
|
+
```
|
148
172
|
|
149
173
|
### Behavior driven test grouping
|
150
174
|
|
data/lib/allure_rspec/config.rb
CHANGED
@@ -50,7 +50,11 @@ module AllureRspec
|
|
50
50
|
:results_directory,
|
51
51
|
:results_directory=,
|
52
52
|
:environment,
|
53
|
-
:environment
|
53
|
+
:environment=,
|
54
|
+
:environment_properties,
|
55
|
+
:environment_properties=,
|
56
|
+
:categories,
|
57
|
+
:categories=
|
54
58
|
|
55
59
|
def initialize
|
56
60
|
@allure_config = Allure.configuration
|
@@ -61,36 +65,42 @@ module AllureRspec
|
|
61
65
|
:severity_tag,
|
62
66
|
:epic_tag,
|
63
67
|
:feature_tag,
|
64
|
-
:story_tag
|
68
|
+
:story_tag,
|
69
|
+
:ignored_tags
|
65
70
|
|
66
71
|
# @return [Symbol]
|
67
72
|
def tms_tag
|
68
|
-
@
|
73
|
+
@tms_tag || DEFAULT_TMS_TAG
|
69
74
|
end
|
70
75
|
|
71
76
|
# @return [Symbol]
|
72
77
|
def issue_tag
|
73
|
-
@
|
78
|
+
@issue_tag || DEFAULT_ISSUE_TAG
|
74
79
|
end
|
75
80
|
|
76
81
|
# @return [Symbol]
|
77
82
|
def severity_tag
|
78
|
-
@
|
83
|
+
@severity_tag || DEFAULT_SEVERITY_TAG
|
79
84
|
end
|
80
85
|
|
81
86
|
# @return [Symbol]
|
82
87
|
def epic_tag
|
83
|
-
@
|
88
|
+
@epic_tag || DEFAULT_EPIC_TAG
|
84
89
|
end
|
85
90
|
|
86
91
|
# @return [Symbol]
|
87
92
|
def feature_tag
|
88
|
-
@
|
93
|
+
@feature_tag || DEFAULT_FEATURE_TAG
|
89
94
|
end
|
90
95
|
|
91
96
|
# @return [Symbol]
|
92
97
|
def story_tag
|
93
|
-
@
|
98
|
+
@story_tag || DEFAULT_STORY_TAG
|
99
|
+
end
|
100
|
+
|
101
|
+
# @return [Array]
|
102
|
+
def ignored_tags
|
103
|
+
@ignored_tags || []
|
94
104
|
end
|
95
105
|
end
|
96
106
|
end
|
@@ -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.14.
|
4
|
+
version: 2.14.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-18 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.14.
|
19
|
+
version: 2.14.5
|
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.14.
|
26
|
+
version: 2.14.5
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
|
-
rubygems_version: 3.2.
|
84
|
+
rubygems_version: 3.2.22
|
85
85
|
signing_key:
|
86
86
|
specification_version: 4
|
87
87
|
summary: Allure rspec ruby adaptor
|