I am trying to *finally* get my head into test driven development, but am repeatedly stumbling on an annoying hurdle.
Every time I try and run dev/tests/all it uses an obscene amount of RAM and never seems to finish. This happens when using the browser or sake.
At the moment I am trying to run the test suite using the option of pulling down unit testing libraries via composer, but have also tried setting up php unit via PEAR in the past and had similar results.
I am using a Sony VAIO E14:
Linux Mint 14
Apache 2.2 (possibly 2.3)
Not really sure where to go to diagnose this problem, anyone had a similar problem?
Do you at least see a bit of progress? (dots going by..)
Tests/all will be very slow. Even on my SSD apple HD the full test suite on MySQL can take 5 minutes to run. For doing test driven development I recommend 2 things:
- Only work on one test case at a time. No point running tests/all. Either run a single test - dev/tests/MyApplicationTest or the tests for your module: dev/tests/module/mysite to run all your mysite tests.
- If you can, have sqlite3 installed for tests. If you're not doing SQL heavy work SQLite is much faster to bootup and is normally accurate for simple applications. Most devs will have a switch in _config.php which detects if sake + something like GET['sqlite'] exists and run tests like sake dev/test sqlite=1