News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DZone.com:
Parallel PHPUnit
February 05, 2013 @ 13:35:16

On DZone.com Giorgio Sironi has written up a new tutorial showing how to use parallelism with PHPUnit to execute multiple sets of tests at once, hoping for a performance gain.

Of course the cost of coordinating different processes is always going to be present, so we will never reach the theoretical speedup. I'll report later in this article some simulations. The most important constraints come from the design of our test suites. I can only think of two categories of tests as easily parallelizable: unit tests and Selenium tests.

He mentions one specific issue to watch out for - race conditions between the test sets (using the same backend resources). To help solve the issue, he recommends looking into Paratest, a tool that sits on top of PHPUnit and handles the execution of the tests in parallel. He creates some sample tests (they just compute values) and compares the runs of them in single- and multiple-process modes. The difference is a twenty-five percent drop in execution time for the parallel test runs.

0 comments voice your opinion now!
phpunit unittest parallel paratest project


blog comments powered by Disqus

Similar Posts

Paul Jones\' Blog: Solar 0.18.0 released, and more about testing

Adam Culp: PHPUnit, Composer, PHPStorm, Oh my!

Jachim Coudenys: Using multiple databases in phpunit/dbunit with Composer

Johannes Schluter's Blog: Class posing and overloading the "new" operator

Chris Hartjes: Testing Smells - Try/catch


Community Events





Don't see your event here?
Let us know!


series community language list wordpress install developer api release introduction code laravel library podcast interview application framework configure project threedevsandamaybe

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework