SlideShare a Scribd company logo
1 of 15
AN INTRODUCTION
TO API TESTING
DAVID TZEMACH
WWW.MACHTESTED.COM
MAY 12 2017
AGENDA
• WHAT IS API?
• MOTIVATION TO TEST API
• WHAT IS AN API TESTING?
• WHAT TESTS SHOULD BE PERFORMED ON API’S
• WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE?
• WHAT ARE THE CHALLENGES OF API TESTING?
WHAT IS API?
DEFINITION OF API
AN API (APPLICATION PROGRAMMING
INTERFACE) IS A SET OF APPLICATION CODE,
STANDARDS, PROTOCOLS AND PROCEDURES
THAT CAN BE USED AS AN INTERFACE BY
EXTERNAL SOFTWARE APPLICATIONS OR
BETWEEN DIFFERENT LAYERS OF THE SAME
APPLICATION (AKA: “LOGIC TIER” OR
“BUSINESS LAYER”).
WHEN CREATING AN APPLICATION API, WE
WILL DETERMINE HOW OTHER SYSTEMS WILL
INTERACT, COMMUNICATE AND SHARE DATA
WITH OUR SYSTEM IN THE BEST AND EFFICIENT
WAY.
WHAT IS AN API
TESTING?
API TESTING IS…
API testing is a testing approach that is used to validate that APIs and the
integration they should provide actually work as defined at the beginning of the
project.
The main activity of this testing approach is to validate the API response or output
based on varying test conditions, the API output can be a reference to another
API, Different types of data, and Pass/Fail status.
MOTIVATION TO
TEST API
SO WHY SHOULD YOU INVEST TIME IN API TESTING?
THINK ABOUT A SCENARIO THAT YOU RELEASE AN API TO OTHER PROGRAMMERS WITH THE ATTENTION THAT THEY
WILL USE IT AS AN INTERFACE INTERACT WITH THE APPLICATION, ANY DEFECT THAT WILL AFFECT THIS BASIC GOAL, WILL
RESOLVE AN ADDITIONAL DEVELOPMENT AND TESTING ACTIVITIES (SIMILAR TO ANY OTHER BUG FOUND IN CUSTOMER
ENVIRONMENT) THAT WILL AFFECT BOTH THE COSTS AND REPUTATION OF THE COMPANY.
ALTHOUGH API’S ARE USUALLY PUBLISHED FOR FREE AS AN OPEN SOURCE CODE THAT OTHER DEVELOPERS CAN USE
AND EXPAND IT, THERE IS NO WAY THAT THE MARKET WILL ADOPT AND USE IT IF IT’S NOT EFFICIENT, EFFECTIVE AND
OFF COURSE FREE FROM ANY MAJOR DEFECTS.
WHAT TESTS SHOULD
BE PERFORMED ON
API’S
THE BASIC SET OF TESTS THAT WE CAN USE DURING API
TESTING
• TEST THAT THE API DOES NOT HAVE SCENARIOS THAT HE FAILS TO RETURN ANY RESPONSE.
• TEST THAT THE API CAN BE INTEGRATED WITH A CORRESPONDING SYSTEM.
• TEST THAT THE API CAN BE INTEGRATED WITH A CORRESPONDING API’S.
• TEST THE API OUTCOME BASED ON DIFFERENT INPUT CONDITION.
• TEST THE HOW EASY IS TO IMPLEMENT AND USE THE API.
• TEST DIFFERENT PERFORMANCE ASPECTS OF THE API.
• TEST THAT THE API CAN PROCESS A LOT OF INPUTS.
• TEST THAT THE API CAN HANDLE NEGATIVE INPUTS.
• TEST DIFFERENT SECURITY ASPECTS OF THE API.
WHAT ARE THE TYPES OF
DEFECTS THAT API
TESTING WILL HELP
REMOVE?
USING API TESTING WE WILL EXPECT TO REMOVE THESES
TYPE OF DEFECTS:
• ANY SECURITY BREACH IN THE API THAT OTHER
PROGRAMMERS CAN USE TO ATTACK THE SYSTEM.
• PERFORMANCE RELATED DEFECTS.
• SECURITY RELATED DEFECTS.
• ERRORS AND FAILURES THAT ARE NOT HANDLED IN A
GRACEFUL WAY.
• ANY FUNCTIONAL DEFECT RELATED TO THE API
FUNCTIONS.
• UNUSED CODE, DUPLICATE FUNCTIONALITY OR UNUSED
FLAGS.
WHAT ARE THE
CHALLENGES OF
API TESTING?
THERE CAN BE MANY CHALLENGES WHEN TESTING APIS:
• OK, LET’S SAY IT, API TESTING CAN BE COMPLEX TO SOME TESTERS.
• THERE IS NO ACCESS TO THE SOURCE CODE.
• THE TESTING IS LIMITED TO SPECIFIC FUNCTIONS AND THERE IS NO
VIEW OF THE FULL PICTURE.
• NOT LIKE OTHER BLACK-BOX TESTING METHODS, IN API TESTING
THE TESTER MUST HAVE A CODING KNOWLEDGE THAT HE WILL USE
TO EXECUTE TESTS.
• THERE IS A HUGH CHALLENGES TO TEST THE API OUTPUT UNDER
SOME SYSTEMS.
• THERE IS NO USER INTERFACE THAT THE TESTER CAN USE TO
SIMPLIFY THE TESTS.
• THERE IS ANOTHER TESTING LEVEL WHERE THE TESTER NEEDS TO
VERIFY THE EXCEPTION HANDLING CREATED FOR SPECIFIC
METHODS.
FOR ADDITIONAL KB’S PLEASE
VISIT MY BLOG
WWW.MACHTESTED.COM

