

Ask HN: Is there a theory of unit testing? - kemiller

Unit testing seems to be very popular in industry, but I have not come across any theoretical work on the subject.  Is there anyone in academia working on it?  In general they seem to prefer type systems.
======
AnimalMuppet
Type systems gives you things you can theoretically prove. Unit testing gives
you fewer defects (at the price of some effort) in practice, but it's not the
kind of thing you can theorize about (except that "it ought to reduce
defects").

The best you could get is probably "in our study, with our participants,
writing unit tests led to an X% drop in defects, at the price of Y% more
effort".

