Parallel execution of unittests

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 12:23:38 PDT 2014


On Wednesday, 30 April 2014 at 18:19:34 UTC, Jonathan M Davis via 
Digitalmars-d wrote:
> On Wed, 30 Apr 2014 17:58:34 +0000
> Atila Neves via Digitalmars-d <digitalmars-d at puremagic.com> 
> wrote:
>> Unit tests though, by definition (and I'm aware there are more 
>> than one) have to be independent. Have to not touch the 
>> filesystem, or the network. Only CPU and RAM.
>
> I disagree with this. A unit test is a test that tests a single 
> piece
> of functionality - generally a function - and there are 
> functions which
> have to access the file system or network.

They _use_ access to file system or network, but it is _not_ 
their functionality. Unit testing is all about verifying small 
perfectly separated pieces of functionality which don't depend on 
correctness / stability of any other functions / programs. Doing 
I/O goes against it pretty much by definition and is 
unfortunately one of most common testing antipatterns.


More information about the Digitalmars-d mailing list