Parallel execution of unittests

Xavier Bigand via Digitalmars-d digitalmars-d at puremagic.com
Wed Apr 30 18:45:19 PDT 2014


Le 30/04/2014 21:23, Dicebot a écrit :
> 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.

Splitting all features at an absolute atomic level can be achieve for 
open-source libraries, but it's pretty much impossible for an industrial 
software. Why being so restrictive when it's possible to support both 
vision by extending a little the language by something already logical?



More information about the Digitalmars-d mailing list