How to run subset of tests?

Does Pkg.test support running only some test sets? I’d like to add a time-consuming testset to my code but don’t want to execute it every time.

1 Like

You might be interested in

3 Likes

The traditional “solution” is to split tests into multiple files (test/A.jl). Then at the REPL you can include what you want to test. It’s unsatisfying for a myriad reasons, but still it’s usually good enough for us.

2 Likes

TestItemRunner.jl doesn’t rely on VSCode does it?

I have actually never tried it outside but it’s meant to be part of the VSCode Julia extension, or at least it interfaces very well with it.

Looks like it exports a @run_package_tests macro for running it in other environments.

It can filter on tags like this

@run_package_tests filter=ti->!(:skipci in ti.tags)

This package I believe is the most used besides TestItems.jl if you are not using VSCode: ReTest.jl · ReTest.jl

1 Like