UNPKG

snow-flow

Version:

Snow-Flow v3.2.0: Complete ServiceNow Enterprise Suite with 180+ MCP Tools. ATF Testing, Knowledge Management, Service Catalog, Change Management with CAB scheduling, Virtual Agent chatbots with NLU, Performance Analytics KPIs, Flow Designer automation, A

303 lines 8.06 kB
/** * 🚀 Comprehensive Integration Test Suite * * Complete integration testing framework that validates end-to-end * functionality across all snow-flow components, ensures system * reliability, and provides comprehensive test coverage. */ export interface IntegrationTestSuite { id: string; name: string; description: string; version: string; testCategories: TestCategory[]; configuration: TestConfiguration; metadata: { createdAt: string; author: string; environment: string; totalTests: number; estimatedDuration: number; }; } export interface TestCategory { name: string; description: string; tests: IntegrationTest[]; dependencies: string[]; priority: 'critical' | 'high' | 'medium' | 'low'; parallelExecution: boolean; } export interface IntegrationTest { id: string; name: string; description: string; type: 'component' | 'system' | 'api' | 'workflow' | 'performance' | 'security'; steps: TestStep[]; setup: TestSetup; teardown: TestTeardown; assertions: TestAssertion[]; timeout: number; retryCount: number; tags: string[]; } export interface TestStep { order: number; name: string; action: string; parameters: Record<string, any>; expectedResult?: any; validation?: string; timeout?: number; optional?: boolean; } export interface TestSetup { prerequisites: string[]; dataPreparation: DataPreparation[]; systemConfiguration: SystemConfiguration[]; mockServices: MockService[]; } export interface TestTeardown { cleanupActions: CleanupAction[]; dataRestoration: DataRestoration[]; systemReset: SystemReset[]; verificationChecks: VerificationCheck[]; } export interface TestAssertion { type: 'equals' | 'contains' | 'exists' | 'greater_than' | 'less_than' | 'matches_pattern'; target: string; expected: any; message: string; critical: boolean; } export interface DataPreparation { action: 'create' | 'update' | 'delete' | 'backup'; table: string; data: Record<string, any>; identifier?: string; } export interface SystemConfiguration { component: string; parameter: string; value: any; backup?: boolean; } export interface MockService { name: string; type: 'http' | 'database' | 'external_api'; configuration: Record<string, any>; responses: MockResponse[]; } export interface MockResponse { request: { method?: string; path?: string; headers?: Record<string, string>; body?: any; }; response: { status: number; headers?: Record<string, string>; body: any; delay?: number; }; } export interface CleanupAction { action: string; parameters: Record<string, any>; order: number; critical: boolean; } export interface DataRestoration { table: string; backupId: string; verify: boolean; } export interface SystemReset { component: string; resetType: 'soft' | 'hard' | 'factory'; verification: string; } export interface VerificationCheck { name: string; check: string; expectedResult: any; critical: boolean; } export interface TestConfiguration { environment: 'development' | 'testing' | 'staging' | 'production'; parallelism: { enabled: boolean; maxConcurrency: number; categoryLevel: boolean; testLevel: boolean; }; reporting: { format: 'console' | 'json' | 'html' | 'junit'; outputPath: string; includeDetails: boolean; screenshotOnFailure: boolean; }; retry: { enabled: boolean; maxAttempts: number; backoffStrategy: 'fixed' | 'exponential' | 'linear'; backoffDelay: number; }; timeouts: { default: number; setup: number; teardown: number; assertion: number; }; } export interface TestExecution { id: string; suiteId: string; startTime: string; endTime?: string; status: 'running' | 'completed' | 'failed' | 'cancelled'; progress: number; results: CategoryResult[]; summary: ExecutionSummary; issues: TestIssue[]; artifacts: TestArtifact[]; } export interface CategoryResult { categoryName: string; status: 'running' | 'completed' | 'failed' | 'skipped'; startTime: string; endTime?: string; testResults: TestResult[]; summary: { total: number; passed: number; failed: number; skipped: number; errors: number; }; } export interface TestResult { testId: string; name: string; status: 'passed' | 'failed' | 'skipped' | 'error'; startTime: string; endTime: string; duration: number; stepResults: StepResult[]; assertionResults: AssertionResult[]; error?: string; logs: string[]; artifacts: TestArtifact[]; } export interface StepResult { stepOrder: number; name: string; status: 'passed' | 'failed' | 'skipped' | 'error'; duration: number; result?: any; error?: string; validationPassed?: boolean; } export interface AssertionResult { type: string; target: string; expected: any; actual: any; passed: boolean; message: string; critical: boolean; } export interface ExecutionSummary { totalTests: number; totalCategories: number; passed: number; failed: number; skipped: number; errors: number; successRate: number; totalDuration: number; averageTestDuration: number; criticalFailures: number; } export interface TestIssue { severity: 'low' | 'medium' | 'high' | 'critical'; category: 'setup' | 'execution' | 'assertion' | 'teardown' | 'system'; description: string; testId?: string; stepOrder?: number; recommendation: string; autoResolvable: boolean; } export interface TestArtifact { type: 'log' | 'screenshot' | 'data_dump' | 'performance_report' | 'error_trace'; name: string; path: string; size: number; timestamp: string; metadata?: Record<string, any>; } export declare class IntegrationTestSuite { private logger; private client; private memory; private testSuites; private executions; private mockServices; constructor(); /** * Create comprehensive integration test suite */ createIntegrationTestSuite(name: string, description: string, options?: { includePerformanceTests?: boolean; includeSecurityTests?: boolean; includeRegressionTests?: boolean; environment?: string; customTests?: IntegrationTest[]; }): Promise<IntegrationTestSuite>; /** * Execute integration test suite */ executeTestSuite(suiteId: string, options?: { categories?: string[]; parallel?: boolean; stopOnFailure?: boolean; dryRun?: boolean; generateReport?: boolean; }): Promise<TestExecution>; /** * Get test suites with filtering */ getTestSuites(filter?: { name?: string; environment?: string; minTests?: number; }): IntegrationTestSuite[]; /** * Get test executions */ getTestExecutions(): TestExecution[]; /** * Private helper methods */ private createTestCategories; private createCoreComponentTests; private createAPIIntegrationTests; private createFlowTemplateTests; private createUpdateOrchestrationTests; private createPerformanceTests; private createSecurityTests; private createRegressionTests; private createDefaultConfiguration; private estimateSuiteDuration; private executeTestCategory; private executeIntegrationTest; private executeTestSetup; private executeTestStep; private executeAssertion; private executeTestTeardown; private calculateExecutionSummary; private generateTestReport; } export default IntegrationTestSuite; //# sourceMappingURL=integration-test-suite.d.ts.map