Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Testing 当集成测试文件和单元测试文件都存在时,grails找不到给定包含的测试_Testing_Integration - Fatal编程技术网

Testing 当集成测试文件和单元测试文件都存在时,grails找不到给定包含的测试

Testing 当集成测试文件和单元测试文件都存在时,grails找不到给定包含的测试,testing,integration,Testing,Integration,我在Grails3.2.6中遇到了一个奇怪的问题 我使用grails命令创建了一个集成测试和一个单元测试 src --integration-test --groovy --it --test01 --test --groovy --ut --test02 当我运行integrationt测试test01时,我得到了一个错误 未找到给定包含项的测试 如果我删除ut.test02, 我收到消息说考试通过了 如何解决这个问题?您在错误的位置访问

我在Grails3.2.6中遇到了一个奇怪的问题

我使用grails命令创建了一个集成测试和一个单元测试

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

 --test
  --groovy
    --ut
      --test02
当我运行integrationt测试test01时,我得到了一个错误 未找到给定包含项的测试

如果我删除ut.test02, 我收到消息说考试通过了


如何解决这个问题?

您在错误的位置访问集成测试。 请将您的层次结构如下所示

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

    --groovy
      --ut
        --test02
test-app it.test01 -echoOut -integration

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

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

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

    --groovy
      --ut
        --test02
test-app it.test01 -echoOut -integration