# Does Pkg.test() return anything useful?

**URL:** <https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761>\
**Category:** General Usage\
**Tags:** package\
**Created:** [September 14, 2019, 12:55pm UTC](https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761 "2019-09-14T12:55:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 14, 2019, 12:55pm UTC](https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761/1 "2019-09-14T12:55:06Z")

</div>

It seems to me that `Pkg.test()` returns `nothing`. Is there a way in which I could find out programmatically if the tests passed?

---

<div class="post-metadata">

**Author:** ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)\
**Post date:** [September 14, 2019, 8:32pm UTC](https://discourse.julialang.org/t/does-pkg-test-return-anything-useful/28761/2 "2019-09-14T20:32:37Z")

</div>

It looks like `Pkg.test()` throws an exception in case tests fail.

A simple `try...catch` statement should therefore allow you to detect problems:

```julia
try
     Pkg.test()
catch
     println("something happened")
end

```
