Fork me on GitHub

Project Notes

#445 Perl Testing

Book notes - Perl Testing: A Developer’s Notebook by Ian Langworth, chromatic. First published January 1, 2005.

Notes

I returned to Perl after being thoroughly test-infected by the Ruby community. When I went searching for equivalent tools for Perl, this is the book that gave me the jump-start into making sure my Perl was not just canonical, but well tested!

cover

From the book description:

Perl has a strong history of automated tests. A very early release of Perl 1.0 included a comprehensive test suite, and it’s only improved from there. Learning how Perl’s test tools work and how to put them together to solve all sorts of previously intractable problems can make you a better programmer in general. Besides, it’s easy to use the Perl tools described to handle all sorts of testing problems that you may encounter, even in other languages.

Perl Testing: A Developer’s Notebook will help you dive right in and:

  • Write basic Perl tests with ease and interpret the results
  • Apply special techniques and modules to improve your tests
  • Bundle test suites along with projects
  • Test databases and their data
  • Test websites and web projects
  • Use the “Test Anything Protocol” which tests projects written in languages other than Perl

Contents

  1. Beginning Testing
  2. Writing Tests
  3. Managing Tests
  4. Distributing Your Tests (and Code)
  5. Testing Untestable Code
  6. Testing Databases
  7. Testing Web Sites
  8. Unit Testing with Test:: Class
  9. Testing Everything Else

Source Code

Example sources are maintained at https://resources.oreilly.com/examples/9780596100926/. The repo contains a zipped version of the sources, so I uncompress them to an example_source folder after cloning the repo:

git clone https://resources.oreilly.com/examples/9780596100926 example_source_repo
mkdir example_source
tar -zxvf example_source_repo/perl_testing_adn_examples.tar.gz -C ./example_source

Credits and References

About LCK#445
BooksPerl

This page is a web-friendly rendering of my project notes shared in the LittleCodingKata GitHub repository.

Project Source on GitHub Return to the LittleCodingKata Catalog
About LittleCodingKata

LittleCodingKata is my collection of programming exercises, research and code toys broadly spanning things that relate to programming and software development (languages, frameworks and tools).

These range from the trivial to the complex and serious. Many are inspired by existing work and I'll note credits and references where applicable. The focus is quite scattered, as I variously work on things new and important in the moment, or go back to revisit things from the past.

This is primarily a personal collection for my own edification and learning, but anyone who stumbles by is welcome to borrow, steal or reference the work here. And if you spot errors or issues I'd really appreciate some feedback - create an issue, send me an email or even send a pull-request.

Follow the Blog follow projects and notes as they are published in your favourite feed reader