The following article is a guest post to Zephyr from Wojciech Bulaty is a senior software developer at WB Software Consultancy. WB Software Consultancy has consulted for a spectrum of clients like British Sky Broadcasting and Lloyds Bank, to a range of startups. Their most recent offering is Traffic Parrot service virtualization, a software tool that supports stubbing, mocking and service virtualization.
What is service virtualization?
Service virtualization is a practice common in software testing for simulating backend and third party systems to better test your application under test.
It is like using a wind tunnel to test your software. A new model of an aircraft will be tested in a wind tunnel in different conditions before going to mass market production. You can test software in a wind tunnel as well, by using service virtualization to simulate the environment. A tester can simulate a backend or third party system API to test their application under test in hypothetical situations.
For an in-depth introduction to this topic have a look at this 18-minute video introduction to service virtualization for software testers.
Finding more bugs in manual exploratory testing
Do you know what error gets presented to the user of your application if one of the backend systems returns an unexpected error message or is not responding at all? What happens when a third party returns a negative dollar price for a given product? What happens if the description of a stock item has more than 10,000 characters, does the application blow up or show a friendly error message to the user? What happens to your microservice if one of the dependencies is being unusually slow?
To get answers to those questions, you should simulate problematic conditions using a service virtualization tool such as Traffic Parrot. Let us explore how to simulate a hypothetical situation. We will use an example where a tester is manually exploratory testing a financial application which is connecting to a third party API to get market data.
Step one is to use a traffic recording functionality to capture requests and responses to the third party API. To do that we will put Traffic Parrot between your application and the third party.
Step two is to execute one test case so that a request and response is recorded.
Step three is to stop the recording. This means Traffic Parrot will no longer proxy the traffic to the third party API, but replay recorded responses instead.
Step four is to modify the recorded response using the available web interface and hence test the application in isolation in a hypothetical situation.
For an extended example demonstrating how this can be done in more detail, have a look at the following 3-minute demo on how to install and use Traffic Parrot. If you can’t see a video frame below, download the video from here instead.
We have learned what service virtualization is and how it can be applied to help find more bugs in manual exploratory testing. We have also had a look at an example tool called Traffic Parrot that is aimed at helping software testers with exploratory testing applications and microservices.
Author Wojciech Bulaty: Wojciech Bulaty is a senior software developer at WB Software Consultancy. Wojciech brings a decade of hands-on-coding experience to his writing on Agile, automation, XP, TDD, BDD, pair programming and clean coding. WB Software Consultancy has consulted for a spectrum of clients like British Sky Broadcasting and Lloyds Bank, to a range of startups. Their most recent offering is Traffic Parrot service virtualization, a software tool that supports stubbing, mocking and service virtualization.