geordi 2.8.0 → 2.9.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/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/features/cucumber.feature +68 -0
- data/lib/geordi/commands/cucumber.rb +1 -1
- data/lib/geordi/cucumber.rb +1 -1
- data/lib/geordi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d129fad452aa0ec9658552b68ceb58190d3fb93b722ca8913ad00a68784ce3dc
|
4
|
+
data.tar.gz: 45905a2d5413c9cf5828b2a106f2bf32946efc6ab1229cfd9ed3012fa58a7cc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e91aa9acdb965944b192c23d2a43bebc49d25933b7152f56b99a3175311f4e84a7c0460961bb076b16a4cdfde648e19dc8ac072db35fd4414a3ecbdefb806b7a
|
7
|
+
data.tar.gz: b00fb2431da652f0cadd628bffb601c19434ba0fdd53d9ac99d463d7c6c2e365199efa271a90ada917e4d54e941c024a9f4dd990b7bc1bd4a24f4ffef87b55b0
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,14 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
|
|
9
9
|
### Breaking changes
|
10
10
|
|
11
11
|
|
12
|
+
## 2.9.0 2020-01-03
|
13
|
+
|
14
|
+
### Compatible changes
|
15
|
+
- Fixes [#37](https://github.com/makandra/geordi/issues/37): `geordi cucumber` crashes with `--format=pretty`
|
16
|
+
- Fixes [#27](https://github.com/makandra/geordi/issues/27): Cucumber rerun switch does work when passing files
|
17
|
+
### Breaking changes
|
18
|
+
|
19
|
+
|
12
20
|
## 2.8.0 2020-01-02
|
13
21
|
|
14
22
|
### Compatible changes
|
data/Gemfile.lock
CHANGED
data/features/cucumber.feature
CHANGED
@@ -64,6 +64,63 @@ Feature: The cucumber command
|
|
64
64
|
And the output should contain "Features failed."
|
65
65
|
|
66
66
|
|
67
|
+
Scenario: A rerun should only consider the specified file
|
68
|
+
Note that we need a cucumber.yml to write the rerun.txt and read the rerun.txt for the reruns.
|
69
|
+
|
70
|
+
Given a file named "features/step_definitions/test_steps.rb" with:
|
71
|
+
"""
|
72
|
+
Given /^this test fails$/ do
|
73
|
+
raise
|
74
|
+
end
|
75
|
+
|
76
|
+
Given /^I use puts with text "(.*)"$/ do |ann|
|
77
|
+
puts(ann)
|
78
|
+
end
|
79
|
+
"""
|
80
|
+
And a file named "features/some.feature" with:
|
81
|
+
"""
|
82
|
+
Feature: Failing feature
|
83
|
+
Scenario: Passing scenario
|
84
|
+
And I use puts with text "Running passing Feature"
|
85
|
+
|
86
|
+
Scenario: Failing scenario
|
87
|
+
And I use puts with text "Running failing Feature"
|
88
|
+
And this test fails
|
89
|
+
"""
|
90
|
+
And an empty file named "tmp/rerun.txt"
|
91
|
+
And a file named "cucumber.yml" with:
|
92
|
+
"""
|
93
|
+
<%
|
94
|
+
rerun_log = 'tmp/rerun.txt'
|
95
|
+
rerun_failures = File.file?(rerun_log) ? File.read(rerun_log).gsub("\n", ' ') : ''
|
96
|
+
log_failures = "--format=rerun --out=#{rerun_log}"
|
97
|
+
%>
|
98
|
+
default: features <%= log_failures %>
|
99
|
+
rerun: <%= rerun_failures %> <%= log_failures %>
|
100
|
+
"""
|
101
|
+
|
102
|
+
When I run `geordi cucumber --rerun=1 features/some.feature`
|
103
|
+
Then the output should contain:
|
104
|
+
"""
|
105
|
+
# Rerun #1 of 1
|
106
|
+
> Rerunning failed scenarios
|
107
|
+
> Run `geordi vnc` to view the Selenium test browsers
|
108
|
+
|
109
|
+
Using the rerun profile...
|
110
|
+
|
111
|
+
Running failing Feature
|
112
|
+
.F
|
113
|
+
|
114
|
+
(::) failed steps (::)
|
115
|
+
|
116
|
+
(RuntimeError)
|
117
|
+
features/some.feature:7:in `And this test fails'
|
118
|
+
|
119
|
+
Failing Scenarios:
|
120
|
+
cucumber -p rerun features/some.feature:5 # Scenario: Failing scenario
|
121
|
+
"""
|
122
|
+
|
123
|
+
|
67
124
|
Scenario: Running all features in a given subfolder
|
68
125
|
Given a file named "features/sub/one.feature" with:
|
69
126
|
"""
|
@@ -191,3 +248,14 @@ Feature: The cucumber command
|
|
191
248
|
When I run `geordi cucumber --containing given`
|
192
249
|
Then the output should contain "Only: features/given.feature"
|
193
250
|
But the output should not contain "other.feature"
|
251
|
+
|
252
|
+
|
253
|
+
Scenario: Passing a format argument will skip the default format for a single run
|
254
|
+
Given a file named "features/single.feature" with:
|
255
|
+
"""
|
256
|
+
Feature: Running a single feature
|
257
|
+
Scenario: A single scenario
|
258
|
+
"""
|
259
|
+
|
260
|
+
When I run `geordi cucumber features/single.feature --format=pretty --verbose`
|
261
|
+
Then the output should contain "b cucumber features/single.feature --format pretty"
|
@@ -88,7 +88,7 @@ def cucumber(*args)
|
|
88
88
|
fail 'Features failed.' if (i == options.rerun) # All reruns done?
|
89
89
|
|
90
90
|
announce "Rerun ##{ i + 1 } of #{ options.rerun }"
|
91
|
-
break if Geordi::Cucumber.new.run(
|
91
|
+
break if Geordi::Cucumber.new.run([], cmd_opts, :verbose => options.verbose, :parallel => false)
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
data/lib/geordi/cucumber.rb
CHANGED
@@ -16,7 +16,7 @@ module Geordi
|
|
16
16
|
VNC_ENV_VARIABLES = %w[DISPLAY BROWSER LAUNCHY_BROWSER]
|
17
17
|
|
18
18
|
def run(files, cucumber_options, options = {})
|
19
|
-
self.argv = files + cucumber_options
|
19
|
+
self.argv = files + cucumber_options.map { |option| option.split('=') }.flatten
|
20
20
|
|
21
21
|
consolidate_rerun_txt_files
|
22
22
|
show_features_to_run
|
data/lib/geordi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geordi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henning Koch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|