Gradle 1.10-rc-1: "--tests" doesn't work from the Tooling API

(Attila Kelemen) #1

When using ‘ProjectConnection.newBuild()’ and passing withArguments “–tests” and “mypackage.testMethod” the task execution fails with a no such command option exception.

(Szczepan Faber) #2

Hey Attila,

Does this work from the command line? If so, then it’s a genuine bug and I’ll submit it to jira.


(Attila Kelemen) #3

Yes, it works perfectly fine from the command line. When I tried it from NetBeans, it failed however. Of course, I have verified that I use the appropriate Gradle version (it is simple to verify, since the version is included in the exception message).

(Benjamin Muschko) #4

I create a ticket for it on JIRA: GRADLE-2972

(Szczepan Faber) #5

Hey, the --tests flag works in the tooling api this way: withArguments(‘test’, ‘–tests’, ‘FooTest.passes’)

Down the road we probably want to model it explicitly so that withTasks method supports it.