[tap-l] TAP tests

Andy Armstrong andy at hexten.net
Tue Mar 20 12:02:17 GMT 2007


On 20 Mar 2007, at 07:08, Adrian Howard wrote:
> On 20 Mar 2007, at 00:58, Andy Armstrong wrote:
> [snip]
>> which got me thinking about the whole idea of
>> language independent tests: the test providing part of the
>> specification in a way that's independent of the implementation
>> language. How cool would that be?
> [snip]
>
> Shades of fit/fitness?

Yes, I think so. But possible with a richer declarative syntax for  
the test data.

A lot of tests boil down to

* construct object / objects
* test assertions about the state of objects
* verify transformations (got / expected)
* Test::LectroTest style assertions
* cleanup

It's common to write Perl tests with a big data structure and a  
little driver that chomps through them and spits out results. Big  
data / small code. Following that trend a bit further you get  
language neutral test data / no user written code at all.

I like the idea that you could write the same thing in, say, Ruby,  
Perl and PHP - either because you need implementations in multiple  
languages or because you're migrating from one language to another -  
and the tests don't change at all.

-- 
Andy Armstrong, hexten.net



More information about the tap-l mailing list