More Related Content

What's hot

What's hot (20)

An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 
Belajar Postman test runner
Belajar Postman test runnerBelajar Postman test runner
Belajar Postman test runner
 
API Testing
API TestingAPI Testing
API Testing
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
 
API Test Automation
API Test Automation API Test Automation
API Test Automation
 
API TESTING
API TESTINGAPI TESTING
API TESTING
 
API Testing for everyone.pptx
API Testing for everyone.pptxAPI Testing for everyone.pptx
API Testing for everyone.pptx
 
Automate REST API Testing
Automate REST API TestingAutomate REST API Testing
Automate REST API Testing
 
Postman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenarioPostman. From simple API test to end to end scenario
Postman. From simple API test to end to end scenario
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptx
 
Automation With Appium
Automation With AppiumAutomation With Appium
Automation With Appium
 
Criando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssuredCriando uma arquitetura para seus testes de API com RestAssured
Criando uma arquitetura para seus testes de API com RestAssured
 
API Test Automation Tips and Tricks
API Test Automation Tips and TricksAPI Test Automation Tips and Tricks
API Test Automation Tips and Tricks
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-Assured
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
Api Testing
Api TestingApi Testing
Api Testing
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
 
Postman
PostmanPostman
Postman
 
Api testing
Api testingApi testing
Api testing
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
 

Viewers also liked

Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
pkslide28
 

Viewers also liked (12)

Testing Agile Web Services from soapUI
Testing Agile Web Services from soapUITesting Agile Web Services from soapUI
Testing Agile Web Services from soapUI
 
Presentation for soap ui
Presentation for soap uiPresentation for soap ui
Presentation for soap ui
 
Soa testing soap ui (2)
Soa testing   soap ui (2)Soa testing   soap ui (2)
Soa testing soap ui (2)
 
Getting Started with API Security Testing
Getting Started with API Security TestingGetting Started with API Security Testing
Getting Started with API Security Testing
 
Testing soapui
Testing soapuiTesting soapui
Testing soapui
 
