Grails拒绝运行我的集成测试

时间:2017-09-04 02:28:22

标签: grails integration-testing test-first

我使用以下方法创建了一个grails集成测试:

$ grails create-integration-test RoundControllerIntegration

并生成以下代码:

package gcbgb


import grails.test.mixin.integration.Integration
import grails.transaction.*
import spock.lang.*

@Integration
@Rollback
class RoundControllerIntegrationSpec extends Specification {

    def setup() {
    }

    def cleanup() {
    }

    void "test something"() {
        expect:"fix me"
            true == false
    }
}

这代表了一个明显失败的测试,但是当我使用以下命令运行集成测试时

$ grails test-app -integration

我没有失败......

$ grails test-app -integration

> Configure project :
Gradle now uses separate output directories for each JVM language, but this build assumes a single directory for all classes from a source set. This behaviour has been deprecated and is scheduled to be removed in Gradle 5.0
        at build_26x4k1g7i20kh9xdxq6diqdhm.run(/home/peter/ownCloud/workspace-halcon/gcbgb/build.gradle:19)
The setTestClassesDir(File) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the setTestClassesDirs(FileCollection) method instead.
        at build_26x4k1g7i20kh9xdxq6diqdhm.run(/home/peter/ownCloud/workspace-halcon/gcbgb/build.gradle:19)


BUILD SUCCESSFUL in 2s
6 actionable tasks: 1 executed, 5 up-to-date
| Tests PASSED

0 个答案:

没有答案