I been trying to search for answer for this question but so far I didn't found anything useful.

Our problem is that we have 2 microservices with many staging branches, each of these microservices are on different servers and environments. We want to test each microservices branch with each other in our staging environment so microservice1-branch20 with microservice2-branch10. They need to communicate two-way so they both need to know that they only can contact with that version of the microservice.

Is there any good way to do these tests without putting them together in one docker container?

2 Answers 2


Yes, this can be done by Service Discovery. The product family you're looking for is of products such as Consul. You should have the container services report their identities and versions when they load. Report their version and ip (for example), and have the tests run against these values.

This will require some effort with installations and scripting, and has a learning curve - but this is the way to go.

  • I tried to understand Consul but does it work if there are like 5 multiple test cases where different people test different 2 completly different branches together? I mean all 5 tester's staging test should be "in a container knowing only each other branches as communication". Maybe our idea to solve this matter is wrong and we should just get a different approach to test. But I haven't seen any information or paper about what to do in our case. Sep 22, 2018 at 17:31

You need apply Continuos integration, so exist many combinations but general you need know your

1.-Programming language.

2.-Operative System and version.

3.-Data type( sql, mongodb,file, etc).

4.-Protocol communication and port.

5.-A script that check o verify outputs.

6.-A file with result/or flag

travis is very well option, because they run test with his machines, and too you can add service git(github option) , with file script called .travis you can run your test, exist other ci services and integrations but general working like it(without docker).

language: python
cache: pip
  - '3.5'
  - '3.6'

install: pip install -r requirements-dev.txt
script: pytest
  provider: pypi
  user: acme-bot
    secure: "<something long>"
  distributions: sdist bdist_wheel
    tags: true


Well if you network communication require additional service networs you too need a service VPN

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.