我全新安装了yii2,并且我在/codeception.yml中启用了覆盖,但是没有生成xml或html代码覆盖率报告。
如果我从前端文件夹运行测试,则会生成覆盖范围。如果我从项目根运行,则不是。
我正在使用--coverage --coverage-xml
我所有的测试都失败了,但没关系。即使0%,也应生成覆盖率报告。
这是前端代码yml
namespace: frontend\tests
actor_suffix: Tester
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
settings:
bootstrap: _bootstrap.php
colors: true
memory_limit: 1024M
coverage:
enabled: true
include:
- controllers/*
- components/*
- urlrules/*
- models/*
- views/*
- ../common/
remote: true
low_limit: 30
high_limit: 60
modules:
config:
Yii2:
configFile: 'config/test-local.php'
这是root / global yml
# global codeception file to run tests from all apps
include:
- common
- frontend
- backend
paths:
log: console/runtime/logs
settings:
colors: true
coverage:
enabled: true
include:
- common/*
- console/*
- frontend/*
- backend/*
low_limit: 30
high_limit: 60