Schema Coverage and Generation
FreeTeamsScaleEnterpriseSelf-HostedDedicated
This guide explains how to use the schema coverage page to analyze your API schema coverage and automatically generate additional test suites to cover missing scenarios.
Overview
The schema coverage page provides a comprehensive view of how well your test suites cover your API schema. You can compare your original schema with Keploy's generated schema, identify gaps in coverage, and automatically generate tests to fill those gaps.
Accessing Schema Coverage
-
Navigate to Test Suite
- Go to your test suite view
- Click on the "Schema Coverage" button
-
Click on Schema Coverage
- Click on the "Schema Coverage" button or link
Schema Coverage Page Features
1. Original Schema View
The original schema section displays:
- Your API Schema: The original OpenAPI/Swagger schema or manually defined schema
- Schema Structure: Complete API specification including:
- Endpoints and paths
- Request/response models
- Data types and formats
- Required and optional fields
- Validation rules and constraints
2. Total Coverage Metrics
View comprehensive coverage statistics:
- Overall Coverage Percentage: Total schema coverage across all endpoints
- Endpoint Coverage: Coverage breakdown by API endpoint
- Covered Lines: Number of schema lines with test coverage
- Missing Lines: Number of schema lines without test coverage
3. Keploy Generated Schema
The generated schema section shows:
- Auto-Generated Schema: Schema derived from recorded API calls
- Coverage Highlights: Visual indication of covered vs uncovered parts
- Field-Level Coverage: Which fields have been tested
- Edge Case Identification: Scenarios that need additional testing
Side-by-Side Comparison
View original and generated schemas side by side:
┌──────────────────────────────────────────────────────────────────┐
│ Schema Coverage Analysis │
├──────────────────────────────────────────────────────────────────┤
│ │