测试执行期间出错

时间:2017-11-04 21:21:15

标签: testing grails

所有测试执行日志都包含以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> No tests found for given includes: [my.packege.TestclassSpec]

使用命令:test-app。

运行测试

如果使用JUnit运行相同的测试,一切都好。

如何在日志中避免此错误?

UPDATE 考试类:

class TestclassSpec  extends GebSpec {

def setup() {
}

def cleanup() {
}

void "test title"() {
    when:"The home page is visited"
        go '/'

    then:"The title is correct"
        title == "MyGame"
}
}

此外,如果仅运行测试方法,则出现下一个错误::

FAILURE: Build failed with an exception.

* What went wrong:
Task 'title' not found in root project

0 个答案:

没有答案