1

Consider a Selenium test that does some steps on the UI (e.g. fill a field and then click a save button), and afterwards checks with a DB query if the data entered in the new field was really saved into the DB.

Is this good or bad practice? What are the advantages and disadvantages of such an approach?

(Let's suppose that the change would be testable in the UI as well -- otherwise, why write something into the DB, if we do not want to show it on the UI at all?)

1
  • You already know the answer to this. There's a significant amount of complexity in setting up a database test, but you're testing against the actual database, not a mock. Overall, what you're describing is an end-to-end integration test. Commented Nov 13, 2016 at 15:24

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.