allure-rspec 2.13.5.rc.3 → 2.13.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/allure_rspec/config.rb +12 -10
- data/lib/allure_rspec/formatter.rb +5 -4
- data/lib/allure_rspec/rspec_model.rb +20 -18
- data/lib/allure_rspec/tag_parser.rb +3 -3
- metadata +14 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3769f14ee1972fb068c8a0d037076d3bb2f8df26d4c876411d9eb764c372dab8
|
4
|
+
data.tar.gz: 89d1e2e93736b3e3b445403ea5070ed638cad7c3cf3e71cdd5d6233f7bf115bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c20e8e4512cffa9fea345bf7e5850ac79953e80f8f250f9bf098ebd03ad67aa37daa85ef986406ed6baa6f03a1552d0923482e1d0a1f5894aa511f73e1effeca
|
7
|
+
data.tar.gz: 22e58bcd59ec06da9f4e26840e83a8c2e6a5733dd10610cb23afead898b97160786dd05c966c89d3afbce495d86e8e419b2852443e1dfe7bd1716522da51baba
|
data/lib/allure_rspec/config.rb
CHANGED
@@ -10,18 +10,20 @@ module AllureRspec
|
|
10
10
|
extend Forwardable
|
11
11
|
|
12
12
|
def_delegators :@allure_config,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
:clean_results_directory,
|
14
|
+
:clean_results_directory=,
|
15
|
+
:link_issue_pattern,
|
16
|
+
:link_issue_pattern=,
|
17
|
+
:link_tms_pattern,
|
18
|
+
:link_tms_pattern=,
|
19
|
+
:logging_level,
|
20
|
+
:logging_level=,
|
21
|
+
:results_directory,
|
22
|
+
:results_directory=
|
23
23
|
|
24
24
|
def initialize
|
25
|
+
super()
|
26
|
+
|
25
27
|
@allure_config = Allure.configuration
|
26
28
|
end
|
27
29
|
end
|
@@ -18,7 +18,7 @@ module AllureRspec
|
|
18
18
|
:example_group_started,
|
19
19
|
:example_group_finished,
|
20
20
|
:example_started,
|
21
|
-
:example_finished
|
21
|
+
:example_finished
|
22
22
|
)
|
23
23
|
|
24
24
|
RSpec::Core::Example.class_eval do
|
@@ -38,9 +38,10 @@ module AllureRspec
|
|
38
38
|
# @param [RSpec::Core::Notifications::GroupNotification] example_group_notification
|
39
39
|
# @return [void]
|
40
40
|
def example_group_started(example_group_notification)
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
description = example_group_notification.group.description.yield_self do |desc|
|
42
|
+
desc.empty? ? "Anonymous" : desc
|
43
|
+
end
|
44
|
+
lifecycle.start_test_container(Allure::TestResultContainer.new(name: description))
|
44
45
|
end
|
45
46
|
|
46
47
|
# Starts example
|
@@ -14,7 +14,7 @@ module AllureRspec
|
|
14
14
|
ALLURE_STATUS ||= {
|
15
15
|
failed: Allure::Status::FAILED,
|
16
16
|
pending: Allure::Status::SKIPPED,
|
17
|
-
passed: Allure::Status::PASSED
|
17
|
+
passed: Allure::Status::PASSED
|
18
18
|
}.freeze
|
19
19
|
|
20
20
|
# Transform example to <Allure::TestResult>
|
@@ -29,7 +29,7 @@ module AllureRspec
|
|
29
29
|
full_name: example.full_description,
|
30
30
|
labels: labels(example),
|
31
31
|
links: links(example),
|
32
|
-
status_details: Allure::StatusDetails.new(**status_detail_tags(example.metadata))
|
32
|
+
status_details: Allure::StatusDetails.new(**status_detail_tags(example.metadata))
|
33
33
|
)
|
34
34
|
end
|
35
35
|
|
@@ -67,28 +67,30 @@ module AllureRspec
|
|
67
67
|
# @param [RSpec::Core::Example] example
|
68
68
|
# @return [Array<Allure::Label>]
|
69
69
|
def labels(example)
|
70
|
-
[]
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
70
|
+
labels = []
|
71
|
+
labels << Allure::ResultUtils.framework_label("rspec")
|
72
|
+
labels << Allure::ResultUtils.feature_label(example.example_group.description)
|
73
|
+
labels << Allure::ResultUtils.package_label(Pathname.new(strip_relative(example.file_path)).parent.to_s)
|
74
|
+
labels << Allure::ResultUtils.story_label(example.description)
|
75
|
+
labels << Allure::ResultUtils.test_class_label(File.basename(example.file_path, ".rb"))
|
76
|
+
labels << severity(example.metadata)
|
77
|
+
labels.push(*tag_labels(example.metadata))
|
78
|
+
labels.push(*suite_labels(example.example_group))
|
79
|
+
|
80
|
+
labels
|
80
81
|
end
|
81
82
|
|
82
83
|
# Add suite labels
|
83
84
|
# @param [RSpec::Core::ExampleGroup] example_group
|
84
85
|
# @return [Array<Allure::Label>]
|
85
86
|
def suite_labels(example_group)
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
87
|
+
parents = example_group.parent_groups.map { |group| group.description.empty? ? "Anonymous" : group.description }
|
88
|
+
labels = []
|
89
|
+
labels << Allure::ResultUtils.suite_label(suite(parents))
|
90
|
+
labels << Allure::ResultUtils.parent_suite_label(parent_suite(parents)) if parent_suite(parents)
|
91
|
+
labels << Allure::ResultUtils.sub_suite_label(sub_suites(parents)) if sub_suites(parents)
|
92
|
+
|
93
|
+
labels
|
92
94
|
end
|
93
95
|
|
94
96
|
# @param [Array<String>] parents
|
@@ -38,9 +38,9 @@ module AllureRspec
|
|
38
38
|
# @return [Hash<Symbol, Boolean>]
|
39
39
|
def status_detail_tags(metadata)
|
40
40
|
{
|
41
|
-
flaky:
|
42
|
-
muted:
|
43
|
-
known:
|
41
|
+
flaky: !metadata[:flaky].nil?,
|
42
|
+
muted: !metadata[:muted].nil?,
|
43
|
+
known: !metadata[:known].nil?
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
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.13.
|
4
|
+
version: 2.13.6.4
|
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-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: allure-ruby-commons
|
@@ -16,28 +16,34 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.13.
|
19
|
+
version: 2.13.6.4
|
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.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-core
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '3.8'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '4'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '3.8'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '4'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: ruby2_keywords
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,9 +90,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
84
90
|
version: 2.5.0
|
85
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
92
|
requirements:
|
87
|
-
- - "
|
93
|
+
- - ">="
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
95
|
+
version: '0'
|
90
96
|
requirements: []
|
91
97
|
rubygems_version: 3.1.2
|
92
98
|
signing_key:
|