Filter julia testsets by keyword

Is there some functionality to filter which julia tests actually get run? For example, maybe a convenient way to pass a string via the command line, and then Julia only runs the testsets with a name that contains said string? (Or perhaps a function/macro that does something similar for REPL sessions)

Here’s my intended use case: I have 100 tests. These tests take time to run. I’m debugging one of the tests, and only want to run that test until I get it to pass. Then I move onto the next test that’s failing, and iterate on that test.

I could, of course, incorporate this feature in my file structure directly (e.g. one test per file) but this seems a bit tedious/restrictive…

Use TestItems “tags”

2 Likes

Yeah, Prerelease of new testing framework and test run UI in VS Code is made for your use-case :slight_smile:

If you use VS Code to run the tests you don’t even need to use tags, you can just work on one test at a time and individually run it with the UI.

1 Like

This is great, thank you!

ReTest.jl is also made for this use-case :slight_smile:

3 Likes