how to run a single unit test for grails-core?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to run a single unit test for grails-core?

wgillett
I've cloned grails-core and am trying to run a single unit test. Documentation has this example:

./gradlew -Dtest.single=MappingDslTest :grails-test-suite-persistence:test

but it fails with the error "Could not find matching test for pattern: MappingDslTest". Looks like there is no such test? Well, there is a test file ServiceReloadTests.groovy under grails-test-suite-persistence, but neither of these two commands works either (trying both singular and plural):

./gradlew -Dtest.single=ServiceReloadTest :grails-test-suite-persistence:test
./gradlew -Dtest.single=ServiceReloadTests :grails-test-suite-persistence:test

Any suggestions? I'm new to gradle so could be missing something there.
Reply | Threaded
Open this post in threaded view
|

Re: how to run a single unit test for grails-core?

wgillett
Figured it out, thanks to Bobby Warner: the order of arguments is wrong in the wiki example, in addition to the non-existent test. Here's an example that works:

 ./gradlew :grails-test-suite-uber:test -Dtest.single=Log4jDslTests

Filed a Jira ticket, GRAILS-10942, to fix the wiki.