Sprint-0 — API Understanding & Analysis
Complete these onboarding and analysis exercises before writing a single API automation test.
Exercise 1: Identify All APIs
- Identify every API used by the application.
- Refer to API documentation or Swagger.
Exercise 2: Categorize APIs
Group APIs by module, such as:
- Authentication
- User
- Order
- Product
- Payment
- Cart
Exercise 3: Identify Public vs Secured APIs
Determine:
- Public APIs
- Authentication-protected APIs
Exercise 4: Identify Dependent APIs
Examples include:
- Login → Token → Protected APIs
Identify every dependent workflow.
Exercise 5: Identify Business-Critical APIs
Determine which APIs are essential for business functionality.
Exercise 6: Identify Smoke APIs
Select APIs that validate the application's core health.
Exercise 7: Identify Regression APIs
Identify APIs that require complete regression coverage.
Exercise 8: Identify APIs Not Suitable for Automation
Determine APIs that are currently:
- Out of scope
- Unsuitable for automation
Exercise 9: Identify API Boundaries
Define the testing boundaries for every API.
Exercise 10: Prepare the API Test Scope Document
Document:
- Scope
- Objectives
- Modules
- Coverage
Exercise 11: Analyze UI Network Calls
Map UI actions to backend APIs.
Exercise 12: Identify API-Level Validations
Determine validations that should only be performed through API testing.
Exercise 13: Identify Data Ownership
Understand which API owns which business data.
Exercise 14: Identify API Ownership
Identify the responsible teams or services for each API.
Exercise 15: Prepare the API Coverage Matrix
Create a coverage matrix showing:
- APIs
- Modules
- Automation Status
- Test Coverage
FakeStore Sprint-0 Activities
Apply the same exercises to the FakeStore application by:
- Categorizing Auth, User, Product, and Cart modules.
- Identifying CRUD operations.
- Finding dependent APIs.
- Identifying business-critical APIs.
- Preparing the API Test Scope Document.
Sprint-1 — Framework Setup & Architecture
Complete these framework setup exercises.
Exercise 1: Create the Maven Project
Create a Maven project dedicated to API automation.
Exercise 2: Define the Folder Structure
Organize the framework with a proper project structure.
Exercise 3: Configure Dependencies
Add required libraries:
- REST Assured
- JSON Path
- XML Path
Exercise 4: Configure Base URI & Base Path
Set up:
- Base URI
- Base Path
for reusable API execution.
Exercise 5: Configure Environment Switching
Externalize the Base URI.
Support multiple environments:
- DEV
- QA
- PROD
Exercise 6: Configure Logging
Enable request and response logging.
Exercise 7: Create the BaseTest Class
Build a reusable BaseTest class for all API tests.
Exercise 8: Create Utility Classes
Develop common:
- Utility Classes
- Helper Classes
for framework reuse.
Exercise 9: Create a Reusable Request Builder
Implement reusable:
- RequestSpecification
for common request configuration.
Exercise 10: Create a Reusable Response Validator
Implement reusable:
- ResponseSpecification
for standard response validation.
Exercise 11: Maintain Execution Configuration
Manage framework execution settings.
Exercise 12: Validate Framework Execution
Verify successful execution:
- Locally
- In CI
Exercise 13: Secure Configuration Secrets
Store sensitive configuration securely.
Exercise 14: Configure Version Control
Push the framework to Git.
Exercise 15: Maintain Documentation
Maintain:
- README Documentation
- Team Onboarding Documentation
Share the framework with the team.
Sprint-1 — Smoke API Automation
Once the framework is operational, automate the initial smoke suite.
Exercise 1: Execute a Sample API Test
Run a sample API test to verify the framework setup.
Exercise 2: Validate Product List API
Verify the Product List endpoint.
Exercise 3: Validate Product Detail API
Verify Product Details.
Exercise 4: Validate Login API
Verify user authentication.
Exercise 5: Validate Create Cart API
Verify successful cart creation.
Exercise 6: Validate Delete Cart API
Verify successful cart deletion.
Smoke Suite Purpose
These APIs become the application's primary smoke suite and execute with every build.
Demo-API Mapping
API Understanding
Practice using:
- ReqRes
Identify:
- Login
- Register
- Users
- Secured APIs
- Public APIs
- Dependencies
Analyze API documentation using:
- petstore.swagger.io
Framework Setup & Smoke Testing
Practice using:
- fakestoreapi.com
- dummyjson.com
For CRUD and booking workflows, use:
- restful-booker.herokuapp.com
FAQs
What Should You Do Before Automating Any API?
Complete Sprint-0 activities:
- Identify APIs.
- Categorize modules.
- Identify dependencies.
- Identify business-critical APIs.
- Select Smoke APIs.
- Select Regression APIs.
- Identify out-of-scope APIs.
- Prepare the Test Scope Document.
- Prepare the API Coverage Matrix.
How Do You Identify Smoke vs Regression APIs?
Smoke APIs
- Business-critical.
- High-level health checks.
Examples:
- Login
- Product List
Regression APIs
- Complete CRUD operations.
- Edge cases.
- Dependent workflows.
What Does a REST Assured Framework Include?
A complete framework includes:
- Maven Project
- Dependencies
- Base URI
- Base Path
- Environment Switching
- Logging
- BaseTest
- Utility Classes
- Request Specification
- Response Specification
- Secret Management
- Git
- README Documentation
Why Should Base URI Be Externalized?
Externalizing configuration allows the same automation suite to execute against:
- DEV
- QA
- PROD
without modifying source code.
What Should Be Included in the Initial Smoke Suite?
Core application health checks, including:
- Product List
- Product Details
- Login
- Create Cart
- Delete Cart
These APIs should execute for every build.