Skip to content

Releases: AlexB52/retest

Add "force batch" interactive option

20 Aug 06:26

Choose a tag to compare

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

Reorder options on multiple matching tests prompt

23 May 09:09

Choose a tag to compare

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

  • Set 'none' as first test to choose by @dgmora in #266

New Contributors

Full Changelog: v2.2.2...v2.3.0

Exit a run gracefully on interruption

12 Apr 00:48

Choose a tag to compare

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

17 Mar 22:36

Choose a tag to compare

Fixing issue #251 with #255 by killing the Thread along the long running watcher when exiting the retest.

Early exit runs with ctrl+c

07 Mar 03:26

Choose a tag to compare

With this change, you can now exit a run early with INT signal (ctrl+c) if a run has been triggered accidentally.
We're also improving the diff logic to identify files between branches by using forward diffs in git.

Related issues:

Enable alias commands

27 Jan 21:05

Choose a tag to compare

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.

Alias command: #245, #246

We're also making some improvements in logging to inform the user about errors and launching settings.

Fixing pressing Enter on launch

04 Jan 05:00

Choose a tag to compare

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

18 Dec 20:43

Choose a tag to compare

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.

  1. Interactive Panel
  2. Support watchexec as a new watcher when installed locally (faster than Lsiten)
  3. Cleanup codebase

No prod impact

11 Mar 23:16

Choose a tag to compare

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

11 Mar 23:15

Choose a tag to compare

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.