Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/275.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.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
Php 运行codeception中包含的文件套件_Php_Unit Testing_Codeception - Fatal编程技术网

Php 运行codeception中包含的文件套件

Php 运行codeception中包含的文件套件,php,unit-testing,codeception,Php,Unit Testing,Codeception,我有一个不同模块的应用程序。对于每个模块,都有单独编写的测试,这些测试分为不同的套件 例如,在tests/Custom/codeception.yml中 namespace: Test\Custom paths: tests: . data: _data support: _support log: _output coverage: enabled: true remote: false whitelist: { include: [

我有一个不同模块的应用程序。对于每个模块,都有单独编写的测试,这些测试分为不同的套件

例如,在tests/Custom/codeception.yml中

namespace: Test\Custom

paths:
    tests: .
    data: _data
    support: _support
    log: _output

coverage:
    enabled: true
    remote: false
    whitelist: { include: ['../../../../src/*'] }

suites:
    Business:
        path: Business
    ...
    View:
        path: View
    ....
所以每个模块都有自己的codeception.yml。 要有一个“主配置”,在测试文件夹的第一级中有一个codeception.yml,它包含所有子文件夹模块yml,其中包含

namespace: Test
actor: Tester

include:
    - tests/*
...
当运行由存储库中的分支更新引起的构建时,我们通常不希望运行业务之外的其他测试,因为它们速度慢且脆弱

为此,我尝试运行
codecept run Business
,希望只执行包含文件中的业务套件。 但这不起作用,相反,我收到了错误消息

Suite 'Business' could not be found
但是当我使用Business suite运行一个模块时

codecept run -c tests/Custom Business
它起作用了

我的第一个假设是,文件没有正确地包含到主yml中,所以我尝试了常规调用

codecept run
而且它有效!但不幸的是,所有的套房都有

那么,为什么主codeception.yml看不到这些套件呢?如何在不显式指向模块路径的情况下运行所有测试业务套件

谢谢