Section B.17. Chapter 18, Testing and Debugging


B.17. Chapter 18, Testing and Debugging

  • Write the test cases first. [Test Cases]

  • Standardize your tests with Test::Simple or Test::More. [Modular Testing]

  • Standardize your test suites with Test::Harness. [Test Suites]

  • Write test cases that fail. [Failure]

  • Test both the likely and the unlikely. [What to Test]

  • Add new test cases before you start debugging. [Debugging and Testing]

  • Always use strict. [Strictures]

  • Always turn on warnings explicitly. [Warnings]

  • Never assume that a warning-free compilation implies correctness. [Correctness]

  • Turn off strictures or warnings explicitly, selectively, and in the smallest possible scope. [Overriding Strictures]

  • Learn at least a subset of the perl debugger. [The Debugger]

  • Use serialized warnings when debugging "manually". [Manual Debugging]

  • Consider using "smart comments" when debugging, rather than warn statements. [Semi-Automatic Debugging]



Perl Best Practices
Perl Best Practices
ISBN: 0596001738
EAN: 2147483647
Year: 2004
Pages: 350
Authors: Damian Conway

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net