How to include fixtures in selenium tests?

Hey guys,

I just started to make some selenium tests running. The only problem is, that my unit tests use test fixtures and always clean the database in the end of the test. So for example if i run a login test with selenium, my database is always empty. Is it possible to include the fixtures to selenium tests as well? Or is there another / better way to solve this problem? … for example do you use another (third) database beneath the _test and _dev database for the selenium tests? How do you folks solve this problem?

Thanks in advance,

Majestic

anyone got any idea? How do you guys solve this issue?

I know it’s been a year and half since topic was opened, but for those who will encounter this problem.

If CDbFixtureManager cleans the database, but dosen’t insert data from fixture file, means that you defined your fixture correctly (in test file for example), but CDbFixtureManager didn’t find the fixture file for the table.

Check that you:

  1. Put your fixture file in a right place (didn’t change CDbFixtureManager.basePath etc)

  2. Named your fixture file correctly. My problem was that I forgot tbl_ prefix. You have to name your fixture file exactly as table name, for example tbl_user.php (but not just user.php as I did).

Hope this will help.