| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "$id": "https://opencode.dev/schemas/test-suite.json",
- "title": "OpenCode Test Suite",
- "description": "Schema for test suite definitions",
- "type": "object",
- "required": ["name", "description", "version", "agent", "totalTests", "estimatedRuntime", "tests"],
- "properties": {
- "name": {
- "type": "string",
- "description": "Human-readable suite name",
- "minLength": 1,
- "examples": ["Core Test Suite", "Quick Smoke Tests"]
- },
- "description": {
- "type": "string",
- "description": "Brief description of what this suite tests",
- "minLength": 1
- },
- "version": {
- "type": "string",
- "description": "Semantic version of the suite",
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
- "examples": ["1.0.0", "2.1.3"]
- },
- "agent": {
- "type": "string",
- "description": "Agent this suite is for",
- "enum": ["openagent", "opencoder"],
- "examples": ["openagent"]
- },
- "totalTests": {
- "type": "integer",
- "description": "Total number of tests in this suite",
- "minimum": 1
- },
- "estimatedRuntime": {
- "type": "string",
- "description": "Estimated runtime for the suite",
- "pattern": "^\\d+-\\d+ (minutes|seconds|hours)$",
- "examples": ["5-8 minutes", "30-60 seconds"]
- },
- "coverage": {
- "type": "object",
- "description": "Coverage areas tested by this suite",
- "additionalProperties": {
- "type": "boolean"
- }
- },
- "tests": {
- "type": "array",
- "description": "List of test definitions",
- "minItems": 1,
- "items": {
- "type": "object",
- "required": ["id", "name", "path", "category", "priority"],
- "properties": {
- "id": {
- "type": "integer",
- "description": "Unique test ID within suite",
- "minimum": 1
- },
- "name": {
- "type": "string",
- "description": "Human-readable test name",
- "minLength": 1
- },
- "path": {
- "type": "string",
- "description": "Relative path to test file from tests/ directory",
- "pattern": "^[^/].*\\.yaml$",
- "examples": [
- "01-critical-rules/approval-gate/05-approval-before-execution-positive.yaml"
- ]
- },
- "category": {
- "type": "string",
- "description": "Test category",
- "enum": [
- "critical-rules",
- "workflow-stages",
- "delegation",
- "execution-paths",
- "edge-cases",
- "integration",
- "negative",
- "behavior",
- "tool-usage"
- ]
- },
- "priority": {
- "type": "string",
- "description": "Test priority level",
- "enum": ["critical", "high", "medium", "low"]
- },
- "required": {
- "type": "boolean",
- "description": "Whether this test must exist (fails validation if missing)",
- "default": true
- },
- "estimatedTime": {
- "type": "string",
- "description": "Estimated runtime for this test",
- "pattern": "^\\d+-\\d+(s|m)$",
- "examples": ["30-60s", "1-2m"]
- },
- "description": {
- "type": "string",
- "description": "Brief description of what this test validates"
- }
- },
- "additionalProperties": false
- }
- },
- "rationale": {
- "type": "object",
- "description": "Explanation of suite design decisions",
- "properties": {
- "why7Tests": {
- "type": "string"
- },
- "coverageBreakdown": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- }
- },
- "useCases": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- },
- "usage": {
- "type": "object",
- "description": "Usage examples for this suite"
- },
- "comparison": {
- "type": "object",
- "description": "Comparison with other suites"
- }
- },
- "additionalProperties": false
- }
|