Ask Your Question
0

How can we prevent untested functions from being included in the coverage report?

asked 2023-07-06 08:33:55 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-07-06 08:59:02 +0000

scrum gravatar image

One way to prevent untested functions from being included in the coverage report is to use code coverage tools that allow for specifying which functions or lines of code to exclude from the report. For example, in Python, the coverage.py tool allows for excluding specific functions or files from the report using the .coveragerc configuration file. Another way is to follow best practices and ensure that all functions and lines of code are properly tested before merging them into the main branch of the codebase. This can be achieved through code reviews and automated tests that run on every pull request. Additionally, developers can use static code analysis tools to catch potential issues before they make it into the main branch.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-06 08:33:55 +0000

Seen: 9 times

Last updated: Jul 06 '23