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

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

Hey Attila,

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

Cheers!

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).

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

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.