Let's say I have a (fairly typical) set of environments: PROD, UAT, QA, DEV
. Is it a good idea to run your tests across all environments?
Here's what I'm thinking of. I have a proc in SQL that my code depends on, I'll call it proc_getActiveCustomers
. If that proc isn't present my app will go south real fast. So I write a test that checks for the existence of this proc in the database. Nothing new here.
But when I then deploy my app to the QA environment, would I also want to have a test that checks that environment for the existence of proc_getActiveCustomers
? I think this is a good idea but I've never heard much about testing in environments outside of development. Makes me wonder if there's some downside I'm not aware of.
The direction that I'm going is to have a list of environments in code and then passing that environment into my unit test.