2021-07-28, 17:30–17:40 (UTC), Blue
ReTest.jl is a testing framework which is backward-compatible with the
Test standard library, and offers few usability improvements, like nicer printing of results, filtering testsets according to their descriptions or running them in parallel. This talk is a tutorial motivating and demonstrating the main features of the package.
The main idea behind ReTest.jl is that its
@testset macro does not run tests immedidately, but instead stores them for later execution, via a call to the
retest function. This is what enables a lot of the provided features, two of which were the initial drive for the creation of the package:
- filtering which testsets are run by matching their descriptions against a given regular expression;
- the ability to write tests "inline" in source files, right next to the code implementing the tested behaviors.
The fact that
ReTest have the same macro name,
@testset, makes it usually trivial to switch an existing test suite over to
ReTest. So much so that there is an option to actually use
ReTest on a test suite without changing a single line of code!
And what if you could use
Revise on your test files...?
A random Julia enthusiast, occasional contributor.