SOAP-UI The Web service Testing
SOAP-UI The Web service TestingSOAP-UI The Web service Testing
SOAP-UI The Web service Testing
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Ppt of soap ui
Ppt of soap uiPpt of soap ui
Ppt of soap ui
 
Soap ui
Soap uiSoap ui
Soap ui
 
Learn SoapUI
Learn SoapUILearn SoapUI
Learn SoapUI
 
Testing web services
Testing web servicesTesting web services
Testing web services
 
Web Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI ToolWeb Services Automated Testing via SoapUI Tool
Web Services Automated Testing via SoapUI Tool
 

Similar to An introduction to api testing | David Tzemach

Similar to An introduction to api testing | David Tzemach (20)

Do you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdfDo you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdf
 
Accelerating Software Product Development with API Testing
Accelerating Software Product Development with API TestingAccelerating Software Product Development with API Testing
Accelerating Software Product Development with API Testing
 
How To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdfHow To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdf
 
Api testing and steps to do it
Api testing and steps to do itApi testing and steps to do it
Api testing and steps to do it
 
Webservicex.pdf
Webservicex.pdfWebservicex.pdf
Webservicex.pdf
 
What is API Testing and What Career Opportunities.pdf
What is API Testing and What Career Opportunities.pdfWhat is API Testing and What Career Opportunities.pdf
What is API Testing and What Career Opportunities.pdf
 
What is API Testing_ .pdf
What is API Testing_ .pdfWhat is API Testing_ .pdf
What is API Testing_ .pdf
 
What is API test automation
What is API test automation What is API test automation
What is API test automation
 
What is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptxWhat is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptx
 
Effective practices for API Test Automation
 Effective practices for API Test Automation  Effective practices for API Test Automation
Effective practices for API Test Automation
 
Do’s and don’ts of api testing
Do’s and don’ts of api testingDo’s and don’ts of api testing
Do’s and don’ts of api testing
 
Top 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdfTop 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdf
 
Top api testing tools in 2022
Top api testing tools in 2022Top api testing tools in 2022
Top api testing tools in 2022
 
What is API Testing with Real-life Examples.pdf
What is API Testing with Real-life Examples.pdfWhat is API Testing with Real-life Examples.pdf
What is API Testing with Real-life Examples.pdf
 
Remove Bugs With API Testing Services
Remove Bugs With API Testing ServicesRemove Bugs With API Testing Services
Remove Bugs With API Testing Services
 
API Testing Impact on Development Process.pdf
API Testing Impact on Development Process.pdfAPI Testing Impact on Development Process.pdf
API Testing Impact on Development Process.pdf
 
Can you trust your APIs - White Paper on API Testing
Can you trust your APIs - White Paper on API TestingCan you trust your APIs - White Paper on API Testing
Can you trust your APIs - White Paper on API Testing
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection
 
What is meant by Software Quality Assurance ? What is the role of SQA
What is meant by Software Quality Assurance ? What is the role of SQAWhat is meant by Software Quality Assurance ? What is the role of SQA
What is meant by Software Quality Assurance ? What is the role of SQA
 

More from David Tzemach

More from David Tzemach (20)

Best practices for test automation
Best practices for test automationBest practices for test automation
Best practices for test automation
 
The new manager role in scrum teams and beyond | SupremeAgile
The new manager role in scrum teams and beyond | SupremeAgileThe new manager role in scrum teams and beyond | SupremeAgile
The new manager role in scrum teams and beyond | SupremeAgile
 
Top Agile Myths & Misconceptions
Top Agile Myths & MisconceptionsTop Agile Myths & Misconceptions
Top Agile Myths & Misconceptions
 
Scrum Master (SM) - Practical Approach
Scrum Master (SM) - Practical ApproachScrum Master (SM) - Practical Approach
Scrum Master (SM) - Practical Approach
 
Expectations of scrum masters - How to choose a true great scrum master?
Expectations of scrum masters - How to choose a true great scrum master?Expectations of scrum masters - How to choose a true great scrum master?
Expectations of scrum masters - How to choose a true great scrum master?
 
