Keep Test Scripts Small
Keep Test Scripts Small
●
Many testing questions start with
▶
"I've got this test script with 1400 tests..."
●
Big tests are
▶
Hard to maintain
▶
Hard to decouple
▶
Hard to read
▶
Take a long time to run
▶
Have all the same problems as big subroutines
●
Keep them small & focused.
▶
One function or set of functions per script
▶
One aspect per script
▶
Put complicated tests in their own script
▶
Put slow tests in their own script
●
Test::Simple/More's tests are a good example