|
Test phase and type targeting
There is now a more sophisticated mechanism for targeting the exact test you wish to run. Previously, it was only possible to target test phases but it is now also possible to target test types .
You target particular test phases and/or types by using the following syntax:
grails test-app «phase»:«type»
grails test-app unit:spock // run ‘spock’ test type in ‘unit’ test phase
Either side is optional, and it's absence implies all …
grails test-app unit: // run all types in ‘unit’ phase
grails test-app :spock // run ‘spock’ type in all phases
It can be used in conjunction with test targeting…
grails test-app unit: SomeController // run all test for ‘SomeController’ in the ‘unit’ phase
And is additive…
grails test-app unit: integration: // run all test types in the ‘unit’ and ‘integration’ phases
Legacy phase targeting syntax is supported for backwards compatibility
grails test-app --unit // equivalent to grails test-app unit: |
|