allure_turnip 0.3.1 → 0.4.0
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/Gemfile.lock +1 -1
- data/README.md +7 -5
- data/lib/allure_turnip.rb +6 -1
- data/lib/allure_turnip/formatter.rb +2 -0
- data/lib/allure_turnip/version.rb +1 -1
- data/spec/annotation.feature +6 -4
- data/spec/spec_helper.rb +3 -2
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e565f7fb113ec66ec55f4acac708ab10fa619b659d92eba59f734347e12faa8
|
4
|
+
data.tar.gz: aecc8869cf96b7f1284eb1435238eaf3fbe09a208db49fb8b70dc07d84f04286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 457306f59323f2b45436855c4baec4a8e8b5c030ecc736597554c3722f664622cc5170b004c9a3a8124772e0eb5373944f03e7ed5546a7ae7fbaa688089668dd
|
7
|
+
data.tar.gz: 0a3a544c64050ba0e0dea29482a719a39d276f5c0403946db4d6d899c115a447c2d3b4268b2eb405959c76127d71b64a77f804b4893fe8617a359d95e98bdb81
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Allure Turnip
|
2
2
|
|
3
|
-
[](
|
3
|
+
[](https://badge.fury.io/rb/allure_turnip) [](https://travis-ci.org/aha-oretama/allure_turnip)
|
4
4
|
|
5
5
|
Adaptor to use the Allure framework along with the [Turnip](https://github.com/jnicklas/turnip).
|
6
6
|
|
@@ -46,8 +46,9 @@ Allure_turnip will analyze your tags looking for Test Management, Issue Manageme
|
|
46
46
|
c.clean_dir = false # clean the output directory first? (default: true)
|
47
47
|
c.logging_level = Logger::DEBUG # logging level (default: DEBUG)
|
48
48
|
c.feature_with_filename = true # default: false
|
49
|
-
c.tms_prefix = '@
|
50
|
-
c.issue_prefix = '@JIRA
|
49
|
+
c.tms_prefix = '@TEST-' # default: '@TMS:'
|
50
|
+
c.issue_prefix = '@JIRA:' # default: '@ISSUE:'
|
51
|
+
c.severity_prefix = '@PRIORITY:' # default: '@SEVERITY:'
|
51
52
|
end
|
52
53
|
```
|
53
54
|
|
@@ -60,8 +61,9 @@ The method attaches the file in the Allure result.
|
|
60
61
|
**feature**
|
61
62
|
```ruby
|
62
63
|
Feature: Attach File
|
63
|
-
@
|
64
|
-
@JIRA
|
64
|
+
@TEST-1234
|
65
|
+
@JIRA:abc1234
|
66
|
+
@PRIORITY:critical
|
65
67
|
Scenario: This is an attaching file feature
|
66
68
|
Given attach file
|
67
69
|
```
|
data/lib/allure_turnip.rb
CHANGED
@@ -10,13 +10,14 @@ require 'allure_turnip/turnip_extension'
|
|
10
10
|
module AllureTurnip
|
11
11
|
module Config
|
12
12
|
class << self
|
13
|
-
attr_accessor :output_dir, :clean_dir, :logging_level, :feature_with_filename, :tms_prefix, :issue_prefix
|
13
|
+
attr_accessor :output_dir, :clean_dir, :logging_level, :feature_with_filename, :tms_prefix, :issue_prefix, :severity_prefix
|
14
14
|
|
15
15
|
DEFAULT_OUTPUT_DIR = 'gen/allure-results'
|
16
16
|
DEFAULT_LOGGING_LEVEL = Logger::DEBUG
|
17
17
|
DEFAULT_FEATURE_WITH_FILENAME = false
|
18
18
|
DEFAULT_TMS_PREFIX = '@TMS:'
|
19
19
|
DEFAULT_ISSUE_PREFIX = '@ISSUE:'
|
20
|
+
DEFAULT_SEVERITY_PREFIX = '@SEVERITY:'
|
20
21
|
|
21
22
|
def output_dir
|
22
23
|
@output_dir || DEFAULT_OUTPUT_DIR
|
@@ -41,6 +42,10 @@ module AllureTurnip
|
|
41
42
|
def issue_prefix
|
42
43
|
@issue_prefix || DEFAULT_ISSUE_PREFIX
|
43
44
|
end
|
45
|
+
|
46
|
+
def severity_prefix
|
47
|
+
@severity_prefix || DEFAULT_SEVERITY_PREFIX
|
48
|
+
end
|
44
49
|
end
|
45
50
|
end
|
46
51
|
|
@@ -134,8 +134,10 @@ module AllureTurnip
|
|
134
134
|
keys = metadata(example_or_group).keys
|
135
135
|
testId = abstract_tags(keys, AllureTurnip::Config.tms_prefix)
|
136
136
|
issue = abstract_tags(keys, AllureTurnip::Config.issue_prefix)
|
137
|
+
severity = abstract_tags(keys, AllureTurnip::Config.severity_prefix)
|
137
138
|
labels[:testId] = testId if testId
|
138
139
|
labels[:issue] = issue if issue
|
140
|
+
labels[:severity] = severity if severity
|
139
141
|
end
|
140
142
|
|
141
143
|
def abstract_tags(keys, prefix)
|
data/spec/annotation.feature
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
Feature: Annotation
|
2
2
|
|
3
|
-
@
|
4
|
-
@JIRA
|
3
|
+
@TEST-1234
|
4
|
+
@JIRA:abc123
|
5
|
+
@PRIORITY:critical
|
5
6
|
Scenario: This is an annotation feature
|
6
7
|
Given there is a monster
|
7
8
|
|
8
|
-
@
|
9
|
-
@JIRA
|
9
|
+
@TEST-5678
|
10
|
+
@JIRA:abc567
|
11
|
+
@PRIORITY:trivial
|
10
12
|
Scenario: This is an annotation feature2
|
11
13
|
Given there is a monster
|
data/spec/spec_helper.rb
CHANGED
@@ -19,7 +19,8 @@ end
|
|
19
19
|
AllureTurnip.configure do |c|
|
20
20
|
c.output_dir = "allure"
|
21
21
|
c.feature_with_filename = true
|
22
|
-
c.tms_prefix = '@
|
23
|
-
c.issue_prefix = '@JIRA
|
22
|
+
c.tms_prefix = '@TEST-'
|
23
|
+
c.issue_prefix = '@JIRA:'
|
24
|
+
c.severity_prefix = '@PRIORITY:'
|
24
25
|
end
|
25
26
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure_turnip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aha-oretama
|
@@ -156,8 +156,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
|
159
|
+
rubyforge_project:
|
160
|
+
rubygems_version: 2.7.7
|
160
161
|
signing_key:
|
161
162
|
specification_version: 4
|
162
|
-
summary: allure_turnip-0.
|
163
|
+
summary: allure_turnip-0.4.0
|
163
164
|
test_files: []
|