ullright automated software tests
We use two different types of tests:
- Functional tests ("end-to-end" system tests)
- Unit tests
The test are packaged with each ullright plugin.
- Unit tests in plugins/myPlugin/test/unit
- Functional tests in plugins/myPlugin/test/functional
The tests are run the symfony style "php symfony test:all"
We use a patched version of the test tasks. Documentation can be found here:
http://trac.symfony-project.org/wiki/PluginTesting
Fixture and Database Handling
Each ullright module has a file with test fixtures located in plugins/ullMyPlugin/data/fixtures/ullMyFixtures.yml
Normally these test fixtures are used for the automated tests as well. A symlink is created from the test directory to the plugin's fixture file. Example: plugins/ullMyPlugin/test/unit/ullMyFixtures.yml is a symlink to plugins/ullMyPlugin/data/fixtures/ullMyFixtures.yml.
A unit test in automatically loads all fixtures in the current directory
Reloading the database can be slow. To improve the performance test we use use cached mysql dumps since 2010-03-15
That means, if you changed the fixtures or the database layout you have to clear the cache!
php symfony cache:clear