【发布时间】:2016-10-27 08:23:46
【问题描述】:
我有一个 Yii2 项目,它使用一个名为 frontend 的数据库,但我想在另一个名为 codeception 的数据库上运行我的验收测试。问题是当我运行测试时,它仍然使用 frontend 数据库而不是 codeception 数据库。是不是可以在不同的数据库上运行验收测试,还是我做错了什么?
acceptance.suite.yml
class_name: AcceptanceTester
modules:
enabled: [ WebDriver, Db ]
config:
Db:
dsn: 'mysql:host=localhost;dbname=codeception'
user: 'root'
password: ''
dump: _data/dump.sql
populate: true
cleanup: false
WebDriver:
url: 'http://localhost:8080/myproject/frontend/web'
browser: 'firefox'
env:
chrome:
modules:
config:
WebDriver:
browser: 'chrome'
前端\codeception.yml
namespace: tests\codeception\frontend
actor: Tester
paths:
tests: .
log: _output
data: _data
helpers: _support
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true
config:
test_entry_url: http://localhost:8080/myproject/web/index-test.php
【问题讨论】:
标签: yii2 codeception