[TIP] detecting when a changeset is not well tested

Ned Batchelder ned at nedbatchelder.com
Tue Aug 23 18:10:44 PDT 2011


On 8/23/2011 8:40 PM, Phlip wrote:
> Tarek Ziadé wrote:
>
>> So, I can build this in a script or... ask here if something exists already :)
>>
>> I am looking for a script that can:
>>
>> 1/ keep a history of the test coverage for every module of my project
>> 2/ on a commit, detect when the coverage for a module lowers
>> 3/ send a warning and point the part that's not covered
> Speaking as a TDD zealot, your question is the equivalent of "We are
> not doing TDD, so how can I work extra hard to get just one of the
> many benefits that TDD provides as a by-product of extraordinarily
> rapid&  safe development?"
>
> Use TDD, and you have saturation coverage automatically.
>
Perhaps I don't fully understand TDD, but I don't see how it completely 
does away with the utility of coverage measurement.  Surely when you 
refactor code, there's the possibility that your coverage has shifted 
for the worse?  Can you explain your point more?

--Ned.



More information about the testing-in-python mailing list