Why service virtualization is like a wind tunnel

This week I attended the second edition of the Continuous Delivery Conference here in the Netherlands. It was a very interesting day with some good keynotes and presentations, plus I had a lot of interesting discussions with both old and new acquaintances, something that really adds value to a conference for me as an independent consultant. But that’s not what this post is about.. Rather it’s about something that struck me when listening to one of the presentations. I’m not sure who was talking as I made notes only much later, but if it was you, please reveal yourself and come get your credits! The presenter briefly discussed service virtualization as a tool to use in the continuous delivery pipeline and compared it to using a wind tunnel for investigating the aeodynamic properties of cars or airplanes. This struck me as a very solid analogy, so much that I would like to share it with you here.

Testing in a wind tunnel

So why do I think service virtualization IS like wind tunnel testing, exactly?

It allows for executing tests in a controlled environment
Testing car or airplane aerodynamics only yields valuable results if you know exactly what conditions applied and which input parameters (wind speed, angle, variation, etc.) were used to obtain the results. Similarly, when you’re testing any distributed system with external dependencies, you can only safely rely on the test results when you know exactly how those dependencies are behaving. With modern-day highly distributed applications – this especially applies to applications built using microservice architectures – not all dependencies are necessarily under your control anymore. If you want to have full control over the behaviour of those dependencies for stable and reliable testing, service virtualization is an excellent option.

Tests can be repeated under the exact same circumstances
Wind tunnels enable test teams to rerun specific tests over and over again, using the same conditions every time. This allows them to exactly determine the effect of any change on the aerodynamics of their car or plane under test. In software testing, this is exactly what you want when you need to reproduce or analyze a defect or any other suspect behaviour. Unfortunately, when dependencies are outside your circle of control, this might not be easy, if possible at all. When you’re using virtual assets instead of external dependencies, it’s far easier to recreate the exact conditions that applied when the defect occurred.

It can be used to test for highly improbable situations
150mph wind gusts, wind coming from three directions at the same time, … Situations that might be really hard – if not impossible – to reproduce when road testing, but made possible by using a wind tunnel. It’s those corner cases where interesting behaviour of your test object might surface, so they are really worth looking at. With service virtualization, it’s possible, for example, to prepare highly improbable responses for a virtualized third party dependency and see how your application handles these. This is a great way to improve the resilience of and trust in the application you’re developing and testing.

There’s always a need for real life road testing
As with testing cars and planes, you can go a long way using simulated test environments, but there’s no place like the road to really see how your software holds up. So never trust on virtualization alone when testing any application that uses dependencies, because there’s always a situation or two you didn’t think of when virtualizing.. Instead, use your software wind tunnel wisely and your testing process will see the benefits.

10 thoughts on “Why service virtualization is like a wind tunnel

  1. Hi Bas,
    Suppose i have a lot of tests to automate in one single program.By including Selenium WebDriver jar in eclipse ,writing functions for each test in java and calling all that function one by one from main method and using an extent report for reporting i believe we can accomplish the automation right?
    But without a framework like Junit or TestNG it won’t make sense or will become extremely difficult to implement and check conditions for passing or failing tests when we have to automate lot of tests in one single script correct?Is this the reason you said we have to include a framework like Junit or TesNG eventhough we use extentreport?
    Also the correct method is to implement extent report as a listener of Junit or TestNG right?

    • There is no one correct approach to implementing your automated tests.. But I would indeed highly recommend using JUnit or even better, TestNG, to run your tests. In my current project I use NUnit (the C# version of JUnit) to run the tests and ExtentReports for human readable logging. I won’t say it’s the best option but it works like a charm in my case.

      Also, there is no one correct method of using ExtentReports. If using it through a TestNG listener works best for you, do it. If not, then don’t. Sounds obvious, but remember there are many ways to accomplish something.

      Finally, could you please post these questions under a relevant post? This has nothing to do with service virtualization.. Thanks!

  2. Happy New Year Bas 🙂
    i know i have not studied enough to get an automation testing job in another company,but since time is less i think i have to attend some interviews. maybe they won’t accept someone who learned things from internet and might ask for certificates and all that shows i did a course in Selenium Webdriver.if that is the case i might have to quit this field and try something else which has more salary.Thanks for all your help friend.

    • Happy New Year to you too (although we still have a couple of hours to go in 2015 over here). As far as I know there are no official courses for Selenium (plus I am pretty opposed to tool certifications as they say virtually nothing about someone’s ability, but that’s a different discussion altogether). I hope you’ll find a great job in test automation as it’s a very interesting and rewarding field of work if done right. All the best!

      • Bas if you want you can delete this comment since this is unrelated to the topic.website application,software application,mobile application these are different things right?i don’t know maybe there are companies who produce these three things.In our company it is only websites.so in order to test if the website works correctly when made responsive there are mobile devices.so what actually is app testing?why should we test that?can websites be converted to say an android app and then test it?why should we do that?Actually i went through some tutorials on app creation,app testing etc.To tell you the truth it looked very difficult to learn or understand than selenium webdriver 🙂

        • Hi Sherin,

          yes, app development is very different from developing automated tests in (for example) Selenium. I think it’s a bit more difficult too, but that’s probably mostly because of my lack of experience..

          • But bas you have explained testing mobile app with selendroid wonderfully.i want to try it but only if i have mobile apps to test,then it is useful right?we only have websites(in pc and mobile) to test right?There is the confusion.one of my friend told me websites that runs on mobile can be converted to mobile apps using some tools and then we can test it.

          • Yeah, I would only use Selendroid or Appium for ‘real’ / native mobile apps. You can test regular websites on mobile devices pretty easily using BrowserStack or Saucelabs or something similar. That’s what I do in my current project as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.