# Packages for inline tests: Which one I should use?

**URL:** https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132
**Category:** General Usage
**Created:** [December 23, 2024, 6:26pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132 "2024-12-23T18:26:14Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [December 23, 2024, 6:26pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/1 "2024-12-23T18:26:14Z")

</div>

I always like to put short tests along with the code, but the built-in `Test` does not support this. There are at least two packages: `ReTest.jl` and `TestItems.jl` can do this. If I understand correctly, `TestItems.jl` is developed for VScode, but maybe it can also be used without VScode. (I’m not a VScode user unfortunately) `ReTest` looks more general, but it seems not actively being maintained?

Any comments for these or similar packages? Thank you.

---

<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: [December 23, 2024, 9:18pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/2 "2024-12-23T21:18:20Z")

</div>

> [@linwaytin](#):
>
> If I understand correctly, `TestItems.jl` is developed for VScode, but maybe it can also be used without VScode.

Yes, the test item framework can be used without VS Code, it was just originally motivated by the VS Code built-in test framework.

I am working very actively on it. I’m almost done with a much faster parallel test runner than what we have right now, and then I’m fairly optimistic that we can also integrate that with neotest into neovim.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [December 23, 2024, 11:57pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/3 "2024-12-23T23:57:16Z")

</div>

Thanks for your work on this package. It would be great if it can be integrated to other common editors. However, I think being able to run the tests from command lines is also important.

If I have julia files in `src/` with `@testitem`, how can I run those tests from command line? Sorry this may be a simple question but the doc looks not very clear to me about this point. Thank you.

---

<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: [December 24, 2024, 8:55am UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/4 "2024-12-24T08:55:05Z")

</div>

> **[Test Item Framework · Julia in VS Code](https://www.julia-vscode.org/docs/stable/userguide/testitems/#Running-tests-from-the-command-line)**
>
> Documentation for Julia in VS Code.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [December 24, 2024, 9:15pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/5 "2024-12-24T21:15:15Z")

</div>

Thank you. Is it possible to run tests in a single script, without the package structure?

---

<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: [December 26, 2024, 1:43am UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/6 "2024-12-26T01:43:39Z")

</div>

No, it only works for tests inside packages.

---

<div class="post-metadata">

### Author: ![linwaytin](https://avatars.discourse-cdn.com/v4/letter/l/898d66/32.png) [@linwaytin](https://discourse.julialang.org/u/linwaytin)
#### Post date: [December 26, 2024, 2:34pm UTC](https://discourse.julialang.org/t/packages-for-inline-tests-which-one-i-should-use/124132/7 "2024-12-26T14:34:19Z")

</div>

Ok, thank you.
