Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started