Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 161425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:12:39+00:00 2026-05-11T11:12:39+00:00

What data do you use with Selenium tests on Rails apps? Do you load

  • 0

What data do you use with Selenium tests on Rails apps? Do you load from fixtures? Use an existing dev db? Use a separate (non-fixture) db?

I’m considering my options here. I have a Rails app with a large Selenium test suite that runs on a modified version of Selenium Grid. Part of the process, right now, is loading a large set of fixtures, once, before the test suite runs. It’s a LOT of data. Most of it is reporting info exported from our production db. When I set it up originally, I exported the data to yaml from Oracle.

Now there’s been a schema change in some of the reporting tables, so of course I have to regenerate the fixture data. There is so much of it that it’s not worthwhile to edit the files by hand. But it seems inefficient to have to regenerate for every little schema change – not to mention that it’s yet another step to remember to do. Is there a better way?

EDIT: I originally intended to load the fixtures before each test and unload them after each test, like regular Rails tests. But it takes about 15 minutes to load the fixtures due to this reporting data. There are 200+ tests, and the suite runs every 12 hours. I cannae bend spacetime captain!

EDIT 2: I also agree that having this big set of fixtures is a bad smell. I’m not sure how to pare it down, though, because the reports aggregate a lot of data and much of the value of the selenium tests is that they test the reports.

Even if it’s a small set of data, though…it’s still another set to keep co-ordinated with schema changes. (We have a separate, smaller set for unit, functional, and [Rails] integration tests.)

Which brings me back to my original question – are there other options besides doing it by hand, or remembering to regenerate them each time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:12:39+00:00Added an answer on May 11, 2026 at 11:12 am

    If you can, the best possible thing to do is have a system in which each Selenium test gets it’s own data state (ie: DB tables dropped and recreated, bootstrap data re-inserted, and caches cleared). This is easier said than done and usually is only possible if the project planned for it from the start.

    The next best thing is to have a consistent DB state for each test suite/run. This is not as nice since there is now a strong chance that some tests will depend on the success of previously run tests, making it more difficult identify true failures vs. false negatives.

    The worst case, IMO, is to use a static DB in which each test run mutates the date. This almost always leads to problems and is usually a ‘project smell’. The key to doing it the ‘right way’ (again, IMO) is to be vigilant about any state/schema change and capture it as part of the automated test/build process.

    Rails does a good job with this already with Migrations, so take advantage of them! Without knowing your situation, I’d generally question the need to run Selenium tests against a snap of the full DB. Most DBs can (or should) be distilled down to less than 1MB for automated testing, making automated schema migrations and data reset much more efficient.

    The only time I’ve seen a ‘valid’ reason for massive DBs for Selenium tests is when the DB itself contains large chunks of ‘logic data’ in which the data affects the application flow (think: data-driven UI).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 110k
  • Answers 110k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer you could use ExternalInterface to call javascript to remove the… May 11, 2026 at 9:38 pm
  • Editorial Team
    Editorial Team added an answer Let's start with the uncomfortable truth: GWT compiler performance is… May 11, 2026 at 9:38 pm
  • Editorial Team
    Editorial Team added an answer In the projects property pages, use the post build events… May 11, 2026 at 9:38 pm

Related Questions

If you've worked on a project that stores data for use with the semantic
We have need for a rating system in a project we are working on,
I only know a small amount about .NET MVC and haven't used it barely
I develop a variety of applications and have 3-4 miscellaneous libraries that I reuse

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.