POV-Ray : Newsgroups : povray.off-topic : Q about Unit Tests : Re: Q about Unit Tests Server Time
4 Sep 2024 17:19:59 EDT (-0400)
  Re: Q about Unit Tests  
From: Stephen
Date: 5 Dec 2009 02:32:26
Message: <4b1a0c8a$1@news.povray.org>
Darren New wrote:
> Stephen wrote:
>> The answer is no, you don’t need to retest previously passed tests, 
>> that is the whole idea of *unit* tests.
> 
> OK, then unit tests aren't "independent" in that sense. I guess the 
> advice is to prevent a unit test from relying on stuff left over from a 
> previous unit test, 

That’s right for each unit test you can and generally must prepare the 
data the unit has to test. Sometimes preparing that data is the only way 
you can get the error conditions you want to check for.

> so you could in theory run them in any order *if* 
> they all pass.
> 
You can run them in any order and since they are independent tests they 
do not rely on other tests passing or failing. It is hard to separate 
them in your mind from the system test where the data created in one 
unit test is used as an input in a following test.

-- 

Best Regards,
	Stephen


Post a reply to this message

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