Name the essential parts of an application
What is the data layer?
Where data is retrieved from the database and file system and then stored.
What is the logic layer
The brain of the application, this processes the data between the layers, coordinating the application, processing commands, and making logical decisions. This layer is made of the API.
What is the presentation layer?
This top layer of the app is the user interface, which translates tasks into something the user understands.
What is an API?
Application Programming Interface:
- An API acts as an interface between two different applications so that they can communicate with each other.
What is API testing?
testing that APIs and the integrations they enable work in the most optimal manner
Techincal def of an API
Http based service that returns JSON or XML data by default
How to test APIs?
make API calls in order to receive an output before observing and logging the system’s response.
How to increase test coverage and accuracy of APIs?
Since APIs are the central hub of data for many applications, data-drive testing for APIs can help
Why is API testing important?
The API is what gives value to the application.
Define a smoke test for an API
make a call and verify you receive a response
What is the typical output of an API?
Questions to ask yourself when testing an API
What is load testing of an API?
verify the API can handle a large amount of calls
What is Creativity Test of an API?
the API can be used in different ways (Called by other APIs)
What is Security Testing of an API?
verifying security requirements including authentication, permissions and access controls
What is API documentation testing?
also called discovery testing, the API documentation easily guides the user.
What are some test case examples for an API?
What types of testing of an API can be automated?
Best Practices for testing an API?
What is an API request?
A request to a resource on the server which is exposed via an API
Give an example of an API request
I need to get list of all the users from a database and assume there is an API written in any language that pulls the required data, transforms it into either xml or JSON and returns it back. say :
http://host:port/api/users : here api/users is the endpoint which is deployed in a server and invokes the program to get the data and creates a response in JSON/XML format, once response is ready it can be sent back to caller.
When I call this API from a browser using it’s qualified URL (another term for the exact url) it would be called an API request, and as a result I would get a list of users as either JSON or XML format which can then be used as required, there are other formats as well but they are out of scope for this question.
What is the URI in the request:
http://domain.com/path/to/resource
everything after http://domain.com
What are the HTTP methods for RESTful Services?