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

"API testing with Runscope" from Alyona Kiryushina

"API testing with Runscope" from Alyona Kiryushina

Summary of slides:
1. Client-server architecture for mobile apps.
2. What is API testing? It`s purpose
3. Best Practices for API testing
4. Tools for API testing (some common info aboutSoap UI, Postman, Runscope )
5. Runscope in examples

uaMobiTech

July 28, 2016
Tweet

More Decks by uaMobiTech

Other Decks in Programming

Transcript

  1. About me QA Engineer at Yalantis 3 years in testing.

    Abilities: destruction aura.( +5 to ability to break things). *That works with apps . **Yes, I can break your app ***Can be neutralized only with skilled dev`s aura ****When you see that facial expression - better run
  2. Agenda Ὂ Introduction to mobile apps architecture Ὂ What is

    API testing? Why is it important? Ὂ Types of API testing Ὂ Tools for API testing Ὂ What is Runscope ? Ὂ Conclusions
  3. Client-server 3 tier architecture In case of such architecture any

    layer can be replaced with a desirable testing tool.
  4. GUI testing focuses on testing an application user interface to

    ensure that its functionality is correct
  5. “ API - Application Programming Interface. Ὂ Concerned on business

    logic Ὂ Specifies how software components should interact Ὂ often come in the form of a library that includes specifications for routines, data structures, object classes, and variables.
  6. “ Advantages of API testing Ὂ It takes much less

    time than GUI testing Ὂ Testing process starts much earlier (that helps to find severe issues earlier) Ὂ Language-independency (because all data transfer into xml or json) Ὂ Helps to create testing data for further GUI testing Ὂ Stable API means stable ui autotesting
  7. Best practices of API testing Strategize Take the time to

    determine precisely what is being tested and how these tests should be conducted Organize Excellent organization will save time, increase productivity, and influence the maintenance of the tests Prioritize Avoid testing cases that are likely to cause crashing for instance. Although tackling these first is fairly typical, it isn’t the best way to prioritize testing efforts. Development source code should be based on the given style guideline. If one isn’t yet developed, work to create this guideline immediately. Configure Keep all various test information, such as stress tests and BVTs, in the same source file. Then, a configuration setting should be utilized to pinpoint desired tests. Validate Presume at the beginning of each test that it doesn’t make the grade. Utilize testing to prove this assumption accurate or not. ✔
  8. API Functional testing Syntax testing performed to check whether the

    method or operation accepts correct input and rejects incorrect input.. Testing of methods and operations check whether the method or operations performs its intended action correctly. Test scenarios when individual methods or operations have been tested successfully, method calls can be strung together to emulate business processes
  9. Syntax test cases Ὂ Leaving mandatory fields empty results in

    an error Ὂ Optional fields are accepted as expected Ὂ Filling fields with incorrect data types (for example, putting a text value into an integer field) results in an error
  10. Testing of methods and operations Ὂ Is calculation X performed

    correctly when calling operation / method Y with parameters A, B and C? Ὂ Does calling a getter method retrieve the correct information? Ὂ Is data stored correctly for future use when calling a setter method?
  11. “ API virtualization Ὂ The component itself is not yet

    developed Ὂ The component features depends on some functionality that is not ready yet Ὂ The component is shared with other teams and therefore cannot be freely used
  12. Security testing Check if API is accessible to those who

    are allowed to use it and inaccessible to those without the correct permissions Non-functional API testing Performance testing Check if the response times are acceptable, even under a high load?
  13. “ Introduction to Runscope Runscope provides a Web UI for

    creating tests. Ὂ Easy to start: there is no code to write for standard assertions Ὂ You can write more complex assertions using Javascript. Ὂ Has opportunity to use local agent for testing API`s beyond firewalls Ὂ Test steps can be linked together with variables allowing you to use it as a parameter for the next request.
  14. What does it offer to you? Easy start You can

    use default assertions to perform smoke testing of your API Scheduling Make an individual schedule for each of your tests- from every minute to once a day Integration Can be integrated with hugh amount of different services Team work Invite your team and work on creating new scenarios together Comparison Compare your JSON request with response results to understand what exactly went wrong Documentation You can find answers to almost all of your questions usimg runscope guidelines and FAQ ☑
  15. Now it is time for CI Trigger URLs allows to

    initiate one or more tests by making simple HTTP requests
  16. Alerts in Runscope Ὂ Detect when Response Times are greater

    than 1s Ὂ Find 4xx and 5xx Status Codes in your API traffic Ὂ See which requests aren't able to connect, and discover the problematic endpoints Ὂ Or Monitor your live API traffic with OWN rules on Request and Response data Set up Notifications for every 1st, 10th, 100th, and 1,000th Alert match. You can:
  17. “ Bugs that were found during API testing Ὂ Fails

    to handle error conditions gracefully Ὂ Incorrect handling of valid argument values Ὂ Not implemented errors Ὂ Bugs in data models Ὂ Missing or duplicate functionality Ὂ Inconsistent error handling