Testing
Setup test environment
Scooter automatically switches to TEST environment when tests are fired. Therefore, you need to make sure that there is a database connection for testing, such as blog_test in config/database.properties file.
In TEST environment, all directory and file monitors are turned off. Code is not compiled and loaded as in the DEVELOPMENT environment. This should help speed up testing.
Run tests
You should put your test classes under test/ directory.
Scooter generates a corresponding test class located under test/ directory. Once you've written a test, you can open a terminal and run the following ant command:
For unit testing:
> ant app_test_unit -DappPath=webapps/blog
For functional testing:
> ant app_test_fun -DappPath=webapps/blog
The ant command will fire tests and generate a report under blog/static/docs/ directory.