the magic behind faster api development, testing and delivery with api virtualization

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

Upload: nordic-apis

Post on 23-Jan-2018

297 views

Category:

Technology


1 download

TRANSCRIPT

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

Presentedby:SmartBearCTO,OAIChairman,OleLensmar

@olensmar |@SmartBear

Page

@SmartBear

The path to API Virtualization starts with…

Page

@SmartBear

Stubbing / Static Mocking

• Staticresponses• Semanticallycorrect• Nologic• Payloadsgeneratedfromschemasorexamples

• Codeorgeneratedfrommetadata

• Usage:ClientandTestdevelopment

Page

@SmartBear

Dynamic Mocking (Simulation)

• Dynamicresponses• Basedoninput• Re-useinputinoutput• Scripting

• Data-driven/Data-generation

• Simulatestate

• Usage:ScenarioTesting,Development

Page

@SmartBear

API Virtualization

• Runtimebehaviorsimulation

• Runtimemanagement• RedirecttraffictoVirtualAPIsdynamically• Accesscontrol• Deployment

• Testexecutionintegration• Assertionsonincomingcontent

• Usage:Integration/ScenarioTesting,LoadTesting,Development

Page

@SmartBear

A couple of use cases…

Page

@SmartBear

Bootstrap Development

Virtualized APIGeneratefrom

specorwithtools

Client Development

Test Design

Integration Development

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

Development

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

@SmartBear

Provide Sandbox for API consumers

Hardware / Software Solution

API Virtual API

Evaluate

Integrate

Integration Test

• Providesimulationsofdifferentusagescenarios• Minimizeusage/exposureofrealsystem• UnderstandhowcustomersinteractwithAPI

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

@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

Virtualization across the API Lifecycle

Design Build Test Deploy Manage

Staticmocking

Dynamicmocking

APIVirtualization

@SmartBear

Page

@SmartBear

How create virtualized APIs?

Page

@SmartBear

Create from API definition / contract

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

• Integratedschemasorexamplesforpayloadgeneration

• StaticMockingoftenintegratedindesigntools

• Dedicatedtoolingcommon

Page

@SmartBear

Create from captured API usage

• ConvertinterceptedAPIresponsesintovirtualAPIs• Log-files– limitedpayloaddata

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

• Recordnon-functionalaspects• Responsetimes,latency,etc.

• RecordSSLusingMITMwithdedicatedcertificate

Page

@SmartBear

Refine with dedicated tooling

• Addcomplexlogicforrequestdispatching

• Adddata-drivenpayloads

• Simulatenon-functionalbehavior

• Addassertionsforvalidatingrequests

• Pass-throughtoactualAPIsasappropriate

Page

@SmartBear

Considerations

• HowwillvirtualAPIsbeusedandmanaged• Local/Team/Enterprise

• Technicalproficiencyofmaintainers• Scripting/codingrequirements

• CI-Integration• HowredirectAPIcallstovirtualizedAPIs

• Accesscontrol(internal/external)

• ReportingandGovernance

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

@SmartBear

API Virtualization – do you need it?

• Localdevelopmentandbasiccomponenttesting–>Probablynot

• ForprovidingSandboxenvironments->Probably

• CollaborativeevolutionandtestingofAPIswithlownumberofdependencies->Maybe

• Thesame– butwithhighnumberofcomplexdependencies->Probably

• Forsimulatingbothfunctionalandnon-functionalbehaviorincomplexdistributedAPI-basedsolutions/architectures->Definitely

Thank you!

@olensmar @SmartBear