Service Virtualization - When integration points are a dependency for development

Service Virtualization - When integration points are a dependency for development


Being dependent on is nothing but relying upon. One has to wait for that other thing to get the task at hand started/completed.

If Dependencies are not resolved or not made available, the task cannot be started/completed.

If dependencies are made available, much of the testing from QA & Dev at a component level, Unit level, can “shift left,” or be moved earlier in the SDLC. This is because each component can be tested individually instead of waiting for complete assembly. Unit and regression testing would happen sooner, be more complete, and defects would be identified long before integration or user acceptance testing. Finding bugs earlier means issues are fixed sooner when the code is still fresh on the mind, instead later when people have to learn or regain context - leading to substantially higher remediation costs.


Different dependencies in Software Development and Testing :

Design phase-

  • Requirements / User stories – Affects the schedule. Sprints can be started only after User Stories are available. As soon the draft is available, development and test design kick off.
  • Tool Selection – Affects the schedule. Test cases cannot be designed - especially when integrating with legacy systems. Companies have to have licences available for the tools in order to start designing the automation framework and test cases.

Execution:

  • Environment  - Essential for testing. Organisation’s responsibility, and should get sorted at earlier stages.
  • Integration components - to send the request to or to receive the response from. We have to wait till components are available to start testing

In this article, we’ll focus on Integration Components as a dependency. In future articles, we’ll explore how to deal with other types of missing dependencies.


Why Integration components may not be available:

  • Nothing built yet
  • Legacy systems - only one instance in prod
  • Hosted by some other client
  • All data flows cannot be validated – limited / Secured data
  • Multiple calls are costly
  • Required by different teams at the given time – which modifies the data – so not reliable


Impact when dependencies are not ready / not made available :

  • Testing delay
  • Increased waiting time
  • Defect detection delay (exploratory / edge cases)
  • Minimal or no Exploratory testing
  • The cost to market increases


How about making a copy of the Integration components for each team as per their requirement rather than waiting for teams to finish their work and then to integrate.?

Virtualization comes to rescue here.

Virtualization = creating a copy / virtual image of something.

In our context, this ‘something’ is the Integration components/legacy systems. So, we create the virtual image/copy of Integration components to represent the functions.


How this works :

1. Identify the integration components

2. Capture the Behavior of components. (Request / Response)

3. Create virtual models - Service Virtualization converts these captured conversations and processed protocol request/response pairs into a model that behaves very similarly to the real thing and provides the scenario coverage and capabilities for software development and testing activities.

4. Deploy the Virtual models

5. Execute the Dev / Test activities either Automated or Exploratory way.



Benefits :

  • Virtual models behave the same way as systems behave in real time
  • Can cover complex test scenarios
  • Developers & QA both can use it - at Unit test phase and all other test phases.
  • Can be used for acceptance test to run in the Continuous Integration setup after deploying the build
  • No dependencies on any team for completing work
  • No dependencies on Systems/application to be available
  • Available when required
  • Early testing
  • Cover all ‘In scope’ and edge case scenarios
  • Early defect detection
  • Continuous Delivery
  • Shift Left
  • Less time in execution when actual systems are ready
  • Faster time to market
  • Make money earlier!


Virtualization is just a helping hand!

Myths:

  • Testing with actual systems not required if Virtualization is in place - We should always perform the final testing with Real systems. This is because the real systems with the actual data will be integrated with, and not the virtual models with dummy data in production.
  • Performance is the same as with the actual service - Virtual models are independent. The infrastructure these models are deployed in may not be production-like. The performance of virtual models vs that of the actual system will differ. Conducting non-functional testing with virtual models is acceptable and necessary, but we should always cover the end to end Non-Functional Tests with actual components integrated and in production-like environments to understand the performance we can expect
  • Only connectivity test is required - Connectivity + functional + Non-functional+Exploratory - All testing is required with the actual system as well.

Smelling the coffee and actually drinking the coffee has got a difference. Smelling doesn't fill your stomach. In a similar way, Virtualization alone doesn’t prove your code or integration completely. You have to test with the actual system to prove.

      

When NOT to use Service Virtualization Tools:

  • When you can use Mocking frameworks to test between code within the same system
  • When a stub can be generated via tools like Mountebank - sparing expensive license cost.
  • No dependence on legacy systems - use Mocks and Stubs instead


Stubs, mocks, virtualization - all same? - Read more in my next article!

  

Summary :

Virtualization helps in early identification of the defects, if any, and speeds up test execution. When the actual systems are integrated - as most of the flow is already verified against the virtual models, hence, the chances of failure are less while testing with actual systems. Virtualization helps in speeding up execution and making life simple when actual systems are integrated.

Monali Phopse

Rest API Automation | BDD | Cucumber | IBM | Ex-HSBC, Accenture & Infosys

6 年

This is really good

要查看或添加评论,请登录

Vaishali Desarda的更多文章

  • Should we check static UI elements with Automation Tests?

    Should we check static UI elements with Automation Tests?

    Recently, I came across a scenario where all the Xamarin forms for the app had an update. This resulted in issues like…

    1 条评论
  • Practical issues of implementing Conference-time advice

    Practical issues of implementing Conference-time advice

    It’s 2020, and the pandemic is going on. Everyone (at least from the IT industry) is working from home.

    2 条评论
  • Awareness and Observation in Life and Testing

    Awareness and Observation in Life and Testing

    Some actions/events are so natural that we do not realise if we are in the moment or not! While repeatedly working on…

    2 条评论
  • When the bug is 'non-reproducible'...

    When the bug is 'non-reproducible'...

    Murphy’s Law states - “Anything that can go wrong, will go wrong!” - but do you know how it’s going wrong? What if it…

  • Identify issues faster with logs!

    Identify issues faster with logs!

    You are in the midst of exploring the mobile app when it suddenly crashes. You don’t recollect what sequence of actions…

  • When Devs tell you how to test their code!

    When Devs tell you how to test their code!

    Developers pouring ideas on how to test! Sounds familiar? How does it get perceived? Does such input make you feel -…

    10 条评论
  • Offline Testing of an Online App - What, why and how!?

    Offline Testing of an Online App - What, why and how!?

    Offline testing of an online app!? If an app expects to be online, then, of course, it’ll not work offline! Whatever is…

    1 条评论
  • When should we stop Testing?

    When should we stop Testing?

    After reading this headline, you must be thinking “why does one need to write an article on this! It’s straightforward…

    3 条评论
  • Rethink how you test your API

    Rethink how you test your API

    In the current digital world, with the increased demand for having everything on a click or at one’s fingertips, has…

    2 条评论
  • Tribal Qonf - 27-28 June 2020

    Tribal Qonf - 27-28 June 2020

    A wonderful weekend spent with the first Testing only conference The Test Tribe! All speakers are so brilliant and…

    4 条评论

社区洞察

其他会员也浏览了