We all know testing does not necessarily has the best support in Julia. And if there are great frameworks like ReTest.jl or TestItemRunner.jl to mention these only, they still rely on replacing the traditional Test.jl
framework.
TestPicker.jl
does not try to achieve anything new but to make running tests, especially in large repositories a bit easier.
A demo is worth a thousand characters so here is one!
The main features TestPicker brings are:
- Running all tests with the right test environment (reusing
TestEnv.jl
). - Tests are run in a module and do not affect the
Main
environment. - Ability to run single testsets, even nested ones by fetching the right preamble from the file.
- Selection of one or multiple testfile/testset using
fzf
for an interactive experience associated with a highlighted preview of the content usingbat
- Everything embedded in a repl mode (activated with
!
). I am aware that this potentially collide with some code, I hope to find a better solution in the future. - Quick shortcut
test> -
to repeat the last set of tests - Preview of failed tests using
fzf
again with a quick preview on the stack traces/failed test information. - Preview of stack traces with source preview of the selected trace.
One main constraint of the tool is that test files should be self-contained (which I believe is a better practice), i.e. each file should contain all the using ...
statements or include("test-tooling.jl")
it needs.
Give it a try and please report any issue you face!