Automatic Ex-Vivo Regression Testing of Microservices
Microservice-based applications consist of multiple services that can evolve independently. When services are modified, they are typically tested before being deployed. However, the test suites that are executed are usually designed without the exact knowledge about how the services will be accessed and used in the field, therefore they may easily miss relevant test scenarios, failing to prevent the deployment of faulty services. To address this problem, we introduce ExVivoMicroTest, an approach that analyzes the execution of deployed services at runtime in the field, in order to generate test cases for future versions of the same services. ExVivoMicroTest exploits cloud technologies, containers in particular, to generate a mocked environment that fully isolates the service under test from the rest of the system. It then reproduces service interactions as previously analyzed, thus testing the new version of the service against usage scenarios that capture the field usages of its earlier versions. We evaluate our approach on an open sourced microservices application and show that ExVivoMicroTest can effectively reveal faults based on automatically collected data.