Top 10 challenges faced by the scrum master
Top 10 challenges faced by the scrum masterTop 10 challenges faced by the scrum master
Top 10 challenges faced by the scrum master
 
SDLC vs STLC
SDLC vs STLCSDLC vs STLC
SDLC vs STLC
 
What is component testing | David Tzemach
What is component testing | David TzemachWhat is component testing | David Tzemach
What is component testing | David Tzemach
 
What is automation testing | David Tzemach
What is automation testing | David TzemachWhat is automation testing | David Tzemach
What is automation testing | David Tzemach
 
The role of the product owner in scrum team | David Tzemach
The role of the product owner in scrum team | David TzemachThe role of the product owner in scrum team | David Tzemach
The role of the product owner in scrum team | David Tzemach
 
The complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David TzemachThe complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David Tzemach
 
The complete guide for negative testing | David Tzemach
The complete guide for negative testing | David TzemachThe complete guide for negative testing | David Tzemach
The complete guide for negative testing | David Tzemach
 
Software testing metrics | David Tzemach
Software testing metrics | David Tzemach Software testing metrics | David Tzemach
Software testing metrics | David Tzemach
 
Agile scrum roles
Agile scrum rolesAgile scrum roles
Agile scrum roles
 
Agile vs. waterfall - The fundamentals differences
Agile vs. waterfall - The fundamentals differencesAgile vs. waterfall - The fundamentals differences
Agile vs. waterfall - The fundamentals differences
 
The evolution of agile development process
The evolution of agile development processThe evolution of agile development process
The evolution of agile development process
 
The basics of UNIT testing
The basics of UNIT testing The basics of UNIT testing
The basics of UNIT testing
 
Agile User Stories | The complete Review
Agile User Stories | The complete ReviewAgile User Stories | The complete Review
Agile User Stories | The complete Review
 
All you need to know about regression testing | David Tzemach
All you need to know about regression testing | David TzemachAll you need to know about regression testing | David Tzemach
All you need to know about regression testing | David Tzemach
 
User Interface Testing | Best Practices
User Interface Testing | Best Practices User Interface Testing | Best Practices
User Interface Testing | Best Practices
 

Recently uploaded

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Recently uploaded (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 

An introduction to api testing | David Tzemach

  • 1. AN INTRODUCTION TO API TESTING DAVID TZEMACH WWW.MACHTESTED.COM MAY 12 2017
  • 2. AGENDA • WHAT IS API? • MOTIVATION TO TEST API • WHAT IS AN API TESTING? • WHAT TESTS SHOULD BE PERFORMED ON API’S • WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE? • WHAT ARE THE CHALLENGES OF API TESTING?
  • 4. DEFINITION OF API AN API (APPLICATION PROGRAMMING INTERFACE) IS A SET OF APPLICATION CODE, STANDARDS, PROTOCOLS AND PROCEDURES THAT CAN BE USED AS AN INTERFACE BY EXTERNAL SOFTWARE APPLICATIONS OR BETWEEN DIFFERENT LAYERS OF THE SAME APPLICATION (AKA: “LOGIC TIER” OR “BUSINESS LAYER”). WHEN CREATING AN APPLICATION API, WE WILL DETERMINE HOW OTHER SYSTEMS WILL INTERACT, COMMUNICATE AND SHARE DATA WITH OUR SYSTEM IN THE BEST AND EFFICIENT WAY.
  • 5. WHAT IS AN API TESTING?
  • 6. API TESTING IS… API testing is a testing approach that is used to validate that APIs and the integration they should provide actually work as defined at the beginning of the project. The main activity of this testing approach is to validate the API response or output based on varying test conditions, the API output can be a reference to another API, Different types of data, and Pass/Fail status.
  • 8. SO WHY SHOULD YOU INVEST TIME IN API TESTING? THINK ABOUT A SCENARIO THAT YOU RELEASE AN API TO OTHER PROGRAMMERS WITH THE ATTENTION THAT THEY WILL USE IT AS AN INTERFACE INTERACT WITH THE APPLICATION, ANY DEFECT THAT WILL AFFECT THIS BASIC GOAL, WILL RESOLVE AN ADDITIONAL DEVELOPMENT AND TESTING ACTIVITIES (SIMILAR TO ANY OTHER BUG FOUND IN CUSTOMER ENVIRONMENT) THAT WILL AFFECT BOTH THE COSTS AND REPUTATION OF THE COMPANY. ALTHOUGH API’S ARE USUALLY PUBLISHED FOR FREE AS AN OPEN SOURCE CODE THAT OTHER DEVELOPERS CAN USE AND EXPAND IT, THERE IS NO WAY THAT THE MARKET WILL ADOPT AND USE IT IF IT’S NOT EFFICIENT, EFFECTIVE AND OFF COURSE FREE FROM ANY MAJOR DEFECTS.
  • 9. WHAT TESTS SHOULD BE PERFORMED ON API’S
  • 10. THE BASIC SET OF TESTS THAT WE CAN USE DURING API TESTING • TEST THAT THE API DOES NOT HAVE SCENARIOS THAT HE FAILS TO RETURN ANY RESPONSE. • TEST THAT THE API CAN BE INTEGRATED WITH A CORRESPONDING SYSTEM. • TEST THAT THE API CAN BE INTEGRATED WITH A CORRESPONDING API’S. • TEST THE API OUTCOME BASED ON DIFFERENT INPUT CONDITION. • TEST THE HOW EASY IS TO IMPLEMENT AND USE THE API. • TEST DIFFERENT PERFORMANCE ASPECTS OF THE API. • TEST THAT THE API CAN PROCESS A LOT OF INPUTS. • TEST THAT THE API CAN HANDLE NEGATIVE INPUTS. • TEST DIFFERENT SECURITY ASPECTS OF THE API.
  • 11. WHAT ARE THE TYPES OF DEFECTS THAT API TESTING WILL HELP REMOVE?
  • 12. USING API TESTING WE WILL EXPECT TO REMOVE THESES TYPE OF DEFECTS: • ANY SECURITY BREACH IN THE API THAT OTHER PROGRAMMERS CAN USE TO ATTACK THE SYSTEM. • PERFORMANCE RELATED DEFECTS. • SECURITY RELATED DEFECTS. • ERRORS AND FAILURES THAT ARE NOT HANDLED IN A GRACEFUL WAY. • ANY FUNCTIONAL DEFECT RELATED TO THE API FUNCTIONS. • UNUSED CODE, DUPLICATE FUNCTIONALITY OR UNUSED FLAGS.
  • 13. WHAT ARE THE CHALLENGES OF API TESTING?
  • 14. THERE CAN BE MANY CHALLENGES WHEN TESTING APIS: • OK, LET’S SAY IT, API TESTING CAN BE COMPLEX TO SOME TESTERS. • THERE IS NO ACCESS TO THE SOURCE CODE. • THE TESTING IS LIMITED TO SPECIFIC FUNCTIONS AND THERE IS NO VIEW OF THE FULL PICTURE. • NOT LIKE OTHER BLACK-BOX TESTING METHODS, IN API TESTING THE TESTER MUST HAVE A CODING KNOWLEDGE THAT HE WILL USE TO EXECUTE TESTS. • THERE IS A HUGH CHALLENGES TO TEST THE API OUTPUT UNDER SOME SYSTEMS. • THERE IS NO USER INTERFACE THAT THE TESTER CAN USE TO SIMPLIFY THE TESTS. • THERE IS ANOTHER TESTING LEVEL WHERE THE TESTER NEEDS TO VERIFY THE EXCEPTION HANDLING CREATED FOR SPECIFIC METHODS.
  • 15. FOR ADDITIONAL KB’S PLEASE VISIT MY BLOG WWW.MACHTESTED.COM