parallel_tests 4.7.0 → 4.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +11 -7
- data/lib/parallel_tests/cli.rb +4 -2
- data/lib/parallel_tests/cucumber/runner.rb +2 -2
- data/lib/parallel_tests/test/runner.rb +2 -2
- data/lib/parallel_tests/version.rb +1 -1
- data/lib/parallel_tests.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e432543f3ce9e19888f91f4a11e14b073305a7f3fa8fa69a31cd3db96606d187
|
4
|
+
data.tar.gz: 1c78c9c74dbbef031ca758d3bec296e4b5d74e7beb8108f604679a45899db070
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95cf6bc8c16eca666478417a73d674b5707506c798f3418bbfee339c27de173b5284de9e53d4120ebb4be6ee559f0a042b64e515bde05e4d7e3f08ff568baf21
|
7
|
+
data.tar.gz: a02b65aa9fdd77cb9c42f6c1e96ecff0c84affa85b525dc273b020dafc73d3715b40a0b4b64059d6cbc69940a5c7e3604bb1c9f61ff243c416bfe0aaedec3dd4
|
data/Readme.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# parallel_tests
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/parallel_tests.svg)](https://rubygems.org/gems/parallel_tests)
|
4
|
-
[![Build status](https://github.com/grosser/parallel_tests/workflows/test/badge.svg)](https://github.com/grosser/parallel_tests/actions?query=workflow%3Atest)
|
4
|
+
[![Build status](https://github.com/grosser/parallel_tests/workflows/test/badge.svg)](https://github.com/grosser/parallel_tests/actions?query=workflow%3Atest&branch=master)
|
5
5
|
|
6
6
|
Speedup Minitest + RSpec + Turnip + Cucumber + Spinach by running parallel on multiple CPU cores.<br/>
|
7
7
|
ParallelTests splits tests into balanced groups (by number of lines or runtime) and runs each group in a process with its own database.
|
@@ -93,7 +93,7 @@ rake "parallel:rake[my:custom:task,2]"
|
|
93
93
|
```
|
94
94
|
|
95
95
|
|
96
|
-
Running
|
96
|
+
Running setup or teardown once
|
97
97
|
===================
|
98
98
|
|
99
99
|
```Ruby
|
@@ -121,8 +121,11 @@ Even test group runtimes
|
|
121
121
|
|
122
122
|
Test groups will often run for different times, making the full test run as slow as the slowest group.
|
123
123
|
|
124
|
-
Step 1
|
125
|
-
|
124
|
+
**Step 1**: Use these loggers (see below) to record test runtime
|
125
|
+
|
126
|
+
**Step 2**: The next test run will use the recorded test runtimes (use `--runtime-log <file>` if you picked a location different from below)
|
127
|
+
|
128
|
+
**Step 3**: Automate upload/download of test runtime from your CI system [example](https://github.com/grosser/parallel_rails_example/blob/master/.github/workflows/test.yml) (chunks need to be combined, an alternative is [amend](https://github.com/grosser/amend))
|
126
129
|
|
127
130
|
### RSpec
|
128
131
|
|
@@ -143,8 +146,6 @@ require 'parallel_tests/test/runtime_logger' if ENV['RECORD_RUNTIME']
|
|
143
146
|
results will be logged to `tmp/parallel_runtime_test.log` when `RECORD_RUNTIME` is set,
|
144
147
|
so it is not always required or overwritten.
|
145
148
|
|
146
|
-
### TODO: add instructions for other frameworks
|
147
|
-
|
148
149
|
Loggers
|
149
150
|
=======
|
150
151
|
|
@@ -284,7 +285,9 @@ Options are:
|
|
284
285
|
--first-is-1 Use "1" as TEST_ENV_NUMBER to not reuse the default test environment
|
285
286
|
--fail-fast Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported
|
286
287
|
--verbose Print debug output
|
287
|
-
--verbose-command
|
288
|
+
--verbose-command Combines options --verbose-process-command and --verbose-rerun-command
|
289
|
+
--verbose-process-command Print the command that will be executed by each process before it begins
|
290
|
+
--verbose-rerun-command After a process fails, print the command executed by that process
|
288
291
|
--quiet Print only tests output
|
289
292
|
-v, --version Show Version
|
290
293
|
-h, --help Show this.
|
@@ -440,6 +443,7 @@ inspired by [pivotal labs](https://blog.pivotal.io/labs/labs/parallelize-your-rs
|
|
440
443
|
- [Adis Osmonov](https://github.com/adis-io)
|
441
444
|
- [Josh Westbrook](https://github.com/joshwestbrook)
|
442
445
|
- [Jay Dorsey](https://github.com/jaydorsey)
|
446
|
+
- [hatsu](https://github.com/hatsu38)
|
443
447
|
|
444
448
|
[Michael Grosser](http://grosser.it)<br/>
|
445
449
|
michael@grosser.it<br/>
|
data/lib/parallel_tests/cli.rb
CHANGED
@@ -146,7 +146,7 @@ module ParallelTests
|
|
146
146
|
failing_sets = test_results.reject { |r| r[:exit_status] == 0 }
|
147
147
|
return if failing_sets.none?
|
148
148
|
|
149
|
-
if options[:verbose] || options[:
|
149
|
+
if options[:verbose] || options[:verbose_rerun_command]
|
150
150
|
puts "\n\nTests have failed for a parallel_test group. Use the following command to run the group again:\n\n"
|
151
151
|
failing_sets.each do |failing_set|
|
152
152
|
command = failing_set[:command]
|
@@ -291,7 +291,9 @@ module ParallelTests
|
|
291
291
|
opts.on("--first-is-1", "Use \"1\" as TEST_ENV_NUMBER to not reuse the default test environment") { options[:first_is_1] = true }
|
292
292
|
opts.on("--fail-fast", "Stop all groups when one group fails (best used with --test-options '--fail-fast' if supported") { options[:fail_fast] = true }
|
293
293
|
opts.on("--verbose", "Print debug output") { options[:verbose] = true }
|
294
|
-
opts.on("--verbose-command", "
|
294
|
+
opts.on("--verbose-command", "Combines options --verbose-process-command and --verbose-rerun-command") { options.merge! verbose_process_command: true, verbose_rerun_command: true }
|
295
|
+
opts.on("--verbose-process-command", "Print the command that will be executed by each process before it begins") { options[:verbose_process_command] = true }
|
296
|
+
opts.on("--verbose-rerun-command", "After a process fails, print the command executed by that process") { options[:verbose_rerun_command] = true }
|
295
297
|
opts.on("--quiet", "Print only tests output") { options[:quiet] = true }
|
296
298
|
opts.on("-v", "--version", "Show Version") do
|
297
299
|
puts ParallelTests::VERSION
|
@@ -4,8 +4,8 @@ require "parallel_tests/gherkin/runner"
|
|
4
4
|
module ParallelTests
|
5
5
|
module Cucumber
|
6
6
|
class Runner < ParallelTests::Gherkin::Runner
|
7
|
-
SCENARIOS_RESULTS_BOUNDARY_REGEX = /^(Failing|Flaky) Scenarios
|
8
|
-
SCENARIO_REGEX = %r{^cucumber features/.+:\d+}
|
7
|
+
SCENARIOS_RESULTS_BOUNDARY_REGEX = /^(Failing|Flaky) Scenarios:$/
|
8
|
+
SCENARIO_REGEX = %r{^cucumber features/.+:\d+}
|
9
9
|
|
10
10
|
class << self
|
11
11
|
def name
|
@@ -158,7 +158,7 @@ module ParallelTests
|
|
158
158
|
|
159
159
|
def executable
|
160
160
|
if (executable = ENV['PARALLEL_TESTS_EXECUTABLE'])
|
161
|
-
|
161
|
+
Shellwords.shellsplit(executable)
|
162
162
|
else
|
163
163
|
determine_executable
|
164
164
|
end
|
@@ -293,7 +293,7 @@ module ParallelTests
|
|
293
293
|
end
|
294
294
|
|
295
295
|
def report_process_command?(options)
|
296
|
-
options[:verbose] || options[:
|
296
|
+
options[:verbose] || options[:verbose_process_command]
|
297
297
|
end
|
298
298
|
end
|
299
299
|
end
|
data/lib/parallel_tests.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: parallel_tests
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.7.
|
4
|
+
version: 4.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -69,8 +69,9 @@ licenses:
|
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
71
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
72
|
-
|
73
|
-
|
72
|
+
changelog_uri: https://github.com/grosser/parallel_tests/blob/v4.7.2/CHANGELOG.md
|
73
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v4.7.2/Readme.md
|
74
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v4.7.2
|
74
75
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
75
76
|
post_install_message:
|
76
77
|
rdoc_options: []
|
@@ -80,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
80
81
|
requirements:
|
81
82
|
- - ">="
|
82
83
|
- !ruby/object:Gem::Version
|
83
|
-
version:
|
84
|
+
version: 3.0.0
|
84
85
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
86
|
requirements:
|
86
87
|
- - ">="
|