# Filter julia testsets by keyword

**URL:** <https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983>\
**Category:** New to Julia\
**Tags:** testing\
**Created:** [February 21, 2023, 11:09pm UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983 "2023-02-21T23:09:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![smartalecH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smartalech/32/32379_2.png) [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Post date:** [February 21, 2023, 11:09pm UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983/1 "2023-02-21T23:09:11Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![jar1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jar1](https://discourse.julialang.org/u/jar1)\
**Post date:** [February 21, 2023, 11:10pm UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983/2 "2023-02-21T23:10:44Z")

</div>

Use TestItems “tags”

> **[GitHub - julia-vscode/TestItemRunner.jl: Run Julia test items](https://github.com/julia-vscode/TestItemRunner.jl)**
>
> Run Julia test items. Contribute to julia-vscode/TestItemRunner.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [February 21, 2023, 11:11pm UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983/3 "2023-02-21T23:11:51Z")

</div>

Yeah, [Prerelease of new testing framework and test run UI in VS Code](https://discourse.julialang.org/t/prerelease-of-new-testing-framework-and-test-run-ui-in-vs-code/86355) is made for your use-case 🙂

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.

---

<div class="post-metadata">

**Author:** ![smartalecH](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/smartalech/32/32379_2.png) [@smartalecH](https://discourse.julialang.org/u/smartalecH)\
**Post date:** [February 21, 2023, 11:21pm UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983/4 "2023-02-21T23:21:49Z")

</div>

This is great, thank you!

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [February 22, 2023, 8:55am UTC](https://discourse.julialang.org/t/filter-julia-testsets-by-keyword/94983/5 "2023-02-22T08:55:44Z")

</div>

[ReTest.jl](https://juliatesting.github.io/ReTest.jl/stable/) is also made for this use-case 🙂
