Upgrade to Pro — share decks privately, control downloads, hide ads and more …

API Readiness: Visualizing and Virtualizing

API Readiness: Visualizing and Virtualizing

More Decks by API Strategy & Practice Conference

Other Decks in Technology

Transcript

  1. API  Readiness:   Visualizing  and   Virtualizing LO R I

    N DA   B R A N D O N @ L I N DY B R A N D O N S M A RT B EA R   S O F T WA R E
  2. Keys  to  a   successful   API     documenta+on  

        tes+ng       mocking       evangelism       management       monitoring  
  3. Visualizing :     New  ideas Coloring  outside  the  lines

      New  Ideas “The  best  design  gets   out  of  the  way   between  the  viewer’s   brain  and  the   content.”     –  Edward  TuBe  
  4. Bootstrap Parallel  dev  and  test   Test Design Virtual API

    Generate from spec or with tools Client Development Integration Development
  5. Isolate Test  execu+on  and   development   Test Execution (automated

    or manual) Development Component in dev or test 3rd party APIs (virtualized) Other APIs (virtualized) Legacy Systems (virtualized) •  Simulate (un)expected behavior •  Minimize impact on and usage of external systems •  Assert usage of external components
  6. Performance Test 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
  7. Enable API evolution… Corp Corp Web app Corp App +

    API API API API Device APP API Device IoT Device IoT Device API API API
  8. Three  Levels   of  API   VirtualizaIon Sta+c  Mocks  

    Static responses •  Semantically correct •  No logic •  Payloads generated from schemas or examples Code or generated from metadata   Dynamic  Mocks   Dynamic responses •  Based on input •  Re-use input in output •  Scripting •  Data-driven / Data-generation •  Simulate state Assertions on incoming content   Virtual  APIs   Runtime behavior simulation Runtime management •  Redirect traffic to Virtual APIs dynamically •  Access control •  Deployment •  Test execution integration      
  9. API   VirtualizaIon   -­‐  do  you  need   it?

    • Local  development  &  basic  component   tes+ng   • Requirement  for  sandbox  environment(s)   • Collabora+ve  evolu+on  &  tes+ng  of  APIs   with  low  number  of  controlled  dependencies   Maybe   • Collabora+ve  evolu+on  &  tes+ng  of  APIs   with  high  number  of  complex  dependencies   Probably   • Need  for  simula+ng  func+onal  &  non-­‐ func+onal  behavior  in  complex  distributed   solu+ons   Definitely  
  10. 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
  11. A selection of tools   Script / code based ◦  WireMock,

    JustMock, MockServer, etc.   SaaS based ◦  Mocky.io, mockable.io, Runscope ◦  Part of design tools; Apiary, API Designer (Mulesoft)   Desktop / Standalone ◦  Free: SoapUI (does REST too!), WireMock ◦  Commercial: Ready! API, Soatest, ITKO-Lisa
  12. Virtualising Async APIs   Domains ◦  Web: Webhooks, Async SOAP, 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
  13. Considerations   How will virtual APIs be used and managed ◦ 

    Local / Team / Enterprise   Technical proficiency of maintainees ◦  Scripting / coding requirements ◦  Easy to create new configurations   CI-Integration ◦  How redirect API calls to virtualized APIs   Access control (internal / external)   Reporting and Governance
  14. MONITO RING Virtual  APIs   Mock  Services   Produc+on  

    APIs   Keep  produc+on   stable     Prevent   boXlenecks   Test   Dev   Test   Dev   Test   Ongoing  development   API   Monitoring