/** * E2E Test Runner - Core Type Definitions */ export interface E2EConfig { version: '1.0'; testDir?: string; environments: Record; defaults?: DefaultsConfig; variables?: Record; hooks?: HooksConfig; reporters?: ReporterConfig[]; } export interface EnvironmentConfig { baseUrl: string; adapters: { postgresql?: PostgreSQLAdapterConfig; redis?: RedisAdapterConfig; mongodb?: MongoDBAdapterConfig; eventhub?: EventHubAdapterConfig; shell?: ShellAdapterConfig; kafka?: KafkaAdapterConfig; }; } export interface PostgreSQLAdapterConfig { connectionString: string; schema?: string; poolSize?: number; } export interface RedisAdapterConfig { connectionString: string; db?: number; keyPrefix?: string; } export interface MongoDBAdapterConfig { connectionString: string; database?: string; } export interface EventHubAdapterConfig { connectionString: string; consumerGroup?: string; checkpointStore?: string; } export interface ShellAdapterConfig { defaultTimeout?: number; defaultCwd?: string; defaultEnv?: Record; } export interface KafkaAdapterConfig { brokers: string | string[]; clientId?: string; ssl?: boolean; sasl?: { mechanism: 'plain' | 'scram-sha-256' | 'scram-sha-512'; username: string; password: string; }; connectionTimeout?: number; requestTimeout?: number; } export interface DefaultsConfig { timeout?: number; retries?: number; retryDelay?: number; parallel?: number; } export interface HooksConfig { beforeAll?: string; afterAll?: string; beforeEach?: string; afterEach?: string; } export interface ReporterConfig { type: 'console' | 'junit' | 'html' | 'json'; output?: string; verbose?: boolean; } export type TestPriority = 'P0' | 'P1' | 'P2' | 'P3'; export type AdapterType = 'postgresql' | 'redis' | 'mongodb' | 'eventhub' | 'http' | 'shell' | 'typescript' | 'kafka'; export type TestPhase = 'setup' | 'execute' | 'verify' | 'teardown'; export interface UnifiedTestDefinition { name: string; description?: string; priority?: TestPriority; tags?: string[]; skip?: boolean; skipReason?: string; timeout?: number; retries?: number; depends?: string[]; variables?: Record; setup?: UnifiedStep[]; execute: UnifiedStep[]; verify?: UnifiedStep[]; teardown?: UnifiedStep[]; sourceFile: string; sourceType: 'yaml' | 'typescript'; } export interface UnifiedStep { id: string; adapter: AdapterType; action: string; description?: string; params: Record; capture?: Record; assert?: unknown; continueOnError?: boolean; retry?: number; delay?: number; } export type TestStatus = 'passed' | 'failed' | 'skipped' | 'error'; export type PhaseStatus = 'passed' | 'failed' | 'skipped'; export type StepStatus = 'passed' | 'failed' | 'skipped' | 'warned'; export interface TestExecutionResult { name: string; description?: string; status: TestStatus; phases: PhaseResult[]; duration: number; error?: Error; retryCount: number; capturedValues: Record; } export interface PhaseResult { phase: TestPhase; status: PhaseStatus; steps: StepResult[]; duration: number; error?: Error; } export interface StepResult { stepId: string; adapter: AdapterType; action: string; description?: string; status: StepStatus; duration: number; data?: unknown; error?: Error; retryCount: number; } export interface TestSuiteResult { total: number; passed: number; failed: number; skipped: number; duration: number; results: TestExecutionResult[]; success: boolean; } export interface AdapterConfig { connectionString?: string; baseUrl?: string; [key: string]: unknown; } export interface AdapterContext { variables: Record; captured: Record; capture: (name: string, value: unknown) => void; logger: Logger; baseUrl: string; cookieJar: Map; } export interface AdapterStepResult { success: boolean; data?: unknown; error?: Error; duration: number; } export interface Logger { debug(message: string, ...args: unknown[]): void; info(message: string, ...args: unknown[]): void; warn(message: string, ...args: unknown[]): void; error(message: string, ...args: unknown[]): void; } export type CLICommand = 'run' | 'validate' | 'list' | 'health' | 'init' | 'test' | 'doc' | 'install'; export interface CLIArgs { command: CLICommand; patterns: string[]; options: CLIOptions; } export interface CLIOptions { config: string; env: string; verbose: boolean; quiet: boolean; noColor: boolean; testDir: string; reportDir: string; parallel: number; timeout: number; retries: number; bail: boolean; watch: boolean; grep: string; tag: string[]; priority: TestPriority[]; skipSetup: boolean; skipTeardown: boolean; dryRun: boolean; reporter: string[]; output: string; debug: boolean; stepByStep: boolean; captureTraffic: boolean; adapter: string; testTemplate: string; testDescription: string; testPriority: string; testTags: string; } export interface TestSuite { name: string; tests: UnifiedTestDefinition[]; config: E2EConfig; } export interface ReporterEvent { type: 'suite:start' | 'suite:end' | 'test:start' | 'test:end' | 'phase:start' | 'phase:end' | 'step:start' | 'step:end'; timestamp: Date; data: unknown; } export interface DiscoveredTest { filePath: string; name: string; type: 'yaml' | 'typescript'; } export interface DiscoveryOptions { basePath?: string; patterns?: string[]; excludePatterns?: string[]; } export interface InterpolationContext { variables: Record; captured: Record; baseUrl: string; env: Record; } export type BuiltInFunction = (...args: string[]) => string | number; export interface LoadedConfig { raw: E2EConfig; environment: EnvironmentConfig; environmentName: string; testDir: string; defaults: Required; variables: Record; reporters: ReporterConfig[]; hooks: HooksConfig; } export declare const DEFAULT_CONFIG: Required; export declare const DEFAULT_CLI_OPTIONS: Partial; //# sourceMappingURL=types.d.ts.map