Select
Microservices platform Test data management Service virtualization Microservices architecture

Team's test automation often fails when service dependencies are insufficiently managed in testing environments. This problem is exacerbated when organizations migrate to a microservices architecture, as this increases the number of services and therefore the number of integrations each service has. When not managed correctly, these integrations may lead to untestable architectures and halt the overall migration to microservices. Service virtualization is a common technique to help get integrations under control by creating test doubles in the form of stubs and mocks.

We have been working with test automation since 2006, and began adopting a microservices architecture approach in 2012: we have a long history with this domain. Initially, we started facing issues with testing services in isolation, for the purposes of continuous delivery, and developed a number of battle-tested approaches to solve this problem. Over the years, we have helped multi-billion dollar enterprises with technology departments consisting of thousands of developers and testers tackle this issue in a lean and agile way. We bring our expertise and blueprints to analyze application portfolios, choose early candidates for adoption and scale service virtualization techniques across the board.

Experience with service virtualization

Analyze service dependencies

We start by analyzing dependencies of the services under test, as not all dependencies need to be virtualized. In some cases, when dependencies are well-defined and do not handle sensitive data, it makes sense to use real service endpoints. This saves effort on implementing initial stubs and mocks, reduces costs on maintenance in the long run, streamlines continuous delivery pipeline and makes testing more similar to production conditions.

Implement service virtualization

Service virtualization comes in several slightly different flavors of stubs and mocks, and may be implemented on various levels, from unit testing to service-level functional and performance testing. The common method to implement service virtualization includes a tool that allows recording sessions with real dependencies, and then plays pre-recorded responses during testing time. The tools and techniques may differ in complexity, ranging from simple record-and-replay scenarios to complex programmable replays with changing input and output data, to creation of fully synthetic data and business logic inside test doubles.

Manage test data for dependencies

Similarly to test data management, service virtualization must be maintained after initial implementation. Old recorded sessions should be updated from time to time based on changing data, changing requirements and changing service contracts. When real production dependencies are used for recording, data should be refreshed, tokenized and obfuscated. Regardless of whether synthetic or production data is used, test data management for virtualized dependencies follows the same guiding principles and rules as test data management. 

How it works
Mocking framework for Java unit tests
API mocking tool to help with testing
Cross-platform service virtualization
Helps design and test interactions between objects
Testing framework for behavior driven and test driven development
API simulations for CI pipeline
Mocking framework for Java unit tests
API mocking tool to help with testing
Cross-platform service virtualization
Helps design and test interactions between objects
Testing framework for behavior driven and test driven development
API simulations for CI pipeline

Schedule a free workshop with one of our senior architects to learn more

This field is requiredPlease enter your name
This field is requiredPlease enter your email
This field is requiredPlease enter company name