# \#coverage

**URL:** https://discourse.julialang.org/tag/coverage/91.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [Codecoverage button not working any longer](https://discourse.julialang.org/t/codecoverage-button-not-working-any-longer/129876)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 6\
**Last updated:** [June 16, 2025, 4:02pm UTC](https://discourse.julialang.org/t/codecoverage-button-not-working-any-longer/129876 "2025-06-16T16:02:49Z")

</div>

On all of my repositories the button for code coverage is broken. Example: KiteModels.jl The link itself is still working, just the image is missing. Anybody else with this problem?

---

## [How do I get Test Coverage not to mess up @allocated calculations](https://discourse.julialang.org/t/how-do-i-get-test-coverage-not-to-mess-up-allocated-calculations/128418)

<div class="topic-metadata">

**Author:** [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Replies:** 3\
**Last updated:** [April 27, 2025, 8:29pm UTC](https://discourse.julialang.org/t/how-do-i-get-test-coverage-not-to-mess-up-allocated-calculations/128418 "2025-04-27T20:29:23Z")

</div>

I have a runtests.jl which does something like this. ff()=@allocated myfun(vara,varb, varc) @test ff()=0 This returns true if not running with code coverage and then it fails when testing with code-coverage. But not …

---

## [Codecov missing coverage of myfunction(::SomeType) = 1](https://discourse.julialang.org/t/codecov-missing-coverage-of-myfunction-sometype-1/122796)

<div class="topic-metadata">

**Author:** [@JeffFessler](https://discourse.julialang.org/u/JeffFessler)\
**Replies:** 5\
**Last updated:** [December 9, 2024, 1:59am UTC](https://discourse.julialang.org/t/codecov-missing-coverage-of-myfunction-sometype-1/122796 "2024-12-09T01:59:18Z")

</div>

I have some packages that previously had 100% code coverage but now the badges are showing \<100% coverage because codecov is falsely claiming that some lines that look like myfunction(::SomeType) = 1 are not being cove…

---

## [Unexpected Results for Code Coverage with Julia Tests](https://discourse.julialang.org/t/unexpected-results-for-code-coverage-with-julia-tests/119195)

<div class="topic-metadata">

**Author:** [@janneshb](https://discourse.julialang.org/u/janneshb)\
**Replies:** 2\
**Last updated:** [October 18, 2024, 12:50pm UTC](https://discourse.julialang.org/t/unexpected-results-for-code-coverage-with-julia-tests/119195 "2024-10-18T12:50:23Z")

</div>

Hi, I’ve written a bunch of unit tests for my Julia package that are run by a GitHub action and uploaded to codecov.io. However, lines marked as “uncovered” seem to be wrong at a few spots. Especially, when macros are…

---

## [\`end\` flagged as missing coverage but loop was covered](https://discourse.julialang.org/t/end-flagged-as-missing-coverage-but-loop-was-covered/119754)

<div class="topic-metadata">

**Author:** [@rafaelbailo](https://discourse.julialang.org/u/rafaelbailo)\
**Replies:** 0\
**Last updated:** [September 23, 2024, 3:54pm UTC](https://discourse.julialang.org/t/end-flagged-as-missing-coverage-but-loop-was-covered/119754 "2024-09-23T15:54:56Z")

</div>

I’m looking at the Codecov coverage of MultiPrecisionArrays.jl, and it seems there is and end statement marked as lacking coverage when the code inside the corresponding loop was executed. Is there something truly missin…

---

## [How to detect whether the build (compiler options) is a production build](https://discourse.julialang.org/t/how-to-detect-whether-the-build-compiler-options-is-a-production-build/113827)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 3\
**Last updated:** [May 5, 2024, 6:35am UTC](https://discourse.julialang.org/t/how-to-detect-whether-the-build-compiler-options-is-a-production-build/113827 "2024-05-05T06:35:36Z")

</div>

Enabling code coverage changes how Julia code is compiled and executed. In particular, code coverage may cause allocations in code that would otherwise be constant-folded: On the other hand, it’s sometimes good to hav…

---

## [Aggregate coverage from multiple GH actions jobs](https://discourse.julialang.org/t/aggregate-coverage-from-multiple-gh-actions-jobs/107490)

<div class="topic-metadata">

**Author:** [@baggepinnen](https://discourse.julialang.org/u/baggepinnen)\
**Replies:** 3\
**Last updated:** [December 12, 2023, 4:47pm UTC](https://discourse.julialang.org/t/aggregate-coverage-from-multiple-gh-actions-jobs/107490 "2023-12-12T16:47:08Z")

</div>

I have a repo which contains a main package and a sub package located in /lib, for which I run CI in parallel using multiple GH-actions jobs (groups). This generally works well, except that it’s tricky to get coverage re…

---

## [No coverage files generated outside project on Julia 1.9](https://discourse.julialang.org/t/no-coverage-files-generated-outside-project-on-julia-1-9/103359)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 1\
**Last updated:** [August 30, 2023, 11:25am UTC](https://discourse.julialang.org/t/no-coverage-files-generated-outside-project-on-julia-1-9/103359 "2023-08-30T11:25:41Z")

</div>

I am working with two packages, where a downstream package depends on a base package. The directory structure is of the form A - Project.toml - Manifest.toml - src - \[...\] - test - \[...\] - B - Proj…

---

## [Incorrect coverage report that flags line with \`end\`](https://discourse.julialang.org/t/incorrect-coverage-report-that-flags-line-with-end/101767)

<div class="topic-metadata">

**Author:** [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Replies:** 0\
**Last updated:** [July 19, 2023, 7:30am UTC](https://discourse.julialang.org/t/incorrect-coverage-report-that-flags-line-with-end/101767 "2023-07-19T07:30:29Z")

</div>

See Codecov, where the line with end is flagged as uncovered, but lines leading up to it are covered. I wonder how to get the report working correctly?

---

## [CodeCov doesn't see @recipe macro](https://discourse.julialang.org/t/codecov-doesnt-see-recipe-macro/94433)

<div class="topic-metadata">

**Author:** [@jared711](https://discourse.julialang.org/u/jared711)\
**Replies:** 0\
**Last updated:** [February 10, 2023, 8:44pm UTC](https://discourse.julialang.org/t/codecov-doesnt-see-recipe-macro/94433 "2023-02-10T20:44:13Z")

</div>

I’ve been trying to get my code coverage to 100% in my package ThreeBodyProblem.jl\[GitHub - jared711/ThreeBodyProblem.jl: An astrodynamics package for working in the three body problem\] The last thing left that isn’t co…

---

## [Missing coverage data](https://discourse.julialang.org/t/missing-coverage-data/93715)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 1\
**Last updated:** [January 29, 2023, 12:04am UTC](https://discourse.julialang.org/t/missing-coverage-data/93715 "2023-01-29T00:04:54Z")

</div>

I’m having trouble with figuring out why I’m not getting coverage data on a package I’m trying to get ready for submission to the General registry. This is what I’m doing: % git clone https://github.com/JuliaQuantumCon…

---

## [View coverage logs including dependencies](https://discourse.julialang.org/t/view-coverage-logs-including-dependencies/60541)

<div class="topic-metadata">

**Author:** [@jzr](https://discourse.julialang.org/u/jzr)\
**Replies:** 0\
**Last updated:** [May 4, 2021, 6:30pm UTC](https://discourse.julialang.org/t/view-coverage-logs-including-dependencies/60541 "2021-05-04T18:30:38Z")

</div>

I want to know which lines of my dependencies are being run. I see there is a --code-coverage=all which I guess might do that but I can’t find the docs for it. How can I see which lines julia is running?

---

## [Generating HTML Code Coverage in Azure DevOps](https://discourse.julialang.org/t/generating-html-code-coverage-in-azure-devops/57870)

<div class="topic-metadata">

**Author:** [@Michal](https://discourse.julialang.org/u/Michal)\
**Replies:** 0\
**Last updated:** [March 24, 2021, 2:16pm UTC](https://discourse.julialang.org/t/generating-html-code-coverage-in-azure-devops/57870 "2021-03-24T14:16:11Z")

</div>

How can I generate HTML Code Coverage Report for my git repository in AZURE DevOps? Is it possible with some kind of plugin?

---

## [How to generate Coverage for CUDA functions](https://discourse.julialang.org/t/how-to-generate-coverage-for-cuda-functions/43752)

<div class="topic-metadata">

**Author:** [@Zitzeronion](https://discourse.julialang.org/u/Zitzeronion)\
**Replies:** 2\
**Last updated:** [July 27, 2020, 4:56pm UTC](https://discourse.julialang.org/t/how-to-generate-coverage-for-cuda-functions/43752 "2020-07-27T16:56:40Z")

</div>

Hey there I have a hard time getting the correct coverage for my small project. So I am trying to do simple CFD and run most of the computation on the GPU with CUDA.jl. Everything works as I would expect it and the tes…

---

## [Codecov.submit() warning that coverage files do not exist in Travis CI](https://discourse.julialang.org/t/codecov-submit-warning-that-coverage-files-do-not-exist-in-travis-ci/31562)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 2\
**Last updated:** [November 27, 2019, 7:50am UTC](https://discourse.julialang.org/t/codecov-submit-warning-that-coverage-files-do-not-exist-in-travis-ci/31562 "2019-11-27T07:50:56Z")

</div>

Hi All, I have travis CI set up with my Julia package, and suddenly coverage files are not being found when trying to submit coverage reports to codecov. As a consequnce, a 0% coverage statistic is being submitted to Co…

---

## [How to submit code coverage results to codecov/coveralls via GitLab CI?](https://discourse.julialang.org/t/how-to-submit-code-coverage-results-to-codecov-coveralls-via-gitlab-ci/25503)

<div class="topic-metadata">

**Author:** [@vlandau](https://discourse.julialang.org/u/vlandau)\
**Replies:** 13\
**Last updated:** [June 24, 2019, 7:57pm UTC](https://discourse.julialang.org/t/how-to-submit-code-coverage-results-to-codecov-coveralls-via-gitlab-ci/25503 "2019-06-24T19:57:36Z")

</div>

Hi everyone, I’m working on developing my first Julia package, and I want to make sure I have the code coverage aspect down before committing to developing and hosting the package on GitLab (which I prefer for a few rea…

---

## [\[Coverage.jl\] Submit CI Coverage results to different repo](https://discourse.julialang.org/t/coverage-jl-submit-ci-coverage-results-to-different-repo/20420)

<div class="topic-metadata">

**Author:** [@PieterjanRobbe](https://discourse.julialang.org/u/PieterjanRobbe)\
**Replies:** 2\
**Last updated:** [February 4, 2019, 11:59am UTC](https://discourse.julialang.org/t/coverage-jl-submit-ci-coverage-results-to-different-repo/20420 "2019-02-04T11:59:04Z")

</div>

Suppose I have a package called Main.jl and a separate package TestMain.jl that uses Main.jl. Both are on Github and have Travis CI activated. Is there a way to submit the coverage results from Main, obtained by testing T…

---

## [Code Coverage results seem counterintuitive](https://discourse.julialang.org/t/code-coverage-results-seem-counterintuitive/20356)

<div class="topic-metadata">

**Author:** [@migarstka](https://discourse.julialang.org/u/migarstka)\
**Replies:** 2\
**Last updated:** [February 1, 2019, 2:55pm UTC](https://discourse.julialang.org/t/code-coverage-results-seem-counterintuitive/20356 "2019-02-01T14:55:14Z")

</div>

Assume I have two files. main.jl with some functions and test.jl with unit tests. I want to find out which lines in main.jl are covered by the unit tests. main.jl struct MyStruct a b end function to\_be\_covered(x) …

---

## [Bug in travis submitting code coverage to Coveralls](https://discourse.julialang.org/t/bug-in-travis-submitting-code-coverage-to-coveralls/20198)

<div class="topic-metadata">

**Author:** [@s-baumann](https://discourse.julialang.org/u/s-baumann)\
**Replies:** 1\
**Last updated:** [January 29, 2019, 12:33am UTC](https://discourse.julialang.org/t/bug-in-travis-submitting-code-coverage-to-coveralls/20198 "2019-01-29T00:33:24Z")

</div>

I think there is a bug in the TravisCI in submitting the coverage reports to Coveralls. I\* have been getting the following error: The command “julia --color=yes -e “if VERSION \< v"0.7.0-DEV.5183"; cd(Pkg.dir("${JL\_PKG}…

---

## [Codecov/Coveralls reports wrongly showing 100% coverage](https://discourse.julialang.org/t/codecov-coveralls-reports-wrongly-showing-100-coverage/14831)

<div class="topic-metadata">

**Author:** [@harryscholes](https://discourse.julialang.org/u/harryscholes)\
**Replies:** 1\
**Last updated:** [October 29, 2018, 4:28am UTC](https://discourse.julialang.org/t/codecov-coveralls-reports-wrongly-showing-100-coverage/14831 "2018-10-29T04:28:23Z")

</div>

Although it would be great, I definitely don’t have 100% test coverage. See an example commit report here and the git repo at that commit here. Any idea what may be going wrong here?

---

## [Coveralls showing wrong files?](https://discourse.julialang.org/t/coveralls-showing-wrong-files/16677)

<div class="topic-metadata">

**Author:** [@petandre](https://discourse.julialang.org/u/petandre)\
**Replies:** 0\
**Last updated:** [October 23, 2018, 12:11pm UTC](https://discourse.julialang.org/t/coveralls-showing-wrong-files/16677 "2018-10-23T12:11:28Z")

</div>

Is the coveralls page for Julia looking strange for anyone else? For me it shows this instead of the actual Julia source code. Coveralls have had this issue open for over a year which could be related…

---

## [Coverage of code run at precompile time](https://discourse.julialang.org/t/coverage-of-code-run-at-precompile-time/3198)

<div class="topic-metadata">

**Author:** [@fengyang.wang](https://discourse.julialang.org/u/fengyang.wang)\
**Replies:** 1\
**Last updated:** [April 13, 2017, 6:23pm UTC](https://discourse.julialang.org/t/coverage-of-code-run-at-precompile-time/3198 "2017-04-13T18:23:03Z")

</div>

Coverage doesn’t seem to capture lines which are executed only during package precompile time and not while actually running the tests. Is there a way to also track coverage for these lines? In this example, the process …

---

## [Coveralls authentication issue](https://discourse.julialang.org/t/coveralls-authentication-issue/1302)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 4\
**Last updated:** [January 17, 2017, 6:01am UTC](https://discourse.julialang.org/t/coveralls-authentication-issue/1302 "2017-01-17T06:01:29Z")

</div>

Recently I tried to add coverage tests for another package of mine. When I lookup the build in Coveralls, this is what I see: It seems that I need to give authorization somewhere, but I don’t know what exactly is mis…

---

## [Code coverage issue with methods that return a constant bool](https://discourse.julialang.org/t/code-coverage-issue-with-methods-that-return-a-constant-bool/1088)

<div class="topic-metadata">

**Author:** [@Evizero](https://discourse.julialang.org/u/Evizero)\
**Replies:** 1\
**Last updated:** [December 21, 2016, 1:34pm UTC](https://discourse.julialang.org/t/code-coverage-issue-with-methods-that-return-a-constant-bool/1088 "2016-12-21T13:34:46Z")

</div>

I am observing a (to me) strange issue concerning code coverage. The result of Pkg.test(...; coverage=true) tells me that a lot of methods are never called while I know they were. The methods in question all have a ver…
