Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

API Test Automation

Доклад Joel Oliveira на SQA Days-22. 17-18 ноября 2017. Санкт-Петербург, Россия
www.sqadays.com

  • Login to see the comments

API Test Automation

  1. 1. API Test Automation by Joel Oliveira 17-18 November 2017 St. Petersburg
  2. 2. API?… 2
  3. 3. API? Application Programming Interface
  4. 4. API History 1960s APIs used as libraries in the first operating systems 1970s Distributed Systems - remote access to APIs 1990s Message Oriented Middleware Service Oriented Architecture SOAP – Simple Object Access Protocol 2000s REST – Representational state transfer or RESTful 2010s MicroServices 4
  5. 5. API Testing “A set of subroutine definitions, protocols, and tools for building application software. In general terms, it is a set of clearly defined methods of communication between various software components.” 5 ISTQB Glossary http://glossary.istqb.org/search/API%20Testing
  6. 6. API Testing “Testing performed by submitting commands to the software under test using programming interfaces of the application directly.” 6 ISTQB Glossary http://glossary.istqb.org/search/API%20Testing
  7. 7. API Testing … today! “The majority of testers are responsible for both API and UI Testing” 7 The State of Testing 2017 - SmartBear https://smartbear.com/resources/ebooks/the-state-of-testing-2017-industry-report/
  8. 8. API Testing … tomorrow?  Agility  DevOps practices  Continuous Delivery > Continuous Deployment  Continuous Automated Testing  Test Automation and Shift left  Microservices Architecture migrations  Internet Of Things Exponential growth of available APIs! 8
  9. 9. API Testing … top concerns? 1. Functionality Is my API returning the correct response every time 2. Performance How the API responds under different load conditions 3. Security Is it safe from hackers and attacks 4. Availability Is always available to the users 9 The State of Testing 2017 - SmartBear https://smartbear.com/resources/ebooks/the-state-of-testing-2017-industry-report/
  10. 10. RESTful Web Services 10
  11. 11. RESTful Web Services Application Program Interface (API) Uses HTTP requests (POST, GET, PUT and DELETE) Based on representational state transfer technology No state is retained between calls (call are stateless) Lighter than the more robust SOAP JSON vs XML 11
  12. 12. RESTful Web Services - Constraints 1. Decouples consumers from producers 2. Stateless existence 3. Able to leverage a cache 4. Leverages a layered system 5. Leverages a uniform interface 12
  13. 13. RESTful Web Services - IoT JSON great for data interchange:  Schemaless (valid if is well-formed)  Minimal set of data types  Human-readable  Easily parseable  Parsers are widely available in different languages … but… 13
  14. 14. RESTful Web Services - IoT IoT devices typically need to optimize:  Network traffic (small and fast)  Amount of computation  Memory, storage and power consumption REST vs optimized IoT protocols… Solution? IoT hubs that act as man-in-the-middle 14
  15. 15. API Test Automation Tools 15
  16. 16. Some tools? Postman SoapUI Robot Framework
  17. 17. Disclaimer 17
  18. 18. A tool is just a tool! 18
  19. 19. Don’t use your hammer for everything! 19
  20. 20. Postman Developing APIs is hard Postman makes it easy Postman is the most complete API Development Environment https://www.getpostman.com 20
  21. 21. Postman https://www.getpostman.com/postman https://www.getpostman.com/pricing Header, Sidebar, Builder History & Collections (groups of requests) Runner, Newman or Monitors Environments Tests 21
  22. 22. SoapUI Build Better | Test Smarter The Most Advanced REST & SOAP Testing Tool in the World https://www.soapui.org 22
  23. 23. SoapUI https://www.soapui.org/open-source/features.html https://www.soapui.org/store.html Requests vs TestsCases SoapUI vs SoapUI PRO 23
  24. 24. Robot Framework Generic test automation framework for acceptance testing and ATDD http://robotframework.org 24
  25. 25. Robot Framework http://robotframework.org/#introduction https://github.com/joao-carloto/RF_Install_Script Framework vs Tool Keyword Driven Data Driven Requests library 25
  26. 26. https://www.linkedin.com/in/joeloliveira/ http://joel-oliveira.appspot.com/ oliveira.joel@outlook.com skype:o_joel @Joel_0liveira Thank You! Obrigado! Cпасибо! Questions?

×