Web Applications – Difference Between Staging and UAT Environments

continuous-deliveryenvironmentweb-applications

I know we should have at least 3 different environments while developing a solution:

  • Development: The programmers are free to change and push changes any time in order to quickly test their code and integrate with other changes, without the fear of breaking anything – this is connected to the TEST databases and services;
  • UAT: Should be treated with reverence by the developers, as it should contain a "as good as possible" copy of the production environment regarding hardware, with the difference being that this environment is connected to UAT databases with an editable copy of production data – it's used both by the Q&A team and the users to validate changes that'll go to production
  • Production: The real deal.

I've looked into this question on SoftwareEngineering, and this question on ServerFault, and they seem to differ on what's the meaning of the Staging Environment. Also, Wikipedia page about the subject states that:

The primary use of a staging environment is to test all installation/configuration/migration scripts and procedures, before they are applied to production environment. This ensures that all major and minor upgrades to the production environment will be completed reliably without errors, in minimum time.

For me, Staging equals UAT, where you must test the application and deployment procedures before pushing to the real world. So, we push the package with the changes to UAT the same way we push to production, fully automated and with all the ceremony we should have with the production environment.

That being said, what's the proper difference between an UAT environment and a Staging environment ?

EDIT: Just to be clear, I'm thinking in terms of a Web Application, be it an internet website or an intranet website. No "forms" app or mobile app.

Best Answer

The difference is the data.

A UAT environment is set up for "user acceptance" of new functionality. In order to test that functionality, QA or stakeholders may set up user profiles a particular way in order to exercise particular features, or may set up mock products or configurations to check them all out.

A staging environment is often set up with a copy of production data, sometimes anonymized. Some corporations regularly "refresh" their staging database from a production snapshot. The primary focus is to ensure that the application will work in production the same way it worked in UAT. Instead of setting up data anew, testers will search the database for profiles and products that match an essential set of test cases. Often the "real" data have quirks in them that give rise to unexpected edge cases that were missed during UAT. Also, any data migration testing would need to take place in the staging environment.

Related Topic