# How does test(pkg; coverage=true) work?

**URL:** <https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 12, 2017, 2:05am UTC](https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017 "2017-11-12T02:05:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)\
**Post date:** [November 12, 2017, 2:05am UTC](https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017/1 "2017-11-12T02:05:13Z")

</div>

I tried setting the `coverage` option to true. It generated \*.cov files in the tests folder of one of my packages, which contain numbers on the left margin, but what do they mean? The documentation is not very explicit.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 12, 2017, 7:05am UTC](https://discourse.julialang.org/t/how-does-test-pkg-coverage-true-work/7017/2 "2017-11-12T07:05:34Z")

</div>

I think it counts the times a specific line of code was executed. See

```bash
$ julia --help | grep coverage -A 1
 --code-coverage={none|user|all}, --code-coverage
                           Count executions of source lines (omitting setting is equivalent to "user")

```
