# Help with runtest

**URL:** <https://discourse.julialang.org/t/help-with-runtest/76898>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 22, 2022, 10:31am UTC](https://discourse.julialang.org/t/help-with-runtest/76898 "2022-02-22T10:31:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinod](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vinod](https://discourse.julialang.org/u/vinod)\
**Post date:** [February 22, 2022, 10:31am UTC](https://discourse.julialang.org/t/help-with-runtest/76898/1 "2022-02-22T10:31:40Z")

</div>

Hi  
I am new to julia and trying to create package. I am facing trouble with running the test cases and get the following error.  
**Testing** Running tests…

**ERROR:** LoadError: ArgumentError: Package Test not found in current path:

- Run `import Pkg; Pkg.add("Test")` to install the Test package.

The following is present in my toplevel Project.toml

[compat]  
julia = “1.7.1”

[extras]  
Test = “8dfed614-e22c-5e08-85e1-65c5234f0b40”

[targets]  
test = [“Test”]

The following is what I did. I started julia from the shell (at the top level where my Project.toml is present)  
julia --project

and then  
] test

I don’t know how to proceed. Any help is highly appreciated.  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [February 22, 2022, 12:03pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/2 "2022-02-22T12:03:14Z")

</div>

`--project` takes a directory as a parameter

so perhaps `--project=.` would solve your problem, assuming you are in the directory of your project

---

<div class="post-metadata">

**Author:** ![vinod](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vinod](https://discourse.julialang.org/u/vinod)\
**Post date:** [February 22, 2022, 12:15pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/4 "2022-02-22T12:15:38Z")

</div>

Thanks a lot for the response. Meanwhile I have tried adding packge dependency in Project.toml present in the test folder and it works!. I am not sure if this is the right solution.

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [February 22, 2022, 12:59pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/5 "2022-02-22T12:59:38Z")

</div>

looking at the --help again

` --project[={<dir>|@.}] Set <dir> as the home project/environment`

It defaults to the current directory if not specified, that’s going to save me typing `=.` more often!

---

<div class="post-metadata">

**Author:** ![vinod](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vinod](https://discourse.julialang.org/u/vinod)\
**Post date:** [February 22, 2022, 4:27pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/6 "2022-02-22T16:27:27Z")

</div>

Thanks. This helps

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [February 22, 2022, 5:31pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/7 "2022-02-22T17:31:59Z")

</div>

IIRC, if specified without arg, it defaults to « @. », that is, the Base.current\_project() (which should have been named englobing\_project imho). It is the first directory up, starting with current, that contains a Project.toml, and, if none, the ~/.julia/environments/v1.x where 1.x is the current Julia version. Maybe I am picky, but this is a significant difference if non existing project that you want to use or create (eg., to create the project in current dir, either use —project=. , or ]activate ., not —project nor —project=@.)

---

<div class="post-metadata">

**Author:** ![lawless-m](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lawless-m/32/30869_2.png) [@lawless-m](https://discourse.julialang.org/u/lawless-m)\
**Post date:** [February 22, 2022, 6:59pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/8 "2022-02-22T18:59:32Z")

</div>

That @ is a bit too magic for my liking. I prefer explicit arguments

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [February 22, 2022, 7:24pm UTC](https://discourse.julialang.org/t/help-with-runtest/76898/9 "2022-02-22T19:24:25Z")

</div>

It’s really simple

`—project=dir`, use dir/Project.toml

`—project=.`, use ./Project.toml (it is really same as above, with dir=.)

`—project=@string`, use ~/.julia /environments/string/Project.toml, except if string is `.`

If no `—project`, default is @v1.7 if e.g. using Julia 1.7.x

If `—project` or `—project=@.`, use englobing project : `Base.current_project()` - this can be ./Project.toml if it exists - BUT if it does not exists, check where it is before `]add` or `]rm`, because it could modify a `Project.toml` in an unexpected place.

You can check where is the activated project (the one operated upon) by `]status` or `Base.active_project()`

IMHO, the interest of @string is to be able to share `Projects` in a common place; the interest of @. is for developing a package, e.g. launching Julia in `package/src/` whence the Project is at `package/Project.toml` (in the directory one level up). So you can use `julia —project` whenever/anywhere developing inside subdirectories in a package/project, and use the same Project in all cases.

Sorry to be too much verbose …
