parallel_tests 2.31.0 → 2.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +3 -2
- data/lib/parallel_tests/rspec/runner.rb +3 -6
- data/lib/parallel_tests/test/runner.rb +11 -5
- data/lib/parallel_tests/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9f48375f06f2320fdda57c5c1340b8aedf1761541d4c802c5a17b6f21cbf858
|
4
|
+
data.tar.gz: 8e91a9f26aa2710aa023b6d779d7fdf0e768213262d75b7d9969751a3e825089
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6468e8bbb055db1eaee1a8512cb4226ceeb7acc2ba880d8be30117d863f8b870629088835d2628d28981e9b193a40239646d8a4de8e61467bd0bc48fae50e92e
|
7
|
+
data.tar.gz: 0dcd9f3aee1aead8329b76e770eb814ef62f465803629fe236d764b6a874eb827458b008aea240689ecadafa02388d49e71291d2c3cca5e74bc24d66137960ce
|
data/Readme.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/parallel_tests.svg)](https://rubygems.org/gems/parallel_tests)
|
4
4
|
[![Build Status](https://travis-ci.org/grosser/parallel_tests.svg)](https://travis-ci.org/grosser/parallel_tests/builds)
|
5
|
-
[![Build status](https://
|
5
|
+
[![Build status](https://github.com/grosser/parallel_tests/workflows/windows/badge.svg)](https://github.com/grosser/parallel_tests/actions?query=workflow%3Awindows)
|
6
6
|
|
7
7
|
Speedup Test::Unit + RSpec + Cucumber + Spinach by running parallel on multiple CPU cores.<br/>
|
8
8
|
ParallelTests splits tests into even groups (by number of lines or runtime) and runs each group in a single process with its own database.
|
@@ -256,7 +256,8 @@ TIPS
|
|
256
256
|
- Instantly see failures (instead of just a red F) with [rspec-instafail](https://github.com/grosser/rspec-instafail)
|
257
257
|
- Use [rspec-retry](https://github.com/NoRedInk/rspec-retry) (not rspec-rerun) to rerun failed tests.
|
258
258
|
- [JUnit formatter configuration](https://github.com/grosser/parallel_tests/wiki#with-rspec_junit_formatter----by-jgarber)
|
259
|
-
|
259
|
+
- Use [parallel_split_test](https://github.com/grosser/parallel_split_test) to run multiple scenarios in a single spec file, concurrently. (`parallel_tests` [works at the file-level and intends to stay that way](https://github.com/grosser/parallel_tests/issues/747#issuecomment-580216980))
|
260
|
+
|
260
261
|
### Cucumber
|
261
262
|
|
262
263
|
- Add a `parallel: foo` profile to your `config/cucumber.yml` and it will be used to run parallel tests
|
@@ -14,17 +14,14 @@ module ParallelTests
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def determine_executable
|
17
|
-
|
17
|
+
case
|
18
18
|
when File.exist?("bin/rspec")
|
19
19
|
ParallelTests.with_ruby_binary("bin/rspec")
|
20
20
|
when ParallelTests.bundler_enabled?
|
21
|
-
|
22
|
-
"bundle exec #{cmd}"
|
21
|
+
"bundle exec rspec"
|
23
22
|
else
|
24
|
-
|
23
|
+
"rspec"
|
25
24
|
end
|
26
|
-
|
27
|
-
cmd or raise("Can't find executables rspec or spec")
|
28
25
|
end
|
29
26
|
|
30
27
|
def runtime_log
|
@@ -188,11 +188,7 @@ module ParallelTests
|
|
188
188
|
puts "Runtime found for #{tests.count(&:last)} of #{tests.size} tests"
|
189
189
|
end
|
190
190
|
|
191
|
-
|
192
|
-
known, unknown = tests.partition(&:last)
|
193
|
-
average = (known.any? ? known.map!(&:last).inject(:+) / known.size : 1)
|
194
|
-
unknown_runtime = options[:unknown_runtime] || average
|
195
|
-
unknown.each { |set| set[1] = unknown_runtime }
|
191
|
+
set_unknown_runtime tests, options
|
196
192
|
end
|
197
193
|
|
198
194
|
def runtimes(tests, options)
|
@@ -240,6 +236,16 @@ module ParallelTests
|
|
240
236
|
|
241
237
|
private
|
242
238
|
|
239
|
+
# fill gaps with unknown-runtime if given, average otherwise
|
240
|
+
# NOTE: an optimization could be doing runtime by average runtime per file size, but would need file checks
|
241
|
+
def set_unknown_runtime(tests, options)
|
242
|
+
known, unknown = tests.partition(&:last)
|
243
|
+
return if unknown.empty?
|
244
|
+
unknown_runtime = options[:unknown_runtime] ||
|
245
|
+
(known.empty? ? 1 : known.map!(&:last).inject(:+) / known.size) # average
|
246
|
+
unknown.each { |set| set[1] = unknown_runtime }
|
247
|
+
end
|
248
|
+
|
243
249
|
def report_process_command?(options)
|
244
250
|
options[:verbose] || options[:verbose_process_command]
|
245
251
|
end
|
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: 2.
|
4
|
+
version: 2.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Grosser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -67,8 +67,8 @@ licenses:
|
|
67
67
|
- MIT
|
68
68
|
metadata:
|
69
69
|
bug_tracker_uri: https://github.com/grosser/parallel_tests/issues
|
70
|
-
documentation_uri: https://github.com/grosser/parallel_tests/blob/v2.
|
71
|
-
source_code_uri: https://github.com/grosser/parallel_tests/tree/v2.
|
70
|
+
documentation_uri: https://github.com/grosser/parallel_tests/blob/v2.32.0/Readme.md
|
71
|
+
source_code_uri: https://github.com/grosser/parallel_tests/tree/v2.32.0
|
72
72
|
wiki_uri: https://github.com/grosser/parallel_tests/wiki
|
73
73
|
post_install_message:
|
74
74
|
rdoc_options: []
|