views:

16

answers:

2

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 this?

A: 

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');
Martin V
A: 

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

txwikinger