开发者

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

开发者 https://www.devze.com 2023-01-07 12:55 出处:网络
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 c

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

精彩评论

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