Should we be using actual environments to write integration Tests

  softwareengineering

I have been working as a Automation tester and my responsibility is to Create Integration automation tests. One of the questions I am having is should we use actual environment to write integration Tests. Example: If we have a consumer application that consumes from kafka and puts the message into MQ, we can write integration automation tests in multiple ways. I usually use test containers as my environments to write integration tests in these type scenario. However, I have seen people use actual Kafka and MQ environments to write integrarion tests. This could be isolated environments.

Is this the correct way to do it? Some people are saying that we should’nt be using atual environements becasuse in case if these environments stop working, the integration Tests will fail too compared to using something like test containers. In our company, integration Tests are running as part of the build pipeline, so if something like this happens, the developers will not be able to merge the code to master since it is failing in the integration Testing phase. This is a problem since it is not a issue with the actual application itself. At the same time, One of my friend’s company, they are using actual islaoted environmets for creating and running integration automation tests. So what is the standart for this?

LEAVE A COMMENT