Why do we need two testing cycles - qa servers and stage servers?

625    Asked by akashMishra in Cyber Security , Asked on Feb 15, 2022

We first get the code to be tested on the "QA server" and then on the "Staging server". Now when we are already done testing on the "QA server" why can't we simply push code directly to the "Production server".


I know it's not safe and one more round of testing is always good, it's our gut feeling but if we go logically, why?

Answered by Alastair McDade

QA stands for Quality Assurance. Probably the QA server is suitable for testing, measuring the quality of the software/hardware. Probably unit tests/regression tests are meant to run on this server.


The what-you-call staging/pre-production server, is a system running the production code used for regular usage of the software/hardware.

This means; you run the unit-tests against the source code on the QA server. This is a server that has software installed to run those tests, and more often than not it's a server that has a load of software running that might help with situations like mocking (thus you don't test it like you would in production, you fake a lot of stuff).

The Staging server, however, does not run tests against source code, but against production code. You compile or transpile the code. That means you can run integration tests and use an environment similar to the one used for production. That server should be identical to the production server in such a way that, when you deliver your product, you can be sure the production server is capable of handling the application.



Your Answer

Answer (1)

Hey AkashMishra,

You've raised an interesting question, and it's something many folks grapple with in the world of software development. The distinction between QA servers and staging servers is, indeed, a vital part of the software development process. While it might seem like an extra step, it serves a critical purpose.

Think of QA servers as the first line of defense, where the initial testing occurs. Here, you're ensuring that the code doesn't have glaring issues or bugs that could cause severe problems on the production server. But that's just the beginning.

Staging servers are like a dress rehearsal before the grand show. They mimic the production environment closely, allowing you to test how your application behaves in a real-world setting without risking your live system. This is where you catch those sneaky bugs that only appear under specific conditions.

Pushing code directly to the production server might work occasionally, but it's a risky game of chance. An extra round of testing is like an insurance policy, protecting you from unexpected hiccups. It's a best practice that ensures a smoother, more reliable user experience.

In my experience, I've seen the consequences of skipping these steps. It might save time in the short term, but it often leads to more significant issues down the line. So, I'd advise sticking to the tried and true process of QA and staging servers for a robust and dependable application.

1 Year

Interviews

Parent Categories