POV-Ray : Newsgroups : povray.off-topic : Unit Testing question : Re: Unit Testing question Server Time
29 Jul 2024 18:25:36 EDT (-0400)
  Re: Unit Testing question  
From: clipka
Date: 9 Jun 2011 07:04:00
Message: <4df0a8a0$1@news.povray.org>
Am 08.06.2011 22:01, schrieb Darren New:
> Every work on unit testing I've read basically says you should run all
> the unit tests after each change, or certainly at least before each
> check-in.
>
> However, those same texts say that unit testing should only test
> individual units, and everything else should be mocked.
>
> Why would I want to run the unit tests for the XML parser after making
> changes to the color picker dialog box? Or, more generally, why would I
> want to run unit tests that are only executing code that hasn't changed
> since last time the unit tests passed?

(1) You only run the unit tests for those units you actually changed. 
But I guess you knew that.

(2a) If you /know/ beyond doubt that your code change in part X of a 
unit can't affect part Y of the same unit, then X and Y should probably 
be separate units.

(2b) If on the other hand you do /not/ know beyond doubt whether your 
code change in part X of a unit might affect part Y of the same unit, 
then obviously you should test part Y as well to be sure. But I guess 
that's no news to you either.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.