App::Prove 3.06 brings some great productivity improvements!

March 10, 2010 § 2 Comments

I don’t know how I overlooked this, but App::Prove 3.06 brings some excellent changes that are a massive help to productivity. At work, our test suite can take up to 10 minutes to run (on bad days) which isn’t huge, but when I’m trying to use TDD I find that this is just too slow to be usable. I was discussing this in #catalyst last night, and amongst other great information (some future blog posts lined up, stay tuned!), ijw mentioned that prove --state might be something of interest to me

However, my man entry for prove doesn’t even have a –state option, but looking at App::Prove on CPAN shows that this is a killer feature. Here’s how it works

–state allows you to log the status of App::Prove between runs, and do some interesting things with them. Essentially, state tracking captures the order that tests are ran, and the result of running them. The “failed” state is of most interesting to me, which runs only the tests that failed in the last run. So, in the cases that we introduce a bug somewhere, I can run all the tests, then repeatedly run the failing tests until they all pass.

Another option I’ve just noticed now is the -j option, which allows you to run multiple tests in parallel. Me and rafl have been talking about a forking test harness, which is just a little bit beyond what -j does. -j, like make -j, allows you to specify parallel test execution. If you’re sensible, and your tests don’t interact with the world, this should allow you to run lots of tests together. Sadly, our tests do touch the world, so we can’t do this just yet.


§ 2 Responses to App::Prove 3.06 brings some great productivity improvements!

  • Great to know, thanks! Btw, you might also want to check out Test::Aggregate (if you have lots of small test scripts and a significant amount of test is wasted in loading modules).

    • acidcycles says:

      Hey, yea I’m familiar with Test::Aggregate, see my latest entry about why I don’t like it though 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading App::Prove 3.06 brings some great productivity improvements! at Cycles.


%d bloggers like this: