What data do you use in Selenium tests for Rails applications? Are you loading from fixtures? Use existing dev db? Use separate (non-fixed) db?
I consider my options here. I have a Rails application with a large set of Selenium tests that runs on a modified version of Selenium Grid. Part of the process, right now, is loading a large set of fixtures, once, before launching the test suite. This is a lot of data. Most of them provide information exported from our production database. When I installed it initially, I exported data to yaml from Oracle.
Now, in some report tables, a schema has changed, so of course I need to restore the binding data. There are so many that you do not need to edit files manually. But it seems to be inefficient to recover with every change in the circuit - not to mention that this is another step that needs to be remembered. Is there a better way?
EDIT: I originally intended to load fixtures before each test and unload them after each test, for example, regular Rails tests. But it takes about 15 minutes to collect data due to reporting data. There are 200+ tests, and the kit runs every 12 hours. I cannae bend the space-time commander!
EDIT 2: I also agree that having this large set of fixtures is a bad smell. I'm not sure how to do this, because reports combine a lot of data, and most selenium tests are that they check reports.
Even if it's a small data set, though ... this is another set that will be coordinated with schema changes. (We have a separate, smaller set for integrated unit tests, functional and [Rails].)
Which brings me back to my original question - are there any other options besides doing it manually, or remembering to regenerate them every time?
ruby ruby-on-rails selenium fixtures
Sarah mei
source share