https://github.com/appfolio/parallel_tests-fine_grain_test
https://github.com/appfolio/parallel_tests-fine_grain_test
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/appfolio/parallel_tests-fine_grain_test
- Owner: appfolio
- Created: 2016-02-29T23:26:54.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T22:03:12.000Z (over 4 years ago)
- Last Synced: 2025-02-24T08:25:31.194Z (over 1 year ago)
- Language: Ruby
- Size: 49.8 KB
- Stars: 0
- Watchers: 132
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ParallelTests::FineGrainTest
Normally the `parallel_tests` divvies up the test files between parallel test processes at the
beginning. This causes uneven runtimes as some test processes end up with faster test files while others end up with slower test files. Utilizing past execution times when divving up the tests helps, however, due to differences in test agents and varied execution times (i'm looking at you selenium) it still results in uneven runtimes.
This gem extends the `parallel_tests` gem to enable parallel test processes to pull tests from a global queue until there are no more tests. This results in all parallel test processes being
utilized much more optimally which leads to faster tests.
Tested with,
test-unit / activesupport 3.x
minitest / activesupport 4.x
minitest / activesupport 5.x
## Installation
Add this lines to your application's Gemfile:
```ruby
gem 'parallel_tests'
gem 'parallel_tests-fine_grain_test'
```
And then execute:
$ bundle
Or install it yourself as:
$ gem install parallel_tests-fine_grain_test
## Usage
The usage is much like `parallel:test` task.
Example,
```
%> rake parallel:fine_grain_test[^test/selenium]
```
The FINE_GRAIN_TEST_RUNTIME_LOGGER can be optionally set to the location of the file where the test times should be read from / written to. Although optional, it is highly recommended to set FINE_GRAIN_TEST_RUNTIME_LOGGER as it helps the tests complete faster.
## Development
After checking out the repo, run `bundle` to install dependencies. Then, run `rake test` to run the tests.
Note, this gem uses Minitest framework for its own tests but uses the Appraisal gem to test against potentially different version of test-unit and minitest. See the integration tests.
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/appfolio/parallel_tests-fine_grain_test.