3 ms·
I think that when it comes to testing databases... most people just don't. Look at this JetBrains survey: https://www.jetbrains.com/lp/devecosystem-2021/databa
by KronisLV 4y ago
I think that when it comes to testing databases... most people just don't.
Look at this JetBrains survey: https://www.jetbrains.com/lp/devecosystem-2021/databases/ https://www.jetbrains.com/lp/devecosystem-2021/databases/
Around half of the people never debug stored procedures. Three quarters of people don't have tests in their databases. Only half of the people version their database scripts.
Personally: the answer is containers. Spin up a database in a container (manually or on CI server) and do whatever you need with it. Seed it with some test data, connect an app to it, check that app tests pass when writing to and reading from a live database (as opposed to mock data stores or something like H2), then discard the container.
Even if you don't have a traditional app, throwaway instances of the real type of DB that you'll be using are great, both for development and testing.