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

Moving from UI to API testing

Moving from UI to API testing

Even after spending countless hours in testing GUI and backend, numerous bugs are encountered in production. Ever wondered why? Due to the crunch of resources and time, API testing is generally skipped and that’s where a lot of bugs resides.

API testing can be challenging, especially when you don't have insights about what actually APIs are. This presentation explains to you what APIs are like you're just five. It brings forward need for API testing and also provides "heuristic" that would help focus on important things for API testing.

Avatar for Shivani Gaba

Shivani Gaba

June 27, 2019
Tweet

More Decks by Shivani Gaba

Other Decks in Technology

Transcript

  1. Perspective change POSTMAN vOpen-source vEasy to install/setup vConfigure and run

    tests vTest on-fly vOffers UI-like feeling @shivani_gaba_
  2. Next REQUEST RESPONSE * 2 3 Personal Information Contact data

    Financial data API (Postman) User Interface
  3. BODY METHOD REQUEST/ RESPONSE HEADERS CODE EXECUTION TIME AUTH- 0RISATION

    EMBRACE ENDPOINT ENDPOINT METHOD BODY REQUEST/ RESPONSE HEADERS AUTH- 0RISATION CODE EXECUTION TIME @shivani_gaba_
  4. Type Usage URI Examples POST Create/update new resource xing.com/rest/user PATCH

    Update existing resource xing.com/rest/user/{user_id} GET Read/retrieve resource xing.com/rest/user/{user_id} DELETE Removal of resource xing.com/rest/user/{user_id} UPDATE CREATE RESTful API common methods @shivani_gaba_
  5. Request Body Cheat-sheet 2. Invalid/boundary values { “email” : “demo@”

    , “phone” : “3233” } 4. Missing mandatory keys { “email” : [email protected] } 5. Client prohibited values { “email”: “[email protected]%” , “phone“ : “abc%” } 3. Empty mandatory field { “email” : “[email protected]” , “phone” : “” } 6. Malformed body format { “email” : “[email protected]” “phone“ : “912454332” } } 7. Invalid format <user> <email>[email protected]</email> <phone>912234356</phone> </user> 8. SQL injection { “email” : “ 'anything' OR 'x‘=‚x‘ " , “phone“ : “myPassword“ } 1. Valid data { “email” : “[email protected]” , “phone” : “912345678” }
  6. Recommendations • Exploratory testing on API – By James Bach

    https://www.developsense.com/blog/2018/07/exploratory-testing-on-an-api-part-1/ • 30 Day of API Testing Challenge - MOT https://club.ministryoftesting.com/t/30-days-of-api-testing-day-6-interesting-blog-post-on-api-testing/19595 • No REST for women – By Anne-Marie Charrett https://mavericktester.com/2018/11/05/rest-apis-written-by-women/ • API, Web Services & Microservices Testing Pathway –Katrina Clookie http://katrinatester.blogspot.com/2015/09/api-web-services-microservices-testing.html @shivani_gaba_