thefrugalprogrammer
Other blog posts:
Mar 22,10
Mar 10,10
Mar 09,10
Mar 08,10
Mar 04,10
Unit Testing in ploof
Mar 09, 2010
It's not quite everything I want yet, but it's a start. And the code coverage on /core is growing.
To run unit tests, use the ploof command:
./ploof test [test_directory_or_file_to_load]
By default it looks for a directory called application to load files from:
[app_root]/test/application/
and loads out the files found there. You can specify a different directory (for example 'framework' to run the framework tests, which will be included in your export, or another developer created directory if you have your tests further broken down).
Tests should all extend /core/TestCase, which provides some set up functionality for your fixtures -- it recreates the TEST_DATABASE_NAME with the data from:
[app_root]/test/[test_directory]/fixtures/[loaded_test_object_name].sql
Eventually I'd like to support xml import, but at this point I'm happy to provide a simple, easy to use testing framework as well as provide coverage within ploof.
No comments on this post yet.