From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.
Post-commit patch review available online on OpenCoverage
reggie last edited by
With it, one can estimate whether there are enough tests for code changes, or whether to write new tests. Coco can therefore play a useful role in quality control.
What is a post-commit patch review?
Post-commit patch review is an extension of the Coco report generation feature (https://doc.froglogic.com/squish-coco/latest/commandline.html#cmreport).
The extension supports a review of changes applied to a software project. Typically, one wants to know whether the test suite of the project contains enough tests that target specifically the lines of code that have changed. For that purpose the Coco patch analysis (https://doc.froglogic.com/squish-coco/latest/coveragebrowser.html#sec:patch-analysis) creates a report which shows whether there are enough tests for the changed code, or whether new tests are required.
If desired, run exactly those tests that execute the code in the patch. This will mean large speedup in comparison with the execution of a full test suite.
To analyse a recent patch one merely needs a software project that instrumented with Coco, and a set of tests for the project run at least once. With patch analysis, one can find out how the project’s code coverage will differ after applying a patch. This information is gathered even before running the tests again. One can answer the question: Which of the lines in the patch will be covered by the existing tests, and which will not? For all lines covered by the tests, the patch analysis also displays the tests that will cover them.
Patch analysis is available before applying a patch to a software project as well. Then it generates a report for the code in the patch based on previously executed tests without requiring a re-execution of the tests.
Patch reviews in OpenCoverage
In OpenCoverage, we already show the code coverage for selected open-source projects. Now we have added an automated post-commit patch review for them. We compare the most recent changes in the Git repository with the newest revision.
An overview table (http://www.opencoverage.net/analysis.php?project=qtdeclarative) shows the summaries of the analyses for each software project. It contains for each patch a short overview, with the number of modified lines executed and not executed, and other information.