开发者

Is there a way in phpunit to use the database extension together with the selenium extension?

Basically, I want to run selenium tests that allow the database to be setup to a define status before each Selenium test. How would I do开发者_JAVA百科 this?


Given that Selenium just calls url's you could simply use the setUp() and tearDown() methods to get your database into a specific state. Transaction rollback is one approach to keeping the database consistent.

Then call url's mapping into the project under test (and your test database) e.g.:

$this->open('http://testing.example.org/system/under/test.php');


I have written my own database setup and teardown routines which I added to a child of selenium testcase

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