import { TestSuggestion } from '../entities/TestSuggestion'; import { CodeBlock } from '../entities/CodeBlock'; export interface TestGeneratorOptions { readonly framework: 'jest' | 'mocha' | 'vitest' | 'cypress' | 'playwright' | 'generic'; readonly testType: 'unit' | 'integration' | 'e2e' | 'performance' | 'security'; readonly language: string; readonly includeSetup?: boolean; readonly includeTeardown?: boolean; readonly coverageTarget?: number; readonly testPattern?: string; } export interface TestGeneratorPort { /** * Generate test suggestions for a code block */ generateTests( codeBlock: CodeBlock, options: TestGeneratorOptions ): Promise; /** * Generate test suggestions for multiple code blocks */ generateTestsForMultiple( codeBlocks: CodeBlock[], options: TestGeneratorOptions ): Promise; /** * Generate test setup code */ generateTestSetup( language: string, framework: string, dependencies: string[] ): Promise; /** * Generate test teardown code */ generateTestTeardown( language: string, framework: string ): Promise; /** * Analyze test coverage for existing tests */ analyzeTestCoverage( sourceFiles: CodeBlock[], testFiles: CodeBlock[] ): Promise<{ readonly totalLines: number; readonly coveredLines: number; readonly coveragePercentage: number; readonly uncoveredLines: Array<{ readonly file: string; readonly line: number; readonly content: string; }>; }>; /** * Suggest missing test cases */ suggestMissingTestCases( codeBlock: CodeBlock, existingTests: CodeBlock[] ): Promise; /** * Validate test code quality */ validateTestQuality(testCode: string): Promise<{ readonly isValid: boolean; readonly issues: Array<{ readonly type: 'error' | 'warning' | 'suggestion'; readonly message: string; readonly line?: number; }>; }>; }