Skip to main content

Testing with Test::Class::Moose

Curtis Poe (All Around The World)
Perl
E145
Average rating: ****.
(4.20, 5 ratings)

Test::Class::Moose is a Moose-based rewrite of Perl’s venerable Test::Class module. While Test::Class is “some assembly required”, Test::Class::Moose is “much less assembly required” and you can be up and running with Test::Class::Moose tests in about a minute. Further, because it’s based on Moose, you gain the full power of the Moose object system and the most popular testing modules in Perl are bundled with it, ensuring that most of the testing functions you need are already included.

Test::Class::Moose also has an optional tagging mechanism which allows you to attach metadata to tests to permit fine-grained control over your test suite. This allows you to:

  • Run a subset of tests based on what you’re working on, such as database tests, the GUI, network tests, and so on.
  • Control the behavior of your test suite per customer.
  • Exclude tests which are not necessary for installation (such as POD)

Additionally, Test::Class::Moose has reporting on the behavior of the test suite itself. Easily find out which classes and methods have been skipped and why. Pass “notes” information to the reporting system. Easily find out which classes or methods take too long to run and even write tests to guard against excessive runtime!

While Test::Class::Moose is appropriate for large, “enterprise class” test suites, it’s so easy to use that smaller test suites will benefit as well. Come see why Test::Class::Moose is one of the most exciting additions to testing that Perl has to offer.

People planning to attend this session also want to see:

Photo of Curtis Poe

Curtis Poe

All Around The World

I’m a well-known Perl expert, better known online as Ovid. I specialize in large-scale, database driven code bases and wrote the test harness that currently ships with the Perl programming language. I’m constantly trying to create better testing tools for the Perl community.

I sit on the Board of Directors of the Perl Foundation and run a consulting company with my lovely wife, Leïla, from our offices in La Rochelle, a medieval port town on the west coast of France.

I speak at conferences all over the world and also do private speaking engagements and training for companies. Currently I’m a specialist for hire, often focusing on complex ETL problems or making developers more productive by fixing test suites and making them run much faster.