In the best of all worlds, API development, testing, and operations teams always work together in perfect synchrony, delivering high-quality APIs on schedule, under budget and completely error-free. But as applications and micro-service architectures increase in complexity, teams often struggle to maintain velocity without tripping over functional dependencies and unwanted behaviours within their solutions. API Virtualization is an increasingly popular approach for speeding release cycles by developing and testing in parallel. Additionally, API virtualization enables teams to overcome 3rd party downtime, rate limits and overage fees.
Join Ole Lensmar, SmartBear CTO and creator of SoapUI, to learn how API Virtualization can help you speed up your development, testing and delivery process.
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
The Magic Behind Faster API Development, Testing and Delivery with API Virtualization
1. THE MAGIC BEHIND FASTER API
DEVELOPMENT,TESTING AND DELIVERY
WITH API VIRTUALIZATION
Presented by: SmartBear CTO, OAI Chairman, Ole Lensmar
@olensmar | @SmartBear
3. Page
@SmartBear
Stubbing / Static Mocking
• Static responses
• Semantically correct
• No logic
• Payloads generated from schemas or examples
• Code or generated from metadata
• Usage: Client and Test development
4. Page
@SmartBear
Dynamic Mocking (Simulation)
• Dynamic responses
• Based on input
• Re-use input in output
• Scripting
• Data-driven / Data-generation
• Simulate state
• Usage: Scenario Testing, Development
8. Page
@SmartBear
Component Isolation during Dev and Test
Component in
dev or test
Test Execution
(automated or manual)
3rd party APIs
(virtualized)
Other APIs
(virtualized)
Legacy Systems
(virtualized)
Development
• Simulate (un)expected behavior
• Minimize impact on and usage of external systems
• Assert usage of external components
9. Page
@SmartBear
Provide Sandbox for API consumers
Hardware / Software
Solution
API Virtual API
Evaluate
Integrate
Integration Test
• Provide simulations of different usage scenarios
• Minimize usage / exposure of real system
• Understand how customers interact with API
10. Page
@SmartBear
Performance Testing with API dependencies
Solution
under test
Load Test Execution
(automated or manual)
3rd party APIs
(virtualized)
Other APIs
(virtualized)
Legacy Systems
(virtualized)
• Simulate (un)expected performance in external systems
• Minimize impact on and usage of external systems
• Triage Performance bottlenecks
14. Page
@SmartBear
Create from API definition / contract
• Swagger/OAS, RAML, API Blueprint, WSDL, WADL, etc.
• Integrated schemas or examples for payload generation
• Static Mocking often integrated in design tools
• Dedicated tooling common
15. Page
@SmartBear
Create from captured API usage
• Convert intercepted API responses into virtual APIs
• Log-files – limited payload data
• Captured traffic often needs to be “refined”
• Removal / change of headers
• Removal of sensitive data
• Added logic for propagation of values
• Record non-functional aspects
• Response times, latency, etc.
• Record SSL using MITM with dedicated certificate
16. Page
@SmartBear
Refine with dedicated tooling
• Add complex logic for request dispatching
• Add data-driven payloads
• Simulate non-functional behavior
• Add assertions for validating requests
• Pass-through to actual APIs as appropriate
18. Page
@SmartBear
Virtualising Async APIs
• Domains
• Web: Webhooks, AsyncSOAP, Websockets
• Legacy: JMS, MQSeries, etc
• IoT protocols: MQTT, AMQP, XMPP, etc
• Virtualization Needs
• Simulate both sender and receiver of events
• Coordinate decoupled message flows / transactions
• Simulate both functional and non-functional behaviour
• Challenging to coordinate orchestrated components
19. Page
@SmartBear
APIVirtualization – do you need it?
• Local development and basic component testing –> Probably not
• For providing Sandbox environments -> Probably
• Collaborative evolution and testing of APIs with low number of dependencies -> Maybe
• The same – but with high number of complex dependencies -> Probably
• For simulating both functional and non-functional behavior in complex distributed API-based
solutions / architectures -> Definitely