Careful - APIs Inside: Testing and Monitoring for App Development
-
Upload
3scale -
Category
Technology
-
view
2.424 -
download
0
description
Transcript of Careful - APIs Inside: Testing and Monitoring for App Development
![Page 1: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/1.jpg)
Careful - APIs InsideTesting and Monitoring for API Driven Apps Steven Willmott 3scale Inc. @njyx, @3scale
![Page 2: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/2.jpg)
Behind (Almost) Every App is a Great API
![Page 3: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/3.jpg)
3scale is…API
Infrastructure Provider
!Power 350+
APIs !
110,000 Developers writing Apps
!
API Tech Operations API Business Operations Developer Support
(Selection)
3scale.net
![Page 4: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/4.jpg)
Apps Depend on API Backends
Your App
Proxy
Your Backend
Indirect
Direct
![Page 5: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/5.jpg)
Creates Problems
Development Time
Run Time
Bad Docs
High Latency
APIs Can Waste Time APIs Can Kill Your App
Weird HTTP Errors
OAuth Old Versions
Rate Limit Problems Poor SDKs
Random Failures
Version Changes
Rate Limit Failures
![Page 6: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/6.jpg)
• HTTP is Easy until it’s not (Caching, Verbs, Headers, Hashes, Media Types)
• Use HTTP Sniffers (HTTPScoop, Fiddler) + network sniffers (e.g. Wireshark)
• Check & use caching headers • CORS, Cross Site Problems
!
Development Time Tools
http://www.slideshare.net/synedra/demystifying-restruby
• oAuth Libraries & Documentation • beware oAuth “variants” • Try: • oAuthbible.com • oauth.io
• Other Authentication: • Try to use provided SDKs • Unit Test heavily for custom
integrations
HTTP Problems Auth Problems
HTTPScoop
![Page 7: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/7.jpg)
Development Time Tools
• Bad Documentation: look for interactive docs (swagger active docs, iodocs, apiary)
• Unspecified Rate Limits (when do they kick in?)
• Old Versions • Different Production and Test
Environments • Unit test mocks
!
!!!
“I was doing the following with you API, I was expecting this … to happen, to my dismay,
this other thing happened instead …”(*)
Provider Problems Pro Tip How to ask An API Provider a question
(* - credit Kirsten Hunter)
![Page 8: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/8.jpg)
Active Docs
http://developer.flightstats.com (via 3scale)
![Page 9: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/9.jpg)
Operations Time Tools
• Pingdom et. al. Provide standard HTTP alerts,
• Webmetrics: step by step test execution primarily for SOAP APIs
• Nagios, Monit, Munin, SENSU etc. in your own infrastructure
• Splunk et. al. for log analysis. !
!
!!!
• Runscope • Smartbear • 3scale APITools
!• New tools: proxy transform, step by
step unit testing, authentication tests, API specific analytics
!!
!
The Old The New How to ask An API Provider a question
http://www.soapui.org/Dojo/overview.html
![Page 10: Careful - APIs Inside: Testing and Monitoring for App Development](https://reader033.fdocuments.in/reader033/viewer/2022052618/554bb0feb4c905b8618b59f2/html5/thumbnails/10.jpg)
Where is the Fun & Profit?
API Testing is getting easier
APIs are more stable over time
Mocks & Proxies Help a Lot
Happy Users are More Fun & Generate More Profit!