Skip to content

Add "force batch" interactive option

Latest

Choose a tag to compare

@AlexB52 AlexB52 released this 20 Aug 06:26

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

Full Changelog: v2.3.0...v2.4.0