Question: REST APIs are ubiquitous, and Python is the go - to tool for testing REST APIs. The goal of this capstone is to mimic a
REST APIs are ubiquitous, and Python is the goto tool for testing REST APIs. The goal of this capstone is to mimic a realworld scenario of API testing. You must write several unit tests that validate an example websites endpoints. Unit tests are a testing method in which individual units of code are tested to determine if that unit is fit for use and working as expected. To guarantee stability over time, several JSON files will be accessible to represent the website under test. You will combine the skills learned in the course with some new skills. The application will use the requests package and pytest for basic unit testing.
Implement the class AccessApi that will access a REST API using the requests package and perform basic functionality. The requests package has been installed in the environment for you; however, if you needed to you can install the package by using the following command: sudo pip install requests. You will need write several unit tests with pytest, implementing the AccessApi class you create. Lastly, you will need to refactor two of the unit tests so they are parametrized.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
