/** * Schema-based test generator for deterministic testing in check mode. * * Generates comprehensive test cases from JSON Schema without requiring LLM. * This module is the core of the enhanced testing capability, producing * 8-12 tests per tool covering boundaries, types, enums, and error handling. */ import type { MCPTool } from '../transport/types.js'; import type { InterviewQuestion } from './types.js'; import type { SemanticInference } from '../validation/semantic-types.js'; import type { TestFixturesConfig } from './test-fixtures.js'; export type { TestFixturePattern, TestFixturesConfig } from './test-fixtures.js'; /** * Options for test generation. */ export interface SchemaTestGeneratorOptions { /** Skip error handling tests (e.g., missing required params) */ skipErrorTests?: boolean; /** Maximum tests per tool (overrides default) */ maxTestsPerTool?: number; /** Skip semantic validation tests (default: false) */ skipSemanticTests?: boolean; /** Custom test fixtures for overriding default values */ testFixtures?: TestFixturesConfig; } /** * Result of schema test generation including semantic inferences. */ export interface SchemaTestGeneratorResult { /** Generated test questions */ questions: InterviewQuestion[]; /** Semantic type inferences for parameters */ semanticInferences: SemanticInference[]; } /** * Generate comprehensive schema-based test cases for a tool. * * This function analyzes the tool's JSON Schema and generates deterministic * test cases covering: * - Happy path (valid inputs) * - Boundary values (empty strings, zero, large numbers) * - Type coercion (wrong types) * - Enum validation (invalid enum values) * - Array handling (empty, single, many items) * - Null/undefined handling * - Error handling (missing required params) * - Semantic validation (date formats, emails, URLs, etc.) * * @param tool - The MCP tool to generate tests for * @param options - Configuration options * @returns Array of interview questions (test cases) */ export declare function generateSchemaTests(tool: MCPTool, options?: SchemaTestGeneratorOptions): InterviewQuestion[]; /** * Generate schema-based tests with semantic inference information. * * This variant returns both the test questions and semantic type inferences, * useful when you need to track inferred types for documentation. * * @param tool - The MCP tool to generate tests for * @param options - Configuration options * @returns Test questions and semantic inferences */ export declare function generateSchemaTestsWithInferences(tool: MCPTool, options?: SchemaTestGeneratorOptions): SchemaTestGeneratorResult; //# sourceMappingURL=schema-test-generator.d.ts.map