allure-cucumber 2.29.1 → 2.30.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/README.md +11 -2
- data/lib/allure_cucumber/formatter.rb +22 -0
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1911dba445686c8347e6d8f0489e80f18a623a53629e2c2fb7c68acc5795558f
|
|
4
|
+
data.tar.gz: 9a886482cb883b687a7fffe2487e5a577ceb308426afe7354e99b3febadf6385
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78de2c6b585229a4bedfa5db0278c524daeca7716ee8375b05e088f4cf902bac19bf90d7d9bbb643233fb6d1a7cefcaacea7a6dc25db85530a9b64fb74608901
|
|
7
|
+
data.tar.gz: accd6af4989abb2967269f1422c6d1d12c323f3ae90bd5b34af5e2d5d94a3e948fbb4ce3ededeff45100609b60d47b22a789312ef038374100cde1550d8f1e0c
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# allure-cucumber
|
|
2
2
|
|
|
3
3
|
[](https://www.rubydoc.info/gems/allure-cucumber)
|
|
4
4
|
|
|
5
|
-
This repository contains Allure
|
|
5
|
+
This repository contains Allure adapter for [Cucumber](http://cukes.info/) framework.
|
|
6
6
|
|
|
7
7
|
## Cucumber versions
|
|
8
8
|
|
|
@@ -50,6 +50,12 @@ AllureCucumber.configure do |config|
|
|
|
50
50
|
config.environment = "staging"
|
|
51
51
|
config.failure_exception = RSpec::Expectations::ExpectationNotMetError
|
|
52
52
|
|
|
53
|
+
# labels added to every test result
|
|
54
|
+
config.global_labels = [
|
|
55
|
+
{ name: "owner", value: "qa" },
|
|
56
|
+
{ name: "tag", value: "global" }
|
|
57
|
+
]
|
|
58
|
+
|
|
53
59
|
# these are used for creating links to bugs or test cases where {} is replaced with keys of relevant items
|
|
54
60
|
config.link_tms_pattern = "http://www.jira.com/browse/{}"
|
|
55
61
|
config.link_issue_pattern = "http://www.jira.com/browse/{}"
|
|
@@ -64,6 +70,9 @@ AllureCucumber.configure do |config|
|
|
|
64
70
|
end
|
|
65
71
|
```
|
|
66
72
|
|
|
73
|
+
`global_labels` defaults to `[]`. Each entry is a hash with symbol keys `:name` and `:value`.
|
|
74
|
+
Labels are prepended to every completed test's labels without replacing test-specific labels, including those with the same name.
|
|
75
|
+
|
|
67
76
|
By default, allure-cucumber will analyze your cucumber tags looking for Test Management, Issue Management, and Severity tag as well
|
|
68
77
|
as custom tags for grouping tests in to epics, features and stories in Behavior tab of report. Links to TMS and ISSUE and test severity will be displayed in the report.
|
|
69
78
|
|
|
@@ -35,6 +35,8 @@ module AllureCucumber
|
|
|
35
35
|
config.on_event(:test_step_started) { |event| on_test_step_started(event) }
|
|
36
36
|
config.on_event(:test_step_finished) { |event| on_test_step_finished(event) }
|
|
37
37
|
config.on_event(:test_case_finished) { |event| on_test_case_finished(event) }
|
|
38
|
+
|
|
39
|
+
register_test_run_hook_finished(config)
|
|
38
40
|
end
|
|
39
41
|
|
|
40
42
|
# Clean test result directory before starting run
|
|
@@ -50,6 +52,17 @@ module AllureCucumber
|
|
|
50
52
|
# @return [void]
|
|
51
53
|
def on_test_run_finished(_event)
|
|
52
54
|
lifecycle.write_environment
|
|
55
|
+
lifecycle.write_globals
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Handle a global hook finishing
|
|
59
|
+
# @param [Cucumber::Events::TestRunHookFinished] event
|
|
60
|
+
# @return [void]
|
|
61
|
+
def on_test_run_hook_finished(event)
|
|
62
|
+
return unless event.test_result.failed?
|
|
63
|
+
|
|
64
|
+
details = Allure::ResultUtils.status_details(event.test_result.exception)
|
|
65
|
+
lifecycle.add_global_error(message: details.message, trace: details.trace)
|
|
53
66
|
end
|
|
54
67
|
|
|
55
68
|
# Handle test case started event
|
|
@@ -101,6 +114,15 @@ module AllureCucumber
|
|
|
101
114
|
|
|
102
115
|
attr_reader :lifecycle, :cucumber_model
|
|
103
116
|
|
|
117
|
+
# Register global hook finished event
|
|
118
|
+
# @param [Cucumber::Configuration] config
|
|
119
|
+
# @return [void]
|
|
120
|
+
def register_test_run_hook_finished(config)
|
|
121
|
+
return unless defined?(Cucumber::Events::TestRunHookFinished)
|
|
122
|
+
|
|
123
|
+
config.on_event(:test_run_hook_finished) { |event| on_test_run_hook_finished(event) }
|
|
124
|
+
end
|
|
125
|
+
|
|
104
126
|
# Is hook fixture like Before, After or Step as AfterStep
|
|
105
127
|
# @param [String] text
|
|
106
128
|
# @return [boolean]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: allure-cucumber
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.30.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrejs Cunskis
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - '='
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: 2.
|
|
18
|
+
version: 2.30.0
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - '='
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: 2.
|
|
25
|
+
version: 2.30.0
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: csv
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -63,7 +63,7 @@ dependencies:
|
|
|
63
63
|
- - "<"
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
65
|
version: '12'
|
|
66
|
-
description: Cucumber
|
|
66
|
+
description: Cucumber adapter to generate rich allure test reports
|
|
67
67
|
email: andrejs.cunskis@gmail.com
|
|
68
68
|
executables: []
|
|
69
69
|
extensions: []
|
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
101
101
|
- !ruby/object:Gem::Version
|
|
102
102
|
version: '0'
|
|
103
103
|
requirements: []
|
|
104
|
-
rubygems_version:
|
|
104
|
+
rubygems_version: 4.0.20
|
|
105
105
|
specification_version: 4
|
|
106
|
-
summary: Allure cucumber ruby
|
|
106
|
+
summary: Allure cucumber ruby adapter
|
|
107
107
|
test_files: []
|