The first thing you'll notice is that executing tests is done in the same way as in Grails. This is because Griffon's build system has been refreshed with the latest Grails 1.3.2 codebase. Now you can run all tests using the same phase:type mechanism that Grails has. Griffon has 3 phases (unit, integration and other) and two default types (unit and integration). Those two types are actually JUnit based tests cases, it has been pointed out that perhaps those types should be coalesced into a single one: junit.
Say you'd like to run all JUnit tests in the unit phase, this is what you must type
griffon test-app :unit
griffon test-app unit:
Back to test-app. this command is very flexible with its options. Do you need to run all tests that affect all services?
griffon test-app *Service
griffon test-app FooController
griffon test-app com.acme.Factory.testMakeAnvil
Following into testing related plugins, there are 4 other direct ports of Grails plugins into Griffon
- Code-Coverage - this one existed since the early days, however it has been synchronized to the latest codebase from its Grails counterpart
- Clover - s/grails/griffon/ did the trick for this one, just like that.
- CodeNarc - static code analysis for Groovy source? you bet!
- GMetrics - measures the size and complexity of your codebase
All in all, Griffon will help you to keep the bar green and bugs in check.
Keep on Groovying!