1

My application under test is a legacy system, being in the process of rewriting towards the modular microservice way, however the modules are not completely independent and make all sorts of calls to the external systems. There are several third party applications as well, which are an integral part of the working environment.

The services are hosted in Azure and deployed to slots (blue/green model), which are swapped after any successful test execution.

The problem I am facing now is when the new version of a service comes out, it is deployed to the slot (say, GREEN), while the rest of the services (old versions) are not deployed at all (the old versions still run in BLUE), so our environment looks like this:

<Gateway>
|-- Service A (GREEN) // new version
|-- Service B (BLUE)  // old version
|-- ...

This makes the existing test structure fail, as the framework makes the tests use the same base URL for all the calls:

ServiceA.getAnObject(GreenURL) // new version
ServiceB.getAnObject(GreenURL) // old version fails due to ServiceB running in Blue

The developers are pushing to change the model to

ServiceA.getAnObject(GreenURL) // new version
ServiceB.getAnObject(BlueURL)  // old version

While it kind of makes sense to me, but in my past experience, the application was deployed to the slot completely, which would have worked with the current model and also eliminated the reliance on the old environment.

What are the best practices of deployment and testing on the slotted environments?

  • How do you get and set the URLs per new deployment? – masood ghz Apr 25 at 15:04
  • APIM on the server side; environment variable on the client side (base url derived from the environment value). – Eugene A Apr 25 at 15:14
  • I'm not sure what is the problem of setting the URLs as your developer recommended but maybe you could have a fix URL and use dynamic routing, or define new DNS per Service and update it's targets dynamically. – masood ghz Apr 26 at 8:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.