A lightweight testing framework for Julia
Author Veraticus
4 Stars
Updated Last
3 Years Ago
Started In
February 2014


A lightweight testing framework for Julia. Recursively finds your Julia test files and runs them, with some helpful setup/teardown functionality to DRY up your tests a little bit.


Install testfast from your Julia repl:


Then create the testfast.jl file in your test/ directory. (This is your test helper -- it'll start the tests and you can put global setup/teardown istuff in it.) It doesn't need any more content than this:

using Testfast



A Test File

A testfast test file's name must end with test and have the .jl extension -- otherwise it won't be run by testfast. It should ideally contain a bunch of tests, defined using the @test macro:

@test "this is the name of the test" begin
  @assert 1 == 1

You can also define @before_all, @setup, @teardown and/or @after_all if you need to perform some common setup or cleanup for all your tests.


Run only once for each test file, before all tests are run.


Run before each test in the test file.


Run after each test in the test file.


Run only once for each test file, after all tests are run.


Once you've authored your tests, run them:

$ julia test/testfast.jl

10 tests run.
10 passed, 0 failed in 0.0189 seconds.