in reply to Testing at the right granularity
On the other side, I feel like I'm cheating doing all these repetitive tests, and having lots of "ok..." where I should really have one,
It sounds like you've adopted a mindset that looks at the raw numbers at the end of the run, instead of looking at the actual testing.
Having a large number of tests doesn't mean anything.
There's no "cheating" if the number of tests goes up.
There's no sin in re-testing the same thing in multiple files. For example, there's nothing wrong, and indeed everything right, with checking the result of every single constructor call, as in
in every single file. For that matter, there's nothing wrong, and indeed everything right, with check the result for each line of text:my $foo = Foo::Bar->new(); isa_ok( $foo, 'Foo::Bar' );
Don't worry about the test numbers. Keep throwing tests at it.while ( my $line = <> ) { my $foo = Foo::Bar->parse( $line ); isa_ok( $foo, 'Foo::Bar' ); ... }
xoxo,
Andy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Testing at the right granularity
by polettix (Vicar) on Apr 20, 2005 at 20:49 UTC |