Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test runtime logger vs rails and add parallel example #956

Merged
merged 3 commits into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# parallel_tests

[![Gem Version](https://badge.fury.io/rb/parallel_tests.svg)](https://rubygems.org/gems/parallel_tests)
[![Build status](https://github.com/grosser/parallel_tests/workflows/test/badge.svg)](https://github.com/grosser/parallel_tests/actions?query=workflow%3Atest)
[![Build status](https://github.com/grosser/parallel_tests/workflows/test/badge.svg)](https://github.com/grosser/parallel_tests/actions?query=workflow%3Atest&branch=master)

Speedup Minitest + RSpec + Turnip + Cucumber + Spinach by running parallel on multiple CPU cores.<br/>
ParallelTests splits tests into balanced groups (by number of lines or runtime) and runs each group in a process with its own database.
Expand Down Expand Up @@ -93,7 +93,7 @@ rake "parallel:rake[my:custom:task,2]"
```


Running things once
Running setup or teardown once
===================

```Ruby
Expand Down Expand Up @@ -121,8 +121,11 @@ Even test group runtimes

Test groups will often run for different times, making the full test run as slow as the slowest group.

Step 1: Use these loggers (see below) to record test runtime
Step 2: Your next run will use the recorded test runtimes (use `--runtime-log <file>` if you picked a location different from below)
**Step 1**: Use these loggers (see below) to record test runtime

**Step 2**: The next test run will use the recorded test runtimes (use `--runtime-log <file>` if you picked a location different from below)

**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))

### RSpec

Expand All @@ -143,8 +146,6 @@ require 'parallel_tests/test/runtime_logger' if ENV['RECORD_RUNTIME']
results will be logged to `tmp/parallel_runtime_test.log` when `RECORD_RUNTIME` is set,
so it is not always required or overwritten.

### TODO: add instructions for other frameworks

Loggers
=======

Expand Down
Loading