allure-cucumber 2.13.5.rc.1 → 2.13.6.2
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 +24 -22
- data/lib/allure-cucumber.rb +2 -2
- data/lib/allure_cucumber/config.rb +47 -25
- data/lib/allure_cucumber/models/tag_parser.rb +5 -5
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c97c4fd5f39aad081eb13a07fd627c999988ec37fc160d5e4924be131ae305d
|
4
|
+
data.tar.gz: '092488070300d60891966f32ff3e0c3af17476518312925507ad50e89218d4a9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f7043a469e904923fd95edc6e296c6ff18f4a5520292f4816f816aec08e2e72badb0c39c2bd8581077ec5127f7b1dc0897d7e5b67faa7ff1f6c1c838cca7630
|
7
|
+
data.tar.gz: 375579f7dfba4a170151eb1bb6d859892b47e604ee95a91da253e168e61d2af4a273bedac1a79f90c7da6c78a5ef914cc7b61f50a1a892ee1a6918c11db8d111
|
data/README.md
CHANGED
@@ -4,12 +4,17 @@
|
|
4
4
|
|
5
5
|
This repository contains Allure adaptor for [Cucumber](http://cukes.info/) framework.
|
6
6
|
|
7
|
+
## Cucumber versions
|
8
|
+
|
9
|
+
allure-cucumber versions <= 2.13.4 support only cucumber 3 and lower\
|
10
|
+
allure-cucumber versions >= 2.13.5 only support cucumber 4 and are not backwards compatible with cucumber 3 and lower
|
11
|
+
|
7
12
|
## Installation
|
8
13
|
|
9
14
|
Add this line to your application's Gemfile:
|
10
15
|
|
11
16
|
```ruby
|
12
|
-
gem
|
17
|
+
gem "allure-cucumber"
|
13
18
|
```
|
14
19
|
|
15
20
|
And then execute:
|
@@ -24,27 +29,30 @@ Or install it yourself as:
|
|
24
29
|
gem install allure-cucumber
|
25
30
|
```
|
26
31
|
|
27
|
-
|
32
|
+
Require in "support/env.rb":
|
28
33
|
|
29
|
-
|
30
|
-
allure-cucumber
|
34
|
+
```ruby
|
35
|
+
require "allure-cucumber"
|
36
|
+
```
|
31
37
|
|
32
38
|
## Configuration
|
33
39
|
|
34
|
-
Common allure configuration is set via `
|
40
|
+
Common allure configuration is set via `AllureCucumber.configure` method. To change it, add the following in `features/support/env.rb` file:
|
35
41
|
|
36
42
|
```ruby
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
require "allure-cucumber"
|
44
|
+
|
45
|
+
AllureCucumber.configure do |config|
|
46
|
+
config.results_directory = "/whatever/you/like"
|
47
|
+
config.clean_results_directory = true
|
48
|
+
config.logging_level = Logger::INFO
|
41
49
|
# these are used for creating links to bugs or test cases where {} is replaced with keys of relevant items
|
42
|
-
|
43
|
-
|
50
|
+
config.link_tms_pattern = "http://www.jira.com/browse/{}"
|
51
|
+
config.link_issue_pattern = "http://www.jira.com/browse/{}"
|
44
52
|
end
|
45
53
|
```
|
46
54
|
|
47
|
-
By default, allure-cucumber will analyze your cucumber tags looking for Test Management, Issue Management, and Severity
|
55
|
+
By default, allure-cucumber will analyze your cucumber tags looking for Test Management, Issue Management, and Severity tag. Links to TMS and ISSUE and test severity will be displayed in the report. By default these prefixes are used:
|
48
56
|
|
49
57
|
```ruby
|
50
58
|
DEFAULT_TMS_PREFIX = 'TMS:'
|
@@ -64,10 +72,10 @@ Example:
|
|
64
72
|
You can configure these prefixes as well as tms and issue tracker urls like this:
|
65
73
|
|
66
74
|
```ruby
|
67
|
-
AllureCucumber.configure do |
|
68
|
-
|
69
|
-
|
70
|
-
|
75
|
+
AllureCucumber.configure do |config|
|
76
|
+
config.tms_prefix = 'HIPTEST--'
|
77
|
+
config.issue_prefix = 'JIRA++'
|
78
|
+
config.severity_prefix = 'URGENCY:'
|
71
79
|
end
|
72
80
|
```
|
73
81
|
|
@@ -84,12 +92,6 @@ Additional special tags exists for setting status detail of test scenarios, allu
|
|
84
92
|
|
85
93
|
## Usage
|
86
94
|
|
87
|
-
Put the following in your `features/support/env.rb` file:
|
88
|
-
|
89
|
-
```ruby
|
90
|
-
require 'allure-cucumber'
|
91
|
-
```
|
92
|
-
|
93
95
|
Use `--format AllureCucumber::CucumberFormatter --out where/you-want-results` while running cucumber or add it to `cucumber.yml`. Note that cucumber `--out` option overrides `results_directory` set via `Allure.configure` method.
|
94
96
|
|
95
97
|
You can also manually attach screenshots and links to test steps and test cases by interacting with allure lifecycle directly. For more info check out `allure-ruby-commons`
|
data/lib/allure-cucumber.rb
CHANGED
@@ -12,7 +12,7 @@ module AllureCucumber
|
|
12
12
|
# Get allure cucumber configuration
|
13
13
|
# @return [Allure::CucumberConfig]
|
14
14
|
def configuration
|
15
|
-
CucumberConfig
|
15
|
+
CucumberConfig.instance
|
16
16
|
end
|
17
17
|
|
18
18
|
# Set allure configuration
|
@@ -20,7 +20,7 @@ module AllureCucumber
|
|
20
20
|
# @yieldreturn [void]
|
21
21
|
# @return [void]
|
22
22
|
def configure
|
23
|
-
yield(
|
23
|
+
yield(configuration)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -1,32 +1,54 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "singleton"
|
4
|
+
require "forwardable"
|
5
|
+
|
3
6
|
module AllureCucumber
|
4
7
|
# Allure cucumber configuration
|
5
|
-
class CucumberConfig
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
8
|
+
class CucumberConfig < Allure::Config
|
9
|
+
include Singleton
|
10
|
+
extend Forwardable
|
11
|
+
|
12
|
+
# @return [String] default tms tag prefix
|
13
|
+
DEFAULT_TMS_PREFIX = "TMS:"
|
14
|
+
# @return [String] default issue tag prefix
|
15
|
+
DEFAULT_ISSUE_PREFIX = "ISSUE:"
|
16
|
+
# @return [String] default severity tag prefix
|
17
|
+
DEFAULT_SEVERITY_PREFIX = "SEVERITY:"
|
18
|
+
|
19
|
+
def_delegators :@allure_config,
|
20
|
+
:clean_results_directory,
|
21
|
+
:clean_results_directory=,
|
22
|
+
:link_issue_pattern,
|
23
|
+
:link_issue_pattern=,
|
24
|
+
:link_tms_pattern,
|
25
|
+
:link_tms_pattern=,
|
26
|
+
:logging_level,
|
27
|
+
:logging_level=,
|
28
|
+
:results_directory,
|
29
|
+
:results_directory=
|
30
|
+
|
31
|
+
attr_writer :tms_prefix, :issue_prefix, :severity_prefix
|
32
|
+
|
33
|
+
def initialize
|
34
|
+
super()
|
35
|
+
|
36
|
+
@allure_config = Allure.configuration
|
37
|
+
end
|
38
|
+
|
39
|
+
# @return [String]
|
40
|
+
def tms_prefix
|
41
|
+
@tms_prefix || DEFAULT_TMS_PREFIX
|
42
|
+
end
|
43
|
+
|
44
|
+
# @return [String]
|
45
|
+
def issue_prefix
|
46
|
+
@issue_prefix || DEFAULT_ISSUE_PREFIX
|
47
|
+
end
|
48
|
+
|
49
|
+
# @return [String]
|
50
|
+
def severity_prefix
|
51
|
+
@severity_prefix || DEFAULT_SEVERITY_PREFIX
|
30
52
|
end
|
31
53
|
end
|
32
54
|
end
|
@@ -14,7 +14,7 @@ module AllureCucumber
|
|
14
14
|
# @param [Array<String>] tags
|
15
15
|
# @return [Array<Allure::Link>]
|
16
16
|
def tms_links(tags)
|
17
|
-
return [] unless
|
17
|
+
return [] unless AllureCucumber.configuration.link_tms_pattern
|
18
18
|
|
19
19
|
matching_links(tags, :tms)
|
20
20
|
end
|
@@ -22,7 +22,7 @@ module AllureCucumber
|
|
22
22
|
# @param [Array<String>] tags
|
23
23
|
# @return [Array<Allure::Link>]
|
24
24
|
def issue_links(tags)
|
25
|
-
return [] unless
|
25
|
+
return [] unless AllureCucumber.configuration.link_issue_pattern
|
26
26
|
|
27
27
|
matching_links(tags, :issue)
|
28
28
|
end
|
@@ -63,9 +63,9 @@ module AllureCucumber
|
|
63
63
|
# @return [Hash<Symbol, Regexp>]
|
64
64
|
def reserved_patterns
|
65
65
|
@reserved_patterns ||= {
|
66
|
-
tms: /@#{
|
67
|
-
issue: /@#{
|
68
|
-
severity: /@#{
|
66
|
+
tms: /@#{AllureCucumber.configuration.tms_prefix}(?<tms>\S+)/,
|
67
|
+
issue: /@#{AllureCucumber.configuration.issue_prefix}(?<issue>\S+)/,
|
68
|
+
severity: /@#{AllureCucumber.configuration.severity_prefix}(?<severity>\S+)/,
|
69
69
|
flaky: /@flaky/,
|
70
70
|
muted: /@muted/,
|
71
71
|
known: /@known/,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allure-cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.13.
|
4
|
+
version: 2.13.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrejs Cunskis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allure-ruby-commons
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.13.
|
19
|
+
version: 2.13.6.2
|
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.13.
|
26
|
+
version: 2.13.6.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cucumber
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.0.0
|
33
|
+
version: 4.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.0.0
|
40
|
+
version: 4.0.0
|
41
41
|
description: Cucumber adaptor to generate rich allure test reports
|
42
42
|
email: andrejs.cunskis@gmail.com
|
43
43
|
executables: []
|
@@ -72,9 +72,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: 2.5.0
|
73
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- - "
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubygems_version: 3.1.2
|
80
80
|
signing_key:
|