News Feed
Sections




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

Damian Sromek's Blog:
[How to] Run PHPUnit tests using database 10x faster
January 06, 2011 @ 13:17:26

Damian Sromek has a helpful unit testing hint for those working with database-heavy tests - less about code, more about server setup.

PHPUnit tests that are heavily using the database can run like 10x faster when you run the database from the RAMDisk. It's the easiest way I know to improve the speed of the tests execution.

Because of the slowness that could be caused by running unit tests that rely heavily on the database, he suggests setting up a testing instance on a RAMDisk (or something similar). The speed difference he noticed was huge with his tests normally running about 25 minutes. Moving it over to the RAM disk dropped their execution time down to around 2:30, a jump of around 10 times faster.

0 comments voice your opinion now!
phpunit unittest database ramdisk performance


blog comments powered by Disqus

Similar Posts

PHP 10.0 Blog: More on PHP performance

Lars Tesmer's Blog: How to Unit Test a Class Making Calls to an URL (or the Filesystem) With PHPUnit

Raphael Stolt's Blog: Testing Phing buildfiles with PHPUnit

SitePoint PHP Blog: Web Performance Tricks - Beyond the Basics

Ralph Schindler's Blog: Composite Rowsets For Many-To-Many Relationships Via Zend_Db_Table


Community Events





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


api zendserver opinion podcast interview library laravel series install framework tips list community symfony update release introduction deployment language package

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