/** * QA360 Test Discoverer * * Automatically discovers and categorizes test files in a project. * Supports Playwright, K6, Cypress, and other test frameworks. */ /** * Detected test information */ export interface TestFile { path: string; type: TestType; framework: TestFramework; relativePath: string; } /** * Discovered tests in a project */ export interface DiscoveredTests { playwright: TestFile[]; k6: TestFile[]; cypress: TestFile[]; jest: TestFile[]; vitest: TestFile[]; other: TestFile[]; } /** * Test type categories */ export type TestType = 'api' | 'ui' | 'e2e' | 'perf' | 'load' | 'security' | 'sast' | 'dast' | 'a11y' | 'unit' | 'integration'; /** * Supported test frameworks */ export type TestFramework = 'playwright' | 'k6' | 'cypress' | 'jest' | 'vitest' | 'mocha' | 'jasmine' | 'unknown'; /** * Test discovery options */ export interface DiscoverOptions { rootDir?: string; patterns?: string[]; excludePatterns?: string[]; } /** * Result of routing a test to an adapter */ export interface AdapterRouting { adapter: string; config?: Record; } /** * Test Discoverer * * Scans a project directory for test files and categorizes them * by framework and type. */ export declare class TestDiscoverer { private readonly rootDir; private readonly defaultPatterns; private readonly DEFAULT_PATTERNS; private readonly DEFAULT_EXCLUDES; constructor(options?: DiscoverOptions); /** * Discover all test files in the project */ discover(): Promise; /** * Find all test files using glob patterns */ private findTestFiles; /** * Categorize a file into a test category */ private categorizeFile; /** * Detect the test framework from file path and content */ detectFramework(filePath: string): TestFramework; /** * Detect the type of test (api, ui, perf, etc.) */ detectType(filePath: string): TestType; /** * Route a test file to the appropriate QA360 adapter */ routeToAdapter(test: TestFile): AdapterRouting; /** * Discover tests for a specific gate */ discoverForGate(gate: string): Promise; /** * Get summary statistics of discovered tests */ getSummary(): Promise; private countAll; private countByType; } /** * Test summary statistics */ export interface TestSummary { total: number; byFramework: { playwright: number; k6: number; cypress: number; jest: number; vitest: number; other: number; }; byType: Record; } /** * Create a test discoverer */ export declare function createTestDiscoverer(options?: DiscoverOptions): TestDiscoverer;