Top Banner
THE MAGIC BEHIND FASTER API DEVELOPMENT, TESTING AND DELIVERY WITH API VIRTUALIZATION Presented by: SmartBear CTO, OAI Chairman, Ole Lensmar @olensmar | @SmartBear
20

The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Jan 23, 2018

Download

Technology

Nordic APIs
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

THE MAGIC BEHIND FASTER API DEVELOPMENT, TESTING AND DELIVERY WITH API VIRTUALIZATION

Presentedby:SmartBearCTO,OAIChairman,OleLensmar

@olensmar |@SmartBear

Page 2: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

The path to API Virtualization starts with…

Page 3: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Stubbing / Static Mocking

• Staticresponses• Semanticallycorrect• Nologic• Payloadsgeneratedfromschemasorexamples

• Codeorgeneratedfrommetadata

• Usage:ClientandTestdevelopment

Page 4: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Dynamic Mocking (Simulation)

• Dynamicresponses• Basedoninput• Re-useinputinoutput• Scripting

• Data-driven/Data-generation

• Simulatestate

• Usage:ScenarioTesting,Development

Page 5: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

API Virtualization

• Runtimebehaviorsimulation

• Runtimemanagement• RedirecttraffictoVirtualAPIsdynamically• Accesscontrol• Deployment

• Testexecutionintegration• Assertionsonincomingcontent

• Usage:Integration/ScenarioTesting,LoadTesting,Development

Page 6: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

A couple of use cases…

Page 7: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Bootstrap Development

Virtualized APIGeneratefrom

specorwithtools

Client Development

Test Design

Integration Development

• ShortcuttheAPIdevelopmentcycle/process• Bridgedependenciesbetweenroles/teams• EnableearlyfeedbackonAPIdesign/implementation

Development

Page 8: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Component Isolation during Dev and Test

Component in dev or test

TestExecution(automatedormanual)

3rd party APIs(virtualized)

Other APIs(virtualized)

Legacy Systems(virtualized)

Development

• Simulate(un)expectedbehavior• Minimizeimpactonandusageofexternalsystems• Assertusageofexternalcomponents

Page 9: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Provide Sandbox for API consumers

Hardware / Software Solution

API Virtual API

Evaluate

Integrate

Integration Test

• Providesimulationsofdifferentusagescenarios• Minimizeusage/exposureofrealsystem• UnderstandhowcustomersinteractwithAPI

Page 10: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Performance Testing with API dependencies

Solution under test

LoadTestExecution(automatedormanual)

3rd party APIs(virtualized)

Other APIs(virtualized)

Legacy Systems(virtualized)

• Simulate(un)expectedperformanceinexternalsystems• Minimizeimpactonandusageofexternalsystems• TriagePerformancebottlenecks

Page 11: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Internal

Corp

Web app

Corp

App + API

API

API

API

Device

API

DeviceIoT

Device

IoTDevice

API

API

API

Component Evolution in complex architectures• Enableindependentevolutionofservicesbysimulating

externaldependenciesasservicesmovethroughlifecycle

Page 12: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

Virtualization across the API Lifecycle

Design Build Test Deploy Manage

Staticmocking

Dynamicmocking

APIVirtualization

@SmartBear

Page 13: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

How create virtualized APIs?

Page 14: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Create from API definition / contract

• Swagger/OAS,RAML,APIBlueprint,WSDL,WADL,etc.

• Integratedschemasorexamplesforpayloadgeneration

• StaticMockingoftenintegratedindesigntools

• Dedicatedtoolingcommon

Page 15: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Create from captured API usage

• ConvertinterceptedAPIresponsesintovirtualAPIs• Log-files– limitedpayloaddata

• Capturedtrafficoftenneedstobe“refined”• Removal/changeofheaders• Removalofsensitivedata• Addedlogicforpropagationofvalues

• Recordnon-functionalaspects• Responsetimes,latency,etc.

• RecordSSLusingMITMwithdedicatedcertificate

Page 16: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Refine with dedicated tooling

• Addcomplexlogicforrequestdispatching

• Adddata-drivenpayloads

• Simulatenon-functionalbehavior

• Addassertionsforvalidatingrequests

• Pass-throughtoactualAPIsasappropriate

Page 17: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Considerations

• HowwillvirtualAPIsbeusedandmanaged• Local/Team/Enterprise

• Technicalproficiencyofmaintainers• Scripting/codingrequirements

• CI-Integration• HowredirectAPIcallstovirtualizedAPIs

• Accesscontrol(internal/external)

• ReportingandGovernance

Page 18: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

Virtualising Async APIs

• Domains• Web:Webhooks,Async SOAP,Websockets• Legacy:JMS,MQSeries,etc• IoT protocols:MQTT,AMQP,XMPP,etc

• VirtualizationNeeds• Simulatebothsenderandreceiverofevents• Coordinatedecoupledmessageflows/transactions• Simulatebothfunctionalandnon-functionalbehaviour

• Challengingtocoordinateorchestratedcomponents

Page 19: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Page

@SmartBear

API Virtualization – do you need it?

• Localdevelopmentandbasiccomponenttesting–>Probablynot

• ForprovidingSandboxenvironments->Probably

• CollaborativeevolutionandtestingofAPIswithlownumberofdependencies->Maybe

• Thesame– butwithhighnumberofcomplexdependencies->Probably

• Forsimulatingbothfunctionalandnon-functionalbehaviorincomplexdistributedAPI-basedsolutions/architectures->Definitely

Page 20: The Magic Behind Faster API Development, Testing and Delivery with API Virtualization

Thank you!

@olensmar @SmartBear