# \`\]test Package\` errors, but \`include(test\_script)\` succeeds

**URL:** <https://discourse.julialang.org/t/test-package-errors-but-include-test-script-succeeds/100326>\
**Category:** General Usage\
**Created:** [June 14, 2023, 12:15pm UTC](https://discourse.julialang.org/t/test-package-errors-but-include-test-script-succeeds/100326 "2023-06-14T12:15:14Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![roflmaostc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roflmaostc/32/30123_2.png) [@roflmaostc](https://discourse.julialang.org/u/roflmaostc)\
**Post date:** [June 14, 2023, 1:26pm UTC](https://discourse.julialang.org/t/test-package-errors-but-include-test-script-succeeds/100326/3 "2023-06-14T13:26:43Z")

</div>

As far as I understand, `] test` creates a new environment with possibly new versions.

If you do `include("runtests.jl")` it will use the packages and versions of the activated env.

To speed-up `]test` I always use

> [@Testing a different file than runtests.jl](https://discourse.julialang.org/t/testing-a-different-file-than-runtests-jl/87789/10):
>
> Just dropping my testing workflow: First, I test everything with (where [TestEnv.jl](https://github.com/JuliaTesting/TestEnv.jl) is installed globally): julia\> using Pkg; Pkg.activate("."); using TestEnv; TestEnv.activate(); include("test/runtests.jl") For any further test runs, I do: julia\> include("test/subtests.jl")

---

_[View the full topic](https://discourse.julialang.org/t/test-package-errors-but-include-test-script-succeeds/100326)._
