Do you have separate development, testing and production environments?

Last updated by Daniel Mackay [SSW] 3 months ago.See history

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 old 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.

Bad Example - using scripts to deploy your product to different environments

The best way to manage your product across different environments is to use DevOps tools (like Azure DevOps, GitHub Actions, and others) and Infrastructure as Code (IaC).

For more information, see our rule: Do you know how to create Azure resources?.

Good Example - use DevOps tools and IaC to deploy to different environments

You should also place the resources for each environment into its own Resource Group, and the resource group should have a tag to easily identify which environment the Resource Group relates to.

For more information, see our rule: Do you apply tags to your Azure Resource Groups?.

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 could have been Orange (kind of like traffic lights) but the color palette in Word doesn't give Orange.


Figure: Colors in Word color palette

For more information, see our rule: Do you identify Development, Test and Production Web Servers by colors?

Note: Relying on color alone is not accessible for people who are visually impaired. It's important to use other identifiers to distinguish between environments.

For webapps and websites, make the environment clear by using a URL prefix too.

For more information, see our rule: Do you always rename staging URL on Azure?.

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

Static Site Tip: Add a "THIS IS THE X ENVIRONMENT" banner header to your non-production websites.
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

We open source. Powered by GitHub