title: Selenium - Automation Testing Mocking a DB
body: <p>I'm using spec-flow and selenium to do some automation testing. </p>
  
  <p>I'm testing a hierarchy component which may contain parent / child nodes. </p>
  
  <p>My test is to ensure that the hierarchy displays parent and child nodes but of course in the real system this will depend on the database being present
  and populated with the correct data is there a way to mock the database in automated test is it bad idea? </p>
  
  <p>How do I ensure that my tests are robust?</p>
  
  <p>This feels like it's the wrong thing to do but given my problem I can't see any other alternatives but to ensure that my environment is always reset before each automation test run. </p>