Changing an API can break an application. For this reason, every API should have acceptance tests, which help prevent breaking apps. In this video, we will use Postman to write acceptance tests for our API.
- [Instructor] In the previous video,…we learned how to build our SAPI for accessing notes.…In this video, we will learn about acceptance tests,…which help us reduce breaking changes in an API.…We are going to take a look at Acceptance Tests,…what they are, and why they are important.…We will install Postman and Interceptor.…Postman is a very popular tool…for testing HTTP-based APIs.…Interceptor is an extension to Postman…that allows Postman to send cookies and API requests.…We will create the requests needed to test our API,…and finally we will write the test cases.…
What is Acceptance testing?…Acceptance testing, which is sometimes…called functional testing,…is a test conducted to determine…if the requirements of a specification are met.…In our API, the specifications are the resource paths,…the headers sent and received,…the data sent and received and its format,…the status codes returned,…and the outcome or effect of hitting a resource.…If all the acceptance tests pass…after updating an API, then we can be confident…
This Node.js training course gives you an overview of a RESTful API and the logical steps of building one. It explores three different APIs, focusing on their similarities and differences to effectively implement one. Author Saleh Hamadeh starts off by defining APIs, showing how they can be built on top of HTTP and listing the properties that make an API RESTful. Then learn how to develop Twitter Notes, a sample web application that lets its users leave notes for their Twitter friends. You'll use Twitter's API to implement a login flow and then design a web API. In addition, you'll get a closer look at two other real-world APIs—Facebook API and GitHub API. Finally, learn some best practices to keep APIs secure, maintainable, and efficient.
- Identifying REST resources
- Setting up the development environment
- Consuming a RESTful API
- Creating an OAuth login request
- Getting an access token
- Saving data in MongoDB
- Building a RESTful API
- Looking at APIs in the real world
- Best practices for building RESTful APIs