Ask HN: Microservices testing best practises?
Hello fellow developers, architects, tech leads,<p>Two years ago In my current company we started migration into microservices. The whole project happen without any plan in place. microservices were created ad-hoc, when someone wanted to create something new or just migrated a part of monolith API. We end up having around 15 coupled services. The problem we are facing now are the tests. As we don&#x27;t have client libraries - project were e.g. User microService is implemented, mock its methods during unit&#x2F;functional test. Mocks are part of the project consuming this service. Integration tests are done manually on staging. Because of that if something in the given microservices changes we are unable to detect the problem (unless someone spots it on staging). It happens often as developers do not update mocks in depended projects. In future we will run integration testing in docker using endpoints not mock but first we have to migrate our build environment to support docker.<p>Few questions:<p>#1 If we writing integration testing to test flow that depends on e.g. 5-6 Microservices where this test should be stored, in the code base of the client applications or separated repo?<p>#2 Should we use client libraries that e.g. provided mocks for given microservice so if there is a change all depended projects will fail running functional tests?<p>#3 How you track releases between multiple projects, e.g. branch xxx from this website can only work with microservices that are using branch yyy?  E.g. in case you would like to rollback website to the previous release. And at the time given microservice could change few times.<p>I would appreciate any feedback you can provide on microservices at your workplace.<p>Thanks!