# Deps and test folders in package

**URL:** <https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003>\
**Category:** New to Julia\
**Created:** [May 12, 2021, 7:27am UTC](https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003 "2021-05-12T07:27:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mastomaki](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Post date:** [May 12, 2021, 7:27am UTC](https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003/1 "2021-05-12T07:27:05Z")

</div>

I am building my own package according to [https://pkgdocs.julialang.org/v1/creating-packages/](https://pkgdocs.julialang.org/v1/creating-packages/). I am wondering at which point the deps/ and test/ folders should appear in the package directory?

after “generate mypkg” I have the src/ folder only.

```
julia> print(read("test/runtests.jl", String))
ERROR: SystemError: opening file "test/runtests.jl": No such file or directory

```

---

<div class="post-metadata">

**Author:** ![hendri54](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hendri54/32/9621_2.png) [@hendri54](https://discourse.julialang.org/u/hendri54)\
**Post date:** [May 12, 2021, 12:30pm UTC](https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003/3 "2021-05-12T12:30:17Z")

</div>

Not exactly answering your question, but I think most people use `PkgTemplates.jl` to generate packages. This auto generates `test` and a few other things.  
I think there is a step missing in the docs (between `build` and testing) that probably would tell the user to create the `test` dir manually.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [May 12, 2021, 1:00pm UTC](https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003/4 "2021-05-12T13:00:56Z")

</div>

> [@Mastomaki](#):
>
> I am wondering at which point the deps/ and test/ folders should appear in the package directory?

You need the `test` directory as soon as you have some tests, preferably right from the start.

Ideally you don’t need a `deps` directory at all. If you don’t know with certainty that you must have some kind of build step, you won’t need it.

---

<div class="post-metadata">

**Author:** ![Mastomaki](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Mastomaki](https://discourse.julialang.org/u/Mastomaki)\
**Post date:** [May 12, 2021, 1:14pm UTC](https://discourse.julialang.org/t/deps-and-test-folders-in-package/61003/5 "2021-05-12T13:14:29Z")

</div>

Ok! I now make **test/runtests.jl** manually:

```
#file runtests.jl
using Test
using mypkg

println("hello!")

```

But when I try to run test:

```julia
(@v1.5) pkg> activate ./test
 Activating environment at `~/data/pkgtest/mypkg/test/Project.toml`

julia> include("test/runtests.jl")
ERROR: LoadError: ArgumentError: Package mypkg not found in current path:
- Run `import Pkg; Pkg.add("mypkg")` to install the mypkg package.

```
