Skip to content

Add e2e test for our public apis #10217

@g1nt0ki

Description

@g1nt0ki

API Structure Validation and Testing

Objectives

  • Define a standardized structure for all public-facing API outputs
  • Implement automated validation and monitoring system (we can run this as jenkins job once an hour)
  • Ensure API consistency across base and beta versions (can be run from cli, or from ui-tool)

Tasks

1. API Structure Definition

  • Establish JSON schema standards for public API responses
  • Document required fields, data types, and response formats

2. Base API Validation Script

  • Input: Base API endpoint (or via env variable, if nothing, use https://api.llama.fi)
  • Output: JSON validation report
  • Features:
    • Run comprehensive structure checks
    • Generate detailed JSON output with results
    • Send Discord notifications for failures
    • Provide summary of all validation errors

3. Beta API Comparison Script

  • Inputs:
    • Base API endpoint (reference)
    • Beta API endpoint (candidate)
  • Validation Requirements:
    • All json schema tests must pass for the beta api
    • Numerical field values within 10% tolerance compared to the base api
    • For large arrays: validate first 10, highest 10, and random 10 items ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions