Behavior similar to RSpec's --only-failures flag
https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures
RSpec can optionally emit metadata about tests that failed to a text file, which can then be consumed by subsequent runs via --only-failures (run all tests that failed) and --next-failure (run all failed tests but fail fast).
This could be really useful in REPL-driven workflows:
(kaocha.repl/run :only-failures)
(kaocha.repl/run :next-failure)
@robhanlon22 Thanks for the idea! FYI, we do have bits and pieces of this functionality:
--watchautomatically reruns failures, but I don't think using watch is particularly ergonomic in the REPL.- You can use the
print-invocationsplugin to show you the command to run the failing tests. - You can print all results with
--print-result
Would having --only-failures in the command line be useful to you as well?
I moved this to a new "New features" column on the CT board, while I'm not sure about the exact syntax proposal I do like the idea, but we'll have to think this through a bit more.
I think this functionality is useful enough that we want to keep this open. I also think we could build other functionality using a feature that tracks previous runs. For example, we could profile across runs and show, e.g., major increases in the time it takes a test to run.