POV-Ray : Newsgroups : povray.off-topic : Q about Unit Tests : Re: Q about Unit Tests Server Time
4 Sep 2024 23:20:02 EDT (-0400)
  Re: Q about Unit Tests  
From: Stephen
Date: 6 Dec 2009 02:15:00
Message: <4b1b59f4$1@news.povray.org>
Darren New wrote:
> Stephen wrote:
>> That’s right for each unit test you can and generally must prepare the 
>> data the unit has to test. 
> 
> That I knew. :-)
> 

I know that you know ;)

{Quote from an old (60’s) Brit radio show :) }

>> You can run them in any order and since they are independent tests 
>> they do not rely on other tests passing or failing. 
> 
> I can see situations in which a test would rely on other tests 
> succeeding. You can't test "read from a file" if "open a file" fails, 
> for example. And if "open a file" fails in a way that leaves "read from 
> a file" dumping core, it can be messy to rearrange tests and still know 
> what's failing.
> 

This is where your expertise comes in and you create unit tests with 
steps. For instance: (and I’m just guessing here)

UT 1 - Initialise Media Player.
Step 1. Initialise Media Player.
Expected Result: Media Player initialised.
Result:
Pass/Fail:
Comments:

UT 2 – Read File
Step 1. Open file.
Expected Result: File opened.
Result:
Pass/Fail:
Comments:

Step 2. Read file.
Expected Result: File read into buffer.
Result:
Pass/Fail:
Comments:

A spreadsheet is a better format. :D



-- 

Best Regards,
	Stephen


Post a reply to this message

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