grails没有给出的测试包括当集成测试文件和单元测试文件都存在时

时间:2017-03-09 03:00:10

标签: testing integration

我的grails 3.2.6有一个奇怪的问题

我通过grails命令创建集成测试和单元测试

src
 --integration-test
  --groovy
    --it
      --test01

 --test
  --groovy
    --ut
      --test02

当我运行integrationt-test test01时,出现错误 未找到包含

的测试

如果删除ut.test02, 我收到一条消息说测试通过了。

如何解决?

2 个答案:

答案 0 :(得分:3)

我的层次结构是自动创建的。

无论如何,我通过在配置命令行中添加-integration来解决 像这样

test-app it.test01 -echoOut -integration

答案 1 :(得分:-1)

您正在错误的位置访问集成测试。 请把你的层次结构放在这个

--test
  --integration-test
    --groovy
      --it
        --test01

    --groovy
      --ut
        --test02