# Test deps with workspaces

**URL:** <https://discourse.julialang.org/t/test-deps-with-workspaces/133591>\
**Category:** General Usage\
**Tags:** testing, pkg\
**Created:** [November 1, 2025, 8:16am UTC](https://discourse.julialang.org/t/test-deps-with-workspaces/133591 "2025-11-01T08:16:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [November 1, 2025, 8:16am UTC](https://discourse.julialang.org/t/test-deps-with-workspaces/133591/1 "2025-11-01T08:16:07Z")

</div>

I have a few questions on the [new workflow](https://pkgdocs.julialang.org/dev/creating-packages/#Test-specific-dependencies) for test dependencies, which should be enabled in 1.12 thanks to the [`[workspace]` section](https://pkgdocs.julialang.org/dev/toml-files/#Workspaces):

1. Does the parent package have to be listed in `test/Project.toml` now? It didn’t have to before and it is not demanded by the docs, but my preliminary tests suggest this is necessary now.

> ****
>
> Parent `Project.toml`:
> 
> ```toml
> name = "MyPkg"
> uuid = "5ac2c900-a191-4ac4-ac14-729ea0a25c21"
> version = "0.1.0"
> authors = ["Guillaume Dalle"]
> 
> [workspace]
> projects = ["test"]
> 
> ```
> 
> `test/Project.toml`:
> 
> ```toml
> [deps]
> Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
> 
> ```
> 
> `Pkg.test` error:
> 
> ```julia
> (MyPkg) pkg> test
> Status `~/Documents/GitHub/Julia/_Scratchpad/MyPkg/test/Project.toml`
> [8dfed614] Test v1.11.0
> Status `~/Documents/GitHub/Julia/_Scratchpad/MyPkg/Manifest.toml`
> [2a0f44e3] Base64 v1.11.0
> [b77e0a4c] InteractiveUtils v1.11.0
> [ac6e5ff7] JuliaSyntaxHighlighting v1.12.0
> [56ddb016] Logging v1.11.0
> [d6f4376e] Markdown v1.11.0
> [9a3f8284] Random v1.11.0
> [ea8e919c] SHA v0.7.0
> [9e88b42a] Serialization v1.11.0
> [f489334b] StyledStrings v1.11.0
> [8dfed614] Test v1.11.0
> Testing Running tests...
> ERROR: LoadError: ArgumentError: Package MyPkg not found in current path.
> - Run `import Pkg; Pkg.add("MyPkg")` to install the MyPkg package.
> 
> ```

1. Does this way of pointing to the parent package from the tests actually go look for it in the parent folder, like the `[sources]` does?

---

<div class="post-metadata">

**Author:** ![cjdoris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cjdoris/32/213133_2.png) [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Post date:** [November 1, 2025, 12:19pm UTC](https://discourse.julialang.org/t/test-deps-with-workspaces/133591/2 "2025-11-01T12:19:42Z")

</div>

My understanding is that all projects in a workspace are resolved at once and so share a single top-level Manifest.toml, and:

1. Each project still needs to list all the packages it directly depends on. So your tests do need to depend on the package being tested. I think the magical project merging for the test environment that occurs with the older ways of declaring test deps doesn’t happen when using workspaces - it’s just an ordinary project.
2. I believe you don’t need to specify the source for the package being tested, since it is implied by the top-level project, which is resolved at the same time.

(Caveat: I am also getting my head around workspaces too.)

---

<div class="post-metadata">

**Author:** ![RomeoV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romeov/32/37687_2.png) [@RomeoV](https://discourse.julialang.org/u/RomeoV)\
**Post date:** [November 1, 2025, 3:10pm UTC](https://discourse.julialang.org/t/test-deps-with-workspaces/133591/3 "2025-11-01T15:10:29Z")

</div>

Yeah, I’ve had success just putting `MyPkg` with the uuid into the `deps` section of `test/Project.toml`
