Php 运行codeception中包含的文件套件
我有一个不同模块的应用程序。对于每个模块,都有单独编写的测试,这些测试分为不同的套件 例如,在tests/Custom/codeception.yml中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: [
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看不到这些套件呢?如何在不显式指向模块路径的情况下运行所有测试业务套件
谢谢