Build reliable API test suites with pytest and requests! Create efficient test cases, leverage fixtures for code reuse, and implement comprehensive coverage for CRUD operations and authentication flows. Catch bugs before production and ensure your APIs remain rock-solid through continuous development.
Overview
Syllabus
- Unit 1: Writing Basic Tests with Pytest
- Exploring Basic API Test Execution
- Completing Your First API Test
- Customizing API Test Requests
- Creating A New Test
- Unit 2: Organizing Tests With Classes And Fixtures
- Complete Your API Test with Fixtures
- Fix Fixture Setup for Testing
- Introduce Fixtures to Test Setup
- Organize Tests with Classes
- Mastering Testing with Classes and Fixtures
- Unit 3: Testing CRUD Operations with Setup and Teardown
- Add Yield for Clean Test Slate
- Setting Up Your Test Environment
- Enable Clean Test Execution
- Fix Test Setup and Teardown
- Streamline Tests with Pytest Fixture
- Unit 4: Testing Authenticated Endpoints
- Test Protected API Endpoint with API Key
- Implement Session Test Helper and Login
- Complete Session Authentication Test Suite
- Test JWT Login Authentication
- Complete Protected JWT Test Suite