develooper Front page | perl.module-authors | Postings from October 2005

Re: Tests needing user parameters

Thread Previous
From:
Jess Robinson
Date:
October 20, 2005 01:20
Subject:
Re: Tests needing user parameters
Message ID:
Pine.LNX.4.58.0510200918220.12736@insel.m.isar.de

On Wed, 19 Oct 2005, Spencer Ogden wrote:

> Requiring user input for testing is probably not a good idea. All of the
> sudden you now have to validate the input data as well before you can test
> your own code. Then you need to test you validation code, etc.
> 
> This article may suggest a solution:
> http://www.perl.com/pub/a/2005/04/07/mockobject_kata.html
> 
> Just fake it.
> 

Thanks for the suggestion, but consider also: The whole mock object thing 
would also need a thorough testing itself, making it even more complex. 
Also, supposing the site that I am connecting to changed their responses, 
I'd never know, since I'm only testing against a mock-up of it.

I'd agree if the thing I was connecting to was under my control, but it 
isn't.

Jess


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About