Releases: AlexB52/retest
Add "force batch" interactive option
Implementing #267
This release adds a new option: force batch (fb).
Unlike the original force option, where you manually select tests; force batch lets you paste in a raw list of file paths. Retest will then attempt to map those files to the corresponding tests and print a summary showing which ones were successfully identified.
The behaviour matches that of a regular forced selection: on every file change, the chosen tests will run instead of the usual set, until you either make a new forced selection or reset it.
Example:
> fb
Enter list of test files to run (Press Ctrl+D or Ctrl+Z to finish)
hello.rb runner.rb rake_test.rb matching_options.rb
runner_test.rb
<press Ctrl+Z>
Retest could not find matching tests for these inputs:
- hello.rb
Forced selection enabled.
Reset to default settings by typing 'r' in the interactive console.
Tests selected:
- test/retest/command/rake_test.rb
- test/retest/matching_options_test.rb
- test/retest/runner_test.rb
Run options: --seed 55189
# Running:
...............................................
Finished in 0.216453s, 217.1372 runs/s, 485.0938 assertions/s.
47 runs, 105 assertions, 0 failures, 0 errors, 0 skips
Type interactive command and press enter. Enter 'h' for help.
>
What's Changed
- Move dependencies to gemspec by @AlexB52 in #271
- [TASK] - Refactor Repository Unit Tests by @AlexB52 in #272
Full Changelog: v2.3.0...v2.4.0
Reorder options on multiple matching tests prompt
This minor version reorders the options when multiple matching tests exist. The none option is now the first one and set as 0.
Here is an example of the new output:
We found few tests matching: app/models/valuation/holdings.rb
[0] - none
[1] - test/models/taxation/holdings_test.rb
[2] - test/models/schedule/holdings_test.rb
[3] - test/models/holdings_test.rb
[4] - test/models/performance/holdings_test.rb
[5] - test/lib/csv_report/holdings_test.rb
Which file do you want to use?
Enter the file number now:
>What's Changed
New Contributors
Full Changelog: v2.2.2...v2.3.0
Exit a run gracefully on interruption
Test frameworks (RSpec especially) now print their summary before shutting down when interrupting a run in retest with ctrl+c as it would normally.
Fixing #258
Fix stack dump on exit
Early exit runs with ctrl+c
Enable alias commands
This release's main change includes the ability to run aliases of popular testing framework commands.
Some users have a custom bash commands for their testing. Using custom scripts did not allow the ability to force a selection, run all or diffed branch. You can now launch retest with retest --rspec "bin/my-custom-test-command <test>" and it will behave as if we're calling bundle exec rspec <test>.
Similarly retest --rails "bin/my-custom-test-command <test>" will behave like bin/rails test <test>. Same goes with --rake and --ruby options.
We're also making some improvements in logging to inform the user about errors and launching settings.
Fixing pressing Enter on launch
This version fixes the issue raised in #240
Retest will try to run the starting command if it does not include the <test> or <changed> placeholders when Enter is pressed.
Retest V2 - Interactive commands are here
New major version of Retest.
The main change is a new interactive panel of commands to help your testing workflow after Retest launch. Press h to see the different options available.
- Interactive Panel
- Support watchexec as a new watcher when installed locally (faster than Lsiten)
- Cleanup codebase
No prod impact
This release fixes on our CI pipeline and the bundler version set incorrectly in the previous release v1.13.1
Adding observer as an explicit dependency
Ruby 3.4 will require the observer gem to be set as an explicit dependency in a Gemfile and will no longer be included in the language: https://bugs.ruby-lang.org/issues/20187
This release adds observer gem as an explicit Retest dependency.