We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Code coverage through unit tests running in sub-processes/threads

Formal Metadata

Title
Code coverage through unit tests running in sub-processes/threads
Title of Series
Number of Parts
112
Author
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
EuroPython 2022 - Code coverage through unit tests running in sub-processes/threads: Locally and automated on GitHub - presented by Saransh Chopra [Liffey A on 2022-07-13] The *“Code coverage”* value of a codebase depicts how much of the production/development code is covered by the running unit tests. In the world of open-source, all the maintainers try their best to keep this percentage high, and this process is often automated through tools like `GitHub Actions` and `Codecov`. Hence, code coverage becomes a good metric (not always) to check if a particular codebase is well tested and reliable. Open source maintainers often prefer to run these unit tests in sub-processes or threads as it allows them to run in parallel and reduce the `CI` (continuous integration) run time on pull requests. They also make it easier to stop the tests midway if they are taking too much time (probabilistic tests). In this talk, we will first try to use `coverage.py` in the default mode on the unit tests running in a sub-process or a thread. After going through the results, we will build a solution to cover the “un-covered” code in the local repository. As a final step, we will also configure a `CI` (continuous integration) pipeline using `GitHub Actions` and `Codecov` to automate this process in our remote repository. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License http://creativecommons.org/licenses/by-nc-sa/4.0/