Tuesday, April 10, 2018

SERVICE VIRTUALIZATION VS. MOCKING AND STUBBING


Mocking and stubbing are similar to service virtualization, but they function on smaller scales. Mocking and stubbing usually involve testing specific behaviors in restricted contexts, whereas service virtualization replicates systems at a production scale

The growing popularity of service-oriented architecture and Agile development exposes limitations to mocking and stubbing. Service virtualization approaches testing at the infrastructure level and creates models that different teams can reuse in different circumstances. Mocks and stubs typically require manual development for each use case. Service architectures typically require too many dependent variables for mocking and stubbing to be practical, and agile workflows demand a speed that these methods struggle to meet.

Beyond that, developers are more likely to introduce errors into stubs and mocks based on their assumptions of how the application is supposed to react in each situation. Quality assurance teams can integrate both technologies if they use service virtualization when they need to emulate systems and mocking or stubbing when they only need simple, context-specific testing.

6 comments: