Groovy test doesn't get executed

Hi,

we have a project with junit test classes and groovy webtest classes and the groovy webtests aren’t executed. We get the following output while executing it in debug mode:

13:32:10.334 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter] Executing actions for task ':edoras-bpm-execution-sample:test'.
13:32:10.345 [DEBUG] [org.gradle.api.tasks.testing.Test] Started tests
13:32:10.413 [DEBUG] [org.gradle.api.internal.tasks.testing.detection.ClassFileExtractionManager] extracted class groovy/lang/Closure from groovy-all-1.6.0.jar
13:32:10.427 [DEBUG] [org.gradle.api.internal.tasks.testing.detection.ClassFileExtractionManager] extracted class groovy/lang/GroovyObjectSupport from groovy-all-1.6.0.jar
13:32:10.427 [DEBUG] [org.gradle.api.internal.tasks.testing.junit.JUnitDetector] test-class-scan : failed to scan parent class java/lang/Object, could not find the class file
13:32:10.449 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpIncomingConnector] Listening on [c7b1be8e-917a-4331-8a3b-758d70640080 port:44415, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]].
13:32:10.455 [DEBUG] [org.gradle.api.internal.tasks.testing.detection.ClassFileExtractionManager] extracted class org/springframework/web/context/support/XmlWebApplicationContext from spring-web-3.0.5.RELEASE.jar
13:32:10.530 [DEBUG] [org.gradle.api.internal.tasks.testing.detection.ClassFileExtractionManager] extracted class org/springframework/core/io/DefaultResourceLoader from spring-core-3.0.5.RELEASE.jar
13:32:10.530 [DEBUG] [org.gradle.api.internal.tasks.testing.junit.JUnitDetector] test-class-scan : failed to scan parent class java/lang/Object, could not find the class file
13:32:10.532 [DEBUG] [org.gradle.api.internal.tasks.testing.junit.JUnitDetector] test-class-scan : failed to scan parent class com/canoo/webtest/WebtestCase, could not find the class file
13:32:10.853 [QUIET] [system.out] 13:32:10.852 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Attempting to connect to [c7b1be8e-917a-4331-8a3b-758d70640080 port:44415, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]].
13:32:10.854 [QUIET] [system.out] 13:32:10.853 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Trying to connect to address /0:0:0:0:0:0:0:1%1.
13:32:10.858 [QUIET] [system.out] 13:32:10.857 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpOutgoingConnector] Connected to address /0:0:0:0:0:0:0:1%1.
13:32:10.865 [DEBUG] [org.gradle.messaging.remote.internal.inet.TcpIncomingConnector] Accepted connection from /0:0:0:0:0:0:0:1:44902 to /0:0:0:0:0:0:0:1:44415.
13:32:11.134 [QUIET] [system.out] 13:32:10.953 [DEBUG] [org.gradle.process.internal.child.ActionExecutionWorker] Starting Gradle Worker 1.
13:32:11.134 [QUIET] [system.out] 13:32:10.954 [INFO] [org.gradle.api.internal.tasks.testing.worker.TestWorker] Gradle Worker 1 executing tests.
13:32:11.134 [QUIET] [system.out] 13:32:10.991 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Starting producer 3afe6ea8-8577-40c8-bbb7-e37470fbca77

I don’t know why the test isn’t executed. It does compile it properply.

Thanks.

Could be a problem with test class detection. Try with an explicit include filter:

test {
  include "**/*Test.class"
  include "..." // add any other naming patterns used by your test classes
}

Hi Peter,

thanks for your answer but it didn’t work with the explicit includes. It works when I set the property “scanForTestClasses” to false.