Python — Build Restful API End Point Testing Automation Framework — 2 LINES Of Code For Any Future Test
2 min readApr 28, 2024
Once you have built this framework then all you need is just 2 lines of code for any new test to add. Please follow as suggested in these 3 videos
Build Restful API End Point Testing Automation Framework In Python Without Any Tool — Part1
- Automate Happy path (Critical Positive Test Scenarios)
1.1 : POST request to create user
1.2 : GET request to extract user info
1.3 : PUT request to update user info
1.4 : DELETE request to delete user
2. What is Swagger UI?
3. How Does Swagger UI help to architect your automation framework?
4. Used Python Libraries -
4.1 pytest : Testing Framework
4.2 requests : Handles all kind of Restful API requests
4.3. Faker : Create Test Data for all kind of testing
Build Restful API End Point Testing Automation Framework In Python Without Any Tool — Part2
- Automate Negative Scenarios Around Critical Positive scenarios (MVP)
1.1 : POST request to create user that is already exist on the system
1.2 : GET request to extract user info that is not yet created
1.3 : PUT request to update user info that is not yet created
1.4 : DELETE request to delete user that is not yet created
2. What is Swagger UI?
3. How Does Swagger UI help to architect your automation framework?
4. Used Python Libraries -
4.1 pytest : Testing Framework
4.2 requests : Handles all kind of Restful API requests
4.3. Faker : Create Test Data for all kind of testing
- Final Automation framework with just 2 lines of Code for all Positive/Negative Scenarios
2. How to remove Redundant code
3. How to use modularity of code to reduce the line of code in test script
5. Used Python Libraries -
4.1 pytest : Testing Framework
4.2 requests : Handles all kind of Restful API requests
4.3. Faker : Create Test Data for all kind of testing
Please feel free to reach out to me for any further clarification.