From Test::Simple to Test::Extreme - Get The Most Out of Your Tests 23

Why Test first?

  • help you actually write your tests

  • not tempted to skip tests to save time

    • you'll never come back to them

    • skipping tests can make you slower: faster to code, slower to debug

  • helps with the split personality

    • you're the programmer and the tester

    • if you've just written the code, you'll test what it does, not what it doesn't do

    • to the programmer, "not ok" is a failure

    • to the tester, "not ok" is a success

  • makes you write more testable code, which is usually more modular code, which is usually better

 

YAPC::CA << Previous | Index | Next >>
Copyright © 2003 Michael Graham