test-genie-mcp 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +219 -0
  2. package/dist/analyzers/astAnalyzer.d.ts +108 -0
  3. package/dist/analyzers/astAnalyzer.d.ts.map +1 -0
  4. package/dist/analyzers/astAnalyzer.js +800 -0
  5. package/dist/analyzers/astAnalyzer.js.map +1 -0
  6. package/dist/analyzers/performanceAnalyzer.d.ts +90 -0
  7. package/dist/analyzers/performanceAnalyzer.d.ts.map +1 -0
  8. package/dist/analyzers/performanceAnalyzer.js +647 -0
  9. package/dist/analyzers/performanceAnalyzer.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +683 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/platforms/android/index.d.ts +90 -0
  15. package/dist/platforms/android/index.d.ts.map +1 -0
  16. package/dist/platforms/android/index.js +519 -0
  17. package/dist/platforms/android/index.js.map +1 -0
  18. package/dist/platforms/flutter/index.d.ts +105 -0
  19. package/dist/platforms/flutter/index.d.ts.map +1 -0
  20. package/dist/platforms/flutter/index.js +533 -0
  21. package/dist/platforms/flutter/index.js.map +1 -0
  22. package/dist/platforms/ios/index.d.ts +79 -0
  23. package/dist/platforms/ios/index.d.ts.map +1 -0
  24. package/dist/platforms/ios/index.js +393 -0
  25. package/dist/platforms/ios/index.js.map +1 -0
  26. package/dist/platforms/react-native/index.d.ts +160 -0
  27. package/dist/platforms/react-native/index.d.ts.map +1 -0
  28. package/dist/platforms/react-native/index.js +602 -0
  29. package/dist/platforms/react-native/index.js.map +1 -0
  30. package/dist/platforms/web/index.d.ts +177 -0
  31. package/dist/platforms/web/index.d.ts.map +1 -0
  32. package/dist/platforms/web/index.js +637 -0
  33. package/dist/platforms/web/index.js.map +1 -0
  34. package/dist/storage/index.d.ts +35 -0
  35. package/dist/storage/index.d.ts.map +1 -0
  36. package/dist/storage/index.js +351 -0
  37. package/dist/storage/index.js.map +1 -0
  38. package/dist/tools/analysis/analyzeAppStructure.d.ts +9 -0
  39. package/dist/tools/analysis/analyzeAppStructure.d.ts.map +1 -0
  40. package/dist/tools/analysis/analyzeAppStructure.js +289 -0
  41. package/dist/tools/analysis/analyzeAppStructure.js.map +1 -0
  42. package/dist/tools/analysis/createTestPlan.d.ts +21 -0
  43. package/dist/tools/analysis/createTestPlan.d.ts.map +1 -0
  44. package/dist/tools/analysis/createTestPlan.js +214 -0
  45. package/dist/tools/analysis/createTestPlan.js.map +1 -0
  46. package/dist/tools/analysis/generateScenarios.d.ts +21 -0
  47. package/dist/tools/analysis/generateScenarios.d.ts.map +1 -0
  48. package/dist/tools/analysis/generateScenarios.js +567 -0
  49. package/dist/tools/analysis/generateScenarios.js.map +1 -0
  50. package/dist/tools/automation/cicdIntegration.d.ts +41 -0
  51. package/dist/tools/automation/cicdIntegration.d.ts.map +1 -0
  52. package/dist/tools/automation/cicdIntegration.js +825 -0
  53. package/dist/tools/automation/cicdIntegration.js.map +1 -0
  54. package/dist/tools/automation/generateReport.d.ts +16 -0
  55. package/dist/tools/automation/generateReport.d.ts.map +1 -0
  56. package/dist/tools/automation/generateReport.js +406 -0
  57. package/dist/tools/automation/generateReport.js.map +1 -0
  58. package/dist/tools/automation/runFullAutomation.d.ts +25 -0
  59. package/dist/tools/automation/runFullAutomation.d.ts.map +1 -0
  60. package/dist/tools/automation/runFullAutomation.js +296 -0
  61. package/dist/tools/automation/runFullAutomation.js.map +1 -0
  62. package/dist/tools/detection/detectLogicErrors.d.ts +18 -0
  63. package/dist/tools/detection/detectLogicErrors.d.ts.map +1 -0
  64. package/dist/tools/detection/detectLogicErrors.js +470 -0
  65. package/dist/tools/detection/detectLogicErrors.js.map +1 -0
  66. package/dist/tools/detection/detectMemoryLeaks.d.ts +23 -0
  67. package/dist/tools/detection/detectMemoryLeaks.d.ts.map +1 -0
  68. package/dist/tools/detection/detectMemoryLeaks.js +453 -0
  69. package/dist/tools/detection/detectMemoryLeaks.js.map +1 -0
  70. package/dist/tools/execution/runScenarioTest.d.ts +34 -0
  71. package/dist/tools/execution/runScenarioTest.d.ts.map +1 -0
  72. package/dist/tools/execution/runScenarioTest.js +334 -0
  73. package/dist/tools/execution/runScenarioTest.js.map +1 -0
  74. package/dist/tools/execution/runSimulation.d.ts +17 -0
  75. package/dist/tools/execution/runSimulation.d.ts.map +1 -0
  76. package/dist/tools/execution/runSimulation.js +250 -0
  77. package/dist/tools/execution/runSimulation.js.map +1 -0
  78. package/dist/tools/execution/runStressTest.d.ts +52 -0
  79. package/dist/tools/execution/runStressTest.d.ts.map +1 -0
  80. package/dist/tools/execution/runStressTest.js +176 -0
  81. package/dist/tools/execution/runStressTest.js.map +1 -0
  82. package/dist/tools/fixing/applyFix.d.ts +44 -0
  83. package/dist/tools/fixing/applyFix.d.ts.map +1 -0
  84. package/dist/tools/fixing/applyFix.js +399 -0
  85. package/dist/tools/fixing/applyFix.js.map +1 -0
  86. package/dist/tools/fixing/confirmFix.d.ts +31 -0
  87. package/dist/tools/fixing/confirmFix.d.ts.map +1 -0
  88. package/dist/tools/fixing/confirmFix.js +136 -0
  89. package/dist/tools/fixing/confirmFix.js.map +1 -0
  90. package/dist/tools/fixing/suggestFixes.d.ts +23 -0
  91. package/dist/tools/fixing/suggestFixes.d.ts.map +1 -0
  92. package/dist/tools/fixing/suggestFixes.js +349 -0
  93. package/dist/tools/fixing/suggestFixes.js.map +1 -0
  94. package/dist/types.d.ts +322 -0
  95. package/dist/types.d.ts.map +1 -0
  96. package/dist/types.js +6 -0
  97. package/dist/types.js.map +1 -0
  98. package/dist/utils/codeParser.d.ts +12 -0
  99. package/dist/utils/codeParser.d.ts.map +1 -0
  100. package/dist/utils/codeParser.js +487 -0
  101. package/dist/utils/codeParser.js.map +1 -0
  102. package/package.json +68 -0
@@ -0,0 +1,52 @@
1
+ import { AppStructure } from '../../types.js';
2
+ interface StressTestParams {
3
+ appStructure: AppStructure;
4
+ targetType: 'api' | 'ui' | 'navigation' | 'all';
5
+ concurrency: number;
6
+ duration: number;
7
+ rampUp?: number;
8
+ endpoints?: string[];
9
+ thresholds?: {
10
+ maxResponseTime?: number;
11
+ maxErrorRate?: number;
12
+ minThroughput?: number;
13
+ };
14
+ }
15
+ interface StressTestResult {
16
+ id: string;
17
+ targetType: string;
18
+ duration: number;
19
+ concurrency: number;
20
+ totalRequests: number;
21
+ successfulRequests: number;
22
+ failedRequests: number;
23
+ avgResponseTime: number;
24
+ minResponseTime: number;
25
+ maxResponseTime: number;
26
+ p50ResponseTime: number;
27
+ p95ResponseTime: number;
28
+ p99ResponseTime: number;
29
+ throughput: number;
30
+ errorRate: number;
31
+ errors: ErrorDetail[];
32
+ timeline: TimelinePoint[];
33
+ thresholdsPassed: boolean;
34
+ summary: string;
35
+ executedAt: string;
36
+ }
37
+ interface ErrorDetail {
38
+ timestamp: string;
39
+ type: string;
40
+ message: string;
41
+ endpoint?: string;
42
+ }
43
+ interface TimelinePoint {
44
+ timestamp: string;
45
+ activeUsers: number;
46
+ requestsPerSecond: number;
47
+ avgResponseTime: number;
48
+ errorCount: number;
49
+ }
50
+ export declare function runStressTest(params: StressTestParams): Promise<StressTestResult>;
51
+ export default runStressTest;
52
+ //# sourceMappingURL=runStressTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runStressTest.d.ts","sourceRoot":"","sources":["../../../src/tools/execution/runStressTest.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAW,MAAM,gBAAgB,CAAC;AAEvD,UAAU,gBAAgB;IACxB,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,KAAK,GAAG,IAAI,GAAG,YAAY,GAAG,KAAK,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,C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 +1,176 @@
1
+ "use strict";
2
+ // ============================================
3
+ // Run Stress Test Tool
4
+ // ============================================
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.runStressTest = runStressTest;
7
+ const uuid_1 = require("uuid");
8
+ async function runStressTest(params) {
9
+ const { appStructure, targetType, concurrency, duration, rampUp = 10, endpoints = [], thresholds = {}, } = params;
10
+ const { maxResponseTime = 3000, maxErrorRate = 5, minThroughput = 10 } = thresholds;
11
+ const startTime = Date.now();
12
+ const responseTimes = [];
13
+ const errors = [];
14
+ const timeline = [];
15
+ let totalRequests = 0;
16
+ let successfulRequests = 0;
17
+ let failedRequests = 0;
18
+ // Get target endpoints
19
+ const targetEndpoints = endpoints.length > 0
20
+ ? endpoints
21
+ : appStructure.apis.map(api => api.endpoint);
22
+ // Calculate intervals
23
+ const intervalMs = 100; // Check every 100ms
24
+ const totalIntervals = (duration * 1000) / intervalMs;
25
+ const rampUpIntervals = (rampUp * 1000) / intervalMs;
26
+ // Run stress test
27
+ for (let i = 0; i < totalIntervals; i++) {
28
+ // Calculate current concurrency (ramp up)
29
+ const currentConcurrency = i < rampUpIntervals
30
+ ? Math.ceil((i / rampUpIntervals) * concurrency)
31
+ : concurrency;
32
+ // Simulate concurrent requests
33
+ const intervalRequests = Math.ceil(currentConcurrency * (intervalMs / 1000));
34
+ const intervalResponseTimes = [];
35
+ let intervalErrors = 0;
36
+ for (let j = 0; j < intervalRequests; j++) {
37
+ totalRequests++;
38
+ const endpoint = targetEndpoints[totalRequests % targetEndpoints.length] || '/api/test';
39
+ try {
40
+ const responseTime = await simulateRequest(endpoint, targetType, currentConcurrency);
41
+ responseTimes.push(responseTime);
42
+ intervalResponseTimes.push(responseTime);
43
+ successfulRequests++;
44
+ }
45
+ catch (error) {
46
+ failedRequests++;
47
+ intervalErrors++;
48
+ errors.push({
49
+ timestamp: new Date().toISOString(),
50
+ type: error instanceof Error ? error.name : 'Unknown',
51
+ message: error instanceof Error ? error.message : String(error),
52
+ endpoint,
53
+ });
54
+ }
55
+ }
56
+ // Record timeline point every second
57
+ if (i > 0 && i % 10 === 0) {
58
+ const avgResponseTime = intervalResponseTimes.length > 0
59
+ ? intervalResponseTimes.reduce((a, b) => a + b, 0) / intervalResponseTimes.length
60
+ : 0;
61
+ timeline.push({
62
+ timestamp: new Date().toISOString(),
63
+ activeUsers: currentConcurrency,
64
+ requestsPerSecond: intervalRequests * 10, // Convert from 100ms to 1s
65
+ avgResponseTime: Math.round(avgResponseTime),
66
+ errorCount: intervalErrors,
67
+ });
68
+ }
69
+ await sleep(10); // Small delay for simulation
70
+ }
71
+ const actualDuration = (Date.now() - startTime) / 1000;
72
+ // Calculate statistics
73
+ const sortedResponseTimes = [...responseTimes].sort((a, b) => a - b);
74
+ const avgResponseTime = responseTimes.length > 0
75
+ ? responseTimes.reduce((a, b) => a + b, 0) / responseTimes.length
76
+ : 0;
77
+ const p50Index = Math.floor(sortedResponseTimes.length * 0.5);
78
+ const p95Index = Math.floor(sortedResponseTimes.length * 0.95);
79
+ const p99Index = Math.floor(sortedResponseTimes.length * 0.99);
80
+ const errorRate = totalRequests > 0 ? (failedRequests / totalRequests) * 100 : 0;
81
+ const throughput = actualDuration > 0 ? successfulRequests / actualDuration : 0;
82
+ // Check thresholds
83
+ const thresholdsPassed = avgResponseTime <= maxResponseTime &&
84
+ errorRate <= maxErrorRate &&
85
+ throughput >= minThroughput;
86
+ const result = {
87
+ id: (0, uuid_1.v4)(),
88
+ targetType,
89
+ duration: actualDuration,
90
+ concurrency,
91
+ totalRequests,
92
+ successfulRequests,
93
+ failedRequests,
94
+ avgResponseTime: Math.round(avgResponseTime),
95
+ minResponseTime: sortedResponseTimes[0] || 0,
96
+ maxResponseTime: sortedResponseTimes[sortedResponseTimes.length - 1] || 0,
97
+ p50ResponseTime: sortedResponseTimes[p50Index] || 0,
98
+ p95ResponseTime: sortedResponseTimes[p95Index] || 0,
99
+ p99ResponseTime: sortedResponseTimes[p99Index] || 0,
100
+ throughput: Math.round(throughput * 100) / 100,
101
+ errorRate: Math.round(errorRate * 100) / 100,
102
+ errors: errors.slice(0, 100), // Limit errors in result
103
+ timeline,
104
+ thresholdsPassed,
105
+ summary: '',
106
+ executedAt: new Date().toISOString(),
107
+ };
108
+ result.summary = generateStressTestSummary(result, thresholds);
109
+ return result;
110
+ }
111
+ async function simulateRequest(endpoint, targetType, currentLoad) {
112
+ // Simulate request with load-dependent response time
113
+ const baseTime = targetType === 'api' ? 50 : targetType === 'ui' ? 100 : 80;
114
+ // Response time increases with load
115
+ const loadFactor = 1 + (currentLoad / 100);
116
+ // Add variance
117
+ const variance = Math.random() * 100;
118
+ // Simulate occasional slow responses
119
+ const slowFactor = Math.random() < 0.05 ? 3 : 1;
120
+ // Simulate errors under high load
121
+ if (currentLoad > 50 && Math.random() < (currentLoad - 50) / 500) {
122
+ throw new Error('Request timeout under high load');
123
+ }
124
+ const responseTime = (baseTime * loadFactor + variance) * slowFactor;
125
+ await sleep(Math.min(responseTime / 10, 50)); // Simulate some actual delay
126
+ return Math.round(responseTime);
127
+ }
128
+ function generateStressTestSummary(result, thresholds) {
129
+ const lines = [];
130
+ const status = result.thresholdsPassed ? '✅ PASSED' : '❌ FAILED';
131
+ lines.push(`Stress Test Results - ${status}`);
132
+ lines.push('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
133
+ lines.push(`Target: ${result.targetType}`);
134
+ lines.push(`Duration: ${result.duration.toFixed(1)}s`);
135
+ lines.push(`Concurrency: ${result.concurrency} users`);
136
+ lines.push('');
137
+ lines.push('Requests:');
138
+ lines.push(` Total: ${result.totalRequests}`);
139
+ lines.push(` Successful: ${result.successfulRequests}`);
140
+ lines.push(` Failed: ${result.failedRequests}`);
141
+ lines.push('');
142
+ lines.push('Response Times:');
143
+ lines.push(` Average: ${result.avgResponseTime}ms ${result.avgResponseTime > (thresholds.maxResponseTime || 3000) ? '⚠️' : ''}`);
144
+ lines.push(` Min: ${result.minResponseTime}ms`);
145
+ lines.push(` Max: ${result.maxResponseTime}ms`);
146
+ lines.push(` P50: ${result.p50ResponseTime}ms`);
147
+ lines.push(` P95: ${result.p95ResponseTime}ms`);
148
+ lines.push(` P99: ${result.p99ResponseTime}ms`);
149
+ lines.push('');
150
+ lines.push('Performance:');
151
+ lines.push(` Throughput: ${result.throughput} req/s ${result.throughput < (thresholds.minThroughput || 10) ? '⚠️' : ''}`);
152
+ lines.push(` Error Rate: ${result.errorRate}% ${result.errorRate > (thresholds.maxErrorRate || 5) ? '⚠️' : ''}`);
153
+ lines.push('');
154
+ lines.push('Thresholds:');
155
+ lines.push(` Max Response Time: ${thresholds.maxResponseTime || 3000}ms - ${result.avgResponseTime <= (thresholds.maxResponseTime || 3000) ? '✓' : '✗'}`);
156
+ lines.push(` Max Error Rate: ${thresholds.maxErrorRate || 5}% - ${result.errorRate <= (thresholds.maxErrorRate || 5) ? '✓' : '✗'}`);
157
+ lines.push(` Min Throughput: ${thresholds.minThroughput || 10} req/s - ${result.throughput >= (thresholds.minThroughput || 10) ? '✓' : '✗'}`);
158
+ if (result.errors.length > 0) {
159
+ lines.push('');
160
+ lines.push('Top Errors:');
161
+ const errorCounts = {};
162
+ for (const error of result.errors) {
163
+ errorCounts[error.message] = (errorCounts[error.message] || 0) + 1;
164
+ }
165
+ const sortedErrors = Object.entries(errorCounts).sort((a, b) => b[1] - a[1]).slice(0, 5);
166
+ for (const [message, count] of sortedErrors) {
167
+ lines.push(` - ${message}: ${count}x`);
168
+ }
169
+ }
170
+ return lines.join('\n');
171
+ }
172
+ function sleep(ms) {
173
+ return new Promise(resolve => setTimeout(resolve, ms));
174
+ }
175
+ exports.default = runStressTest;
176
+ //# sourceMappingURL=runStressTest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runStressTest.js","sourceRoot":"","sources":["../../../src/tools/execution/runStressTest.ts"],"names":[],"mappings":";AAAA,+CAA+C;AAC/C,uBAAuB;AACvB,+CAA+C;;AAyD/C,sCAoIC;AA3LD,+BAAoC;AAuD7B,KAAK,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,CAAC;AACzD,CAAC;AAED,kBAAe,aAAa,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { FixApplication } from '../../types.js';
2
+ interface ApplyFixParams {
3
+ fixId: string;
4
+ backup?: boolean;
5
+ validate?: boolean;
6
+ dryRun?: boolean;
7
+ }
8
+ interface ApplyFixResult {
9
+ success: boolean;
10
+ application: FixApplication;
11
+ backupPath?: string;
12
+ error?: string;
13
+ diff?: string;
14
+ }
15
+ export declare function applyFix(params: ApplyFixParams): ApplyFixResult;
16
+ export declare function applyFixes(fixIds: string[], options?: {
17
+ backup?: boolean;
18
+ validate?: boolean;
19
+ stopOnError?: boolean;
20
+ }): Promise<{
21
+ results: ApplyFixResult[];
22
+ summary: {
23
+ successful: number;
24
+ failed: number;
25
+ backups: string[];
26
+ };
27
+ }>;
28
+ export declare function applyConfirmedFixes(projectPath: string, options?: {
29
+ backup?: boolean;
30
+ validate?: boolean;
31
+ }): Promise<{
32
+ results: ApplyFixResult[];
33
+ summary: {
34
+ successful: number;
35
+ failed: number;
36
+ skipped: number;
37
+ };
38
+ }>;
39
+ export declare function rollbackFix(fixId: string): {
40
+ success: boolean;
41
+ message: string;
42
+ };
43
+ export default applyFix;
44
+ //# sourceMappingURL=applyFix.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyFix.d.ts","sourceRoot":"","sources":["../../../src/tools/fixing/applyFix.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,cAAc,EAEf,MAAM,gBAAgB,CAAC;AAGxB,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,cAAc,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,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