laravel - 为什么 Codeception 突然忽略我的代码?
问题描述
我的应用程序是使用 Laravel 框架创建的,并使用 Codeception 进行了测试。
在不更改任何测试套件中的codeception.yml
或 的.ymls
情况下,codeception 的覆盖范围突然忽略了我的部分代码。好像这些行突然根本不被识别为代码。这怎么可能发生?
我的 codeception.yml
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
actor_suffix: Tester
extensions:
enabled:
- Codeception\Extension\RunFailed
coverage:
enabled: true
include:
- app\Http\Controllers\*
- app\Http\Traits\*
- public\js\*
我的acceptance.suite.yml
actor: AcceptanceTester
extensions:
enabled:
- Codeception\Extension\RunProcess:
0: java -Dwebdriver.chrome.driver=./chromedriver -jar selenium-server-standalone-3.12.0.jar
sleep: 5
modules:
enabled:
- WebDriver:
url: http://localhost:8000
browser: chrome
- Db:
dsn: 'mysql:host=localhost;dbname=string_translations'
user: 'root'
password:
dump: tests/_data/empty.sql
populate: true # load dump before all tests
我的functional.suite.yml
actor: FunctionalTester
modules:
enabled:
- Laravel5:
environment_file: .env.testing
cleanup: true
- \Helper\Functional
- Db:
dsn: 'mysql:host=localhost;dbname=string_translations_test'
user: 'root'
password:
dump: tests/_data/test_dump.sql
cleanup: true # reload dump between tests
populate: true # load dump before all tests