Title: Optimize plugin phpunit test suite startup speed
Last modified: August 30, 2016

---

# Optimize plugin phpunit test suite startup speed

 *  Resolved [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * (@eteubert)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/optimize-plugin-phpunit-test-suite-startup-speed/)
 * Hi,
 * I’m using the basic test setup from [https://develop.svn.wordpress.org/trunk/](https://develop.svn.wordpress.org/trunk/)
   but with my own tests. However, startup time is about 15 seconds and that seems
   a bit much … ?
 * Here’s my setup:
 * – I have a single test that just checks if my plugin is active
    – I echo the 
   time at the beginning and end of `bootstrap.php`. That’s only 3 seconds. After
   that it takes ~10s until `PHPUnit 4.6.10 by Sebastian Bergmann and contributors.`
   appears. What’s happening in that time and can I speed it up?
 * > vagrant@vvv:/my/plugin$ phpunit tests/phpunit/void_test.php
   > start bootstrap 1435391893.2444
   >  Installing… Running as single site… To run
   > multisite, use -c tests/phpunit/multisite.xml Not running ajax tests. To execute
   > these, use –group ajax. Not running ms-files tests. To execute these, use –
   > group ms-files. Not running external-http tests. To execute these, use –group
   > external-http.
   > finish bootstrap 1435391896.1637
   >  PHPUnit 4.6.10 by Sebastian Bergmann and 
   > contributors.
   > Configuration read from /srv/www/podlove-publisher/htdocs/wp-content/plugins/
   > podlove-podcasting-plugin-for-wordpress/phpunit.xml
   > .
   > Time: 17.27 seconds, Memory: 30.00Mb
   > OK (1 test, 1 assertion)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * (@eteubert)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/optimize-plugin-phpunit-test-suite-startup-speed/#post-6273595)
 * Turned out to be an issue with running the tests in vagrant. When I run them 
   locally via MAMP they finish in 2 seconds.
 *  Thread Starter [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * (@eteubert)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/optimize-plugin-phpunit-test-suite-startup-speed/#post-6273596)
 * Could be solved by using nfs to mount the virtual box. Explained here: [http://ttmm.io/tech/varying-vagrants-evolved/](http://ttmm.io/tech/varying-vagrants-evolved/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Optimize plugin phpunit test suite startup speed’ is closed to new replies.

## Tags

 * [phpunit](https://wordpress.org/support/topic-tag/phpunit/)
 * [speed](https://wordpress.org/support/topic-tag/speed/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 1 participant
 * Last reply from: [Eric Teubert](https://wordpress.org/support/users/eteubert/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/optimize-plugin-phpunit-test-suite-startup-speed/#post-6273596)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
