summaryrefslogtreecommitdiff
path: root/t/README
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-07-25 19:52:45 (GMT)
committerJunio C Hamano <gitster@pobox.com>2010-08-18 19:42:37 (GMT)
commite8b55f5c58d1d9e5d5cd5b24d96b7d3b51047440 (patch)
tree720e97e77643c37503ae915eb4747b1ad2aa4611 /t/README
parent0c357544b0d4415c464fb8b35593b21db1d1f7f7 (diff)
downloadgit-e8b55f5c58d1d9e5d5cd5b24d96b7d3b51047440.zip
git-e8b55f5c58d1d9e5d5cd5b24d96b7d3b51047440.tar.gz
git-e8b55f5c58d1d9e5d5cd5b24d96b7d3b51047440.tar.bz2
t/README: Add a note about the dangers of coverage chasing
Having no coverage at all is almost always a bad sign, but trying to attain 100% coverage everywhere is usually a waste of time. Add a paragraph to explain this to future test writers. Inspired-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/README')
-rw-r--r--t/README9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/README b/t/README
index 468876d..e49534a 100644
--- a/t/README
+++ b/t/README
@@ -271,6 +271,15 @@ Do:
- Check the test coverage for your tests. See the "Test coverage"
below.
+ Don't blindly follow test coverage metrics, they're a good way to
+ spot if you've missed something. If a new function you added
+ doesn't have any coverage you're probably doing something wrong,
+ but having 100% coverage doesn't necessarily mean that you tested
+ everything.
+
+ Tests that are likely to smoke out future regressions are better
+ than tests that just inflate the coverage metrics.
+
Don't:
- exit() within a <script> part.