Rule #36
Do you have separate development, testing and production environments?
  v4.0 Posted at 6/01/2013 1:46 PM by jackyzhou
It is important to maintain three separate environments for development, testing and production. Some companies skip the testing server because it can be a hassle to copy new files, register DLLs and deploy backend changes. This will usually result in higher support costs and unhappy users due to simple bugs that could have being found in testing.

The best solution is to use build scripts (.bat and .vbs files) to automatically create a setup package that can be used to deploy to testing and production environments. For backend changes, you can either include the change scripts with the setup package (if it's a localised database), or run those scripts as part of your deployment process.

Read more about setup packages at SSW's Wise Standard for Products.

Now make each environment clear.

Whenever an application has a database, have a visual indicator. I recommend a different background color for each environment

  • Red for the Development database
  • Yellow for the Test database
  • Grey (no colour) for the Production database

Note: The Yellow might have been Orange (kind of like traffic lights) but the color palette in Word doesn't give Orange.

colors in Word color palleteFigure: colors in Word color palette

This prevents testers from accidentally entering test data into the production version.

Windows Forms Tip: Implement in the base form in the header
ASP.NET (at least version 2.0) Tip: Implement in the master form in the header

 Figure: Spice up your environments with different colors

An application of this rule is how we identify our CRM servers - see rule Do you identify Development, Test and Production CRM Web Servers by colors?