grails 2.5.1 忽略了 Spock 功能测试

标签 grails testing spock grails-2.5

我刚刚将应用程序从 grails 2.2.4 迁移到 grails 2.5.1。现在不执行 spock 测试。测试目录如下所示:

test
   - unit
      - FirstSpec
      - SecondSpec
      - ... (more Spock tests)  
   - functional
      - FirstTests
      - FirstSpec
      - ... (more JUnit & Spock tests)

发生以下行为:

grails test-app unit:spock

does not run any test

grails test-app unit:

runs all spock unit tests

grails test-app functional:spock

does not run any tests

grails test-app functional:

runs only JUnit functional tests

对于 grails 2.2.4,所有测试都已执行。我遵循了 grails 主页上提供的迁移指南(删除 spock-plugin 等) 有谁知道问题出在哪里?

最佳答案

我遇到了同样的问题。此插件添加了对功能性 spock 测试的支持:https://grails.org/plugin/functional-spock

我不知道为什么默认不提供这个功能。

问候,Rumpel

关于grails 2.5.1 忽略了 Spock 功能测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32460421/

相关文章:

grails - 如何使用Spock框架编写集成测试用例

unit-testing - 在组合之外的模拟上使用 spocks 方法计数器?

grails - 级联的单向多对一映射

grails - 如何防止 grails 的默认 main.css 链接到特定页面

spring - 使用Spring Security插件的Supervisor身份验证可在Grails中执行操作

html - Twitter-bootstrap row-fluid up to span12 only

groovy - Geb+Spock 测试无法重用内容 Controller ,失败并出现 MissingMethodException

testing - Cypress - cmd 运行的不可见元素

java - 使用 Mockito 调用验证 super.method()

sql - 如何在 SQL Server 2012 集群上创建尽可能快的数据库,同时牺牲任何持久性