mcp-test-generator 1.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.
- package/README.md +123 -0
- package/dist/analyzers/function-extractor.d.ts +3 -0
- package/dist/analyzers/function-extractor.js +18 -0
- package/dist/analyzers/function-extractor.js.map +1 -0
- package/dist/analyzers/project-analyzer.d.ts +2 -0
- package/dist/analyzers/project-analyzer.js +70 -0
- package/dist/analyzers/project-analyzer.js.map +1 -0
- package/dist/analyzers/python-analyzer.d.ts +2 -0
- package/dist/analyzers/python-analyzer.js +259 -0
- package/dist/analyzers/python-analyzer.js.map +1 -0
- package/dist/analyzers/typescript-analyzer.d.ts +2 -0
- package/dist/analyzers/typescript-analyzer.js +386 -0
- package/dist/analyzers/typescript-analyzer.js.map +1 -0
- package/dist/generators/test-generator.d.ts +4 -0
- package/dist/generators/test-generator.js +223 -0
- package/dist/generators/test-generator.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/models/function-info.d.ts +66 -0
- package/dist/models/function-info.js +2 -0
- package/dist/models/function-info.js.map +1 -0
- package/dist/models/project-info.d.ts +53 -0
- package/dist/models/project-info.js +2 -0
- package/dist/models/project-info.js.map +1 -0
- package/dist/models/test-case.d.ts +32 -0
- package/dist/models/test-case.js +2 -0
- package/dist/models/test-case.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +159 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/analyze-project.d.ts +9 -0
- package/dist/tools/analyze-project.js +24 -0
- package/dist/tools/analyze-project.js.map +1 -0
- package/dist/tools/generate-single-test.d.ts +12 -0
- package/dist/tools/generate-single-test.js +58 -0
- package/dist/tools/generate-single-test.js.map +1 -0
- package/dist/tools/generate-tests.d.ts +17 -0
- package/dist/tools/generate-tests.js +82 -0
- package/dist/tools/generate-tests.js.map +1 -0
- package/dist/utils/config-parser.d.ts +8 -0
- package/dist/utils/config-parser.js +27 -0
- package/dist/utils/config-parser.js.map +1 -0
- package/dist/utils/file-utils.d.ts +7 -0
- package/dist/utils/file-utils.js +157 -0
- package/dist/utils/file-utils.js.map +1 -0
- package/dist/utils/language-detector.d.ts +6 -0
- package/dist/utils/language-detector.js +148 -0
- package/dist/utils/language-detector.js.map +1 -0
- package/dist/utils/test-suite-renderer.d.ts +3 -0
- package/dist/utils/test-suite-renderer.js +62 -0
- package/dist/utils/test-suite-renderer.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import * as fs from "fs";
|
|
2
|
+
export function analyzeTypeScriptFile(filePath) {
|
|
3
|
+
const content = fs.readFileSync(filePath, "utf-8");
|
|
4
|
+
const lines = content.split("\n");
|
|
5
|
+
return {
|
|
6
|
+
filePath,
|
|
7
|
+
imports: extractImports(content),
|
|
8
|
+
exports: extractExports(content),
|
|
9
|
+
functions: extractFunctions(content),
|
|
10
|
+
classes: extractClasses(content),
|
|
11
|
+
constants: extractConstants(content),
|
|
12
|
+
interfaces: extractInterfaces(content),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function extractImports(content) {
|
|
16
|
+
const imports = [];
|
|
17
|
+
const importRegex = /import\s+(?:(type)\s+)?(?:(\w+)(?:\s*,\s*)?)?(?:\{([^}]+)\})?\s+from\s+['"]([^'"]+)['"]/g;
|
|
18
|
+
const importStarRegex = /import\s+\*\s+as\s+(\w+)\s+from\s+['"]([^'"]+)['"]/g;
|
|
19
|
+
let match;
|
|
20
|
+
while ((match = importRegex.exec(content)) !== null) {
|
|
21
|
+
const isTypeOnly = match[1] === "type";
|
|
22
|
+
const defaultImport = match[2] || null;
|
|
23
|
+
const namedImportsStr = match[3] || "";
|
|
24
|
+
const module = match[4];
|
|
25
|
+
const namedImports = namedImportsStr
|
|
26
|
+
? namedImportsStr
|
|
27
|
+
.split(",")
|
|
28
|
+
.map((s) => s.trim())
|
|
29
|
+
.filter((s) => s.length > 0)
|
|
30
|
+
.map((s) => {
|
|
31
|
+
// Handle "Name as Alias"
|
|
32
|
+
const parts = s.split(/\s+as\s+/);
|
|
33
|
+
return parts[parts.length - 1].trim();
|
|
34
|
+
})
|
|
35
|
+
: [];
|
|
36
|
+
imports.push({ module, namedImports, defaultImport, isTypeOnly });
|
|
37
|
+
}
|
|
38
|
+
while ((match = importStarRegex.exec(content)) !== null) {
|
|
39
|
+
imports.push({
|
|
40
|
+
module: match[2],
|
|
41
|
+
namedImports: [],
|
|
42
|
+
defaultImport: match[1],
|
|
43
|
+
isTypeOnly: false,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
return imports;
|
|
47
|
+
}
|
|
48
|
+
function extractExports(content) {
|
|
49
|
+
const exports = [];
|
|
50
|
+
const exportRegex = /export\s+(?:default\s+)?(?:async\s+)?(?:function|class|const|let|var|interface|type|enum)\s+(\w+)/g;
|
|
51
|
+
const exportNamedRegex = /export\s*\{([^}]+)\}/g;
|
|
52
|
+
let match;
|
|
53
|
+
while ((match = exportRegex.exec(content)) !== null) {
|
|
54
|
+
exports.push(match[1]);
|
|
55
|
+
}
|
|
56
|
+
while ((match = exportNamedRegex.exec(content)) !== null) {
|
|
57
|
+
const names = match[1].split(",").map((s) => s.trim().split(/\s+as\s+/)[0].trim());
|
|
58
|
+
exports.push(...names);
|
|
59
|
+
}
|
|
60
|
+
return [...new Set(exports)];
|
|
61
|
+
}
|
|
62
|
+
function extractFunctions(content) {
|
|
63
|
+
const functions = [];
|
|
64
|
+
// Regular function declarations
|
|
65
|
+
const funcRegex = /(?:(export)\s+)?(?:(default)\s+)?(?:(async)\s+)?function\s+(\w+)\s*(?:<[^>]*>)?\s*\(([^)]*)\)(?:\s*:\s*([^\n{]+))?\s*\{/g;
|
|
66
|
+
let match;
|
|
67
|
+
while ((match = funcRegex.exec(content)) !== null) {
|
|
68
|
+
const isExported = !!match[1] || !!match[2];
|
|
69
|
+
const isAsync = !!match[3];
|
|
70
|
+
const name = match[4];
|
|
71
|
+
const paramsStr = match[5];
|
|
72
|
+
const returnType = match[6]?.trim() || null;
|
|
73
|
+
const body = extractBody(content, match.index + match[0].length - 1);
|
|
74
|
+
functions.push({
|
|
75
|
+
name,
|
|
76
|
+
type: "function",
|
|
77
|
+
isAsync,
|
|
78
|
+
isExported,
|
|
79
|
+
isStatic: false,
|
|
80
|
+
parameters: parseParameters(paramsStr),
|
|
81
|
+
returnType,
|
|
82
|
+
className: null,
|
|
83
|
+
decorators: [],
|
|
84
|
+
jsDoc: extractJsDoc(content, match.index),
|
|
85
|
+
complexity: calculateComplexity(body),
|
|
86
|
+
startLine: getLineNumber(content, match.index),
|
|
87
|
+
endLine: getLineNumber(content, match.index + match[0].length + body.length),
|
|
88
|
+
body,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
// Arrow functions assigned to const/let/var
|
|
92
|
+
const arrowRegex = /(?:(export)\s+)?(?:const|let|var)\s+(\w+)\s*(?::\s*[^=]+)?\s*=\s*(?:(async)\s+)?(?:\([^)]*\)|(\w+))\s*(?::\s*[^=]+)?\s*=>/g;
|
|
93
|
+
while ((match = arrowRegex.exec(content)) !== null) {
|
|
94
|
+
const isExported = !!match[1];
|
|
95
|
+
const name = match[2];
|
|
96
|
+
const isAsync = !!match[3];
|
|
97
|
+
// Find the arrow and extract parameters
|
|
98
|
+
const preArrow = content.substring(match.index, content.indexOf("=>", match.index));
|
|
99
|
+
const paramsMatch = preArrow.match(/\(([^)]*)\)/);
|
|
100
|
+
const paramsStr = paramsMatch ? paramsMatch[1] : match[4] || "";
|
|
101
|
+
const arrowIndex = content.indexOf("=>", match.index);
|
|
102
|
+
const afterArrow = content.substring(arrowIndex + 2).trim();
|
|
103
|
+
let body;
|
|
104
|
+
if (afterArrow.startsWith("{")) {
|
|
105
|
+
body = extractBody(content, arrowIndex + 2 + content.substring(arrowIndex + 2).indexOf("{"));
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
// Single expression
|
|
109
|
+
const endIndex = findExpressionEnd(content, arrowIndex + 2);
|
|
110
|
+
body = content.substring(arrowIndex + 2, endIndex).trim();
|
|
111
|
+
}
|
|
112
|
+
functions.push({
|
|
113
|
+
name,
|
|
114
|
+
type: "arrow",
|
|
115
|
+
isAsync,
|
|
116
|
+
isExported,
|
|
117
|
+
isStatic: false,
|
|
118
|
+
parameters: parseParameters(paramsStr),
|
|
119
|
+
returnType: null,
|
|
120
|
+
className: null,
|
|
121
|
+
decorators: [],
|
|
122
|
+
jsDoc: extractJsDoc(content, match.index),
|
|
123
|
+
complexity: calculateComplexity(body),
|
|
124
|
+
startLine: getLineNumber(content, match.index),
|
|
125
|
+
endLine: getLineNumber(content, match.index + body.length),
|
|
126
|
+
body,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return functions;
|
|
130
|
+
}
|
|
131
|
+
function extractClasses(content) {
|
|
132
|
+
const classes = [];
|
|
133
|
+
const classRegex = /(?:(export)\s+)?(?:(default)\s+)?class\s+(\w+)(?:\s+extends\s+(\w+))?(?:\s+implements\s+([^{]+))?\s*\{/g;
|
|
134
|
+
let match;
|
|
135
|
+
while ((match = classRegex.exec(content)) !== null) {
|
|
136
|
+
const isExported = !!match[1];
|
|
137
|
+
const name = match[3];
|
|
138
|
+
const extendsClass = match[4] || null;
|
|
139
|
+
const implementsStr = match[5]?.trim() || "";
|
|
140
|
+
const implementsInterfaces = implementsStr
|
|
141
|
+
? implementsStr.split(",").map((s) => s.trim())
|
|
142
|
+
: [];
|
|
143
|
+
const classBody = extractBody(content, match.index + match[0].length - 1);
|
|
144
|
+
const methods = extractMethods(classBody, name);
|
|
145
|
+
const constructorInfo = methods.find((m) => m.type === "constructor") || null;
|
|
146
|
+
const properties = extractClassProperties(classBody);
|
|
147
|
+
classes.push({
|
|
148
|
+
name,
|
|
149
|
+
isExported,
|
|
150
|
+
constructorInfo,
|
|
151
|
+
methods: methods.filter((m) => m.type !== "constructor"),
|
|
152
|
+
properties,
|
|
153
|
+
decorators: extractDecorators(content, match.index),
|
|
154
|
+
extendsClass,
|
|
155
|
+
implementsInterfaces,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return classes;
|
|
159
|
+
}
|
|
160
|
+
function extractMethods(classBody, className) {
|
|
161
|
+
const methods = [];
|
|
162
|
+
const methodRegex = /(?:(static)\s+)?(?:(async)\s+)?(\w+)\s*\(([^)]*)\)(?:\s*:\s*([^\n{]+))?\s*\{/g;
|
|
163
|
+
let match;
|
|
164
|
+
while ((match = methodRegex.exec(classBody)) !== null) {
|
|
165
|
+
const isStatic = !!match[1];
|
|
166
|
+
const isAsync = !!match[2];
|
|
167
|
+
const name = match[3];
|
|
168
|
+
const paramsStr = match[4];
|
|
169
|
+
const returnType = match[5]?.trim() || null;
|
|
170
|
+
if (name === "constructor") {
|
|
171
|
+
methods.push({
|
|
172
|
+
name: "constructor",
|
|
173
|
+
type: "constructor",
|
|
174
|
+
isAsync: false,
|
|
175
|
+
isExported: false,
|
|
176
|
+
isStatic: false,
|
|
177
|
+
parameters: parseParameters(paramsStr),
|
|
178
|
+
returnType: null,
|
|
179
|
+
className,
|
|
180
|
+
decorators: [],
|
|
181
|
+
jsDoc: null,
|
|
182
|
+
complexity: 1,
|
|
183
|
+
startLine: 0,
|
|
184
|
+
endLine: 0,
|
|
185
|
+
body: "",
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const body = extractBody(classBody, match.index + match[0].length - 1);
|
|
190
|
+
methods.push({
|
|
191
|
+
name,
|
|
192
|
+
type: "method",
|
|
193
|
+
isAsync,
|
|
194
|
+
isExported: false,
|
|
195
|
+
isStatic,
|
|
196
|
+
parameters: parseParameters(paramsStr),
|
|
197
|
+
returnType,
|
|
198
|
+
className,
|
|
199
|
+
decorators: [],
|
|
200
|
+
jsDoc: extractJsDoc(classBody, match.index),
|
|
201
|
+
complexity: calculateComplexity(body),
|
|
202
|
+
startLine: 0,
|
|
203
|
+
endLine: 0,
|
|
204
|
+
body,
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return methods;
|
|
209
|
+
}
|
|
210
|
+
function parseParameters(paramsStr) {
|
|
211
|
+
if (!paramsStr.trim())
|
|
212
|
+
return [];
|
|
213
|
+
const params = [];
|
|
214
|
+
let depth = 0;
|
|
215
|
+
let current = "";
|
|
216
|
+
for (const char of paramsStr) {
|
|
217
|
+
if (char === "(" || char === "<" || char === "{" || char === "[")
|
|
218
|
+
depth++;
|
|
219
|
+
if (char === ")" || char === ">" || char === "}" || char === "]")
|
|
220
|
+
depth--;
|
|
221
|
+
if (char === "," && depth === 0) {
|
|
222
|
+
params.push(parseOneParameter(current.trim()));
|
|
223
|
+
current = "";
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
current += char;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (current.trim()) {
|
|
230
|
+
params.push(parseOneParameter(current.trim()));
|
|
231
|
+
}
|
|
232
|
+
return params;
|
|
233
|
+
}
|
|
234
|
+
function parseOneParameter(param) {
|
|
235
|
+
const isRest = param.startsWith("...");
|
|
236
|
+
if (isRest)
|
|
237
|
+
param = param.substring(3);
|
|
238
|
+
let defaultValue = null;
|
|
239
|
+
const defaultMatch = param.match(/\s*=\s*(.+)$/);
|
|
240
|
+
if (defaultMatch) {
|
|
241
|
+
defaultValue = defaultMatch[1].trim();
|
|
242
|
+
param = param.substring(0, param.indexOf("=")).trim();
|
|
243
|
+
}
|
|
244
|
+
const isOptional = param.includes("?");
|
|
245
|
+
param = param.replace("?", "");
|
|
246
|
+
let type = null;
|
|
247
|
+
const typeMatch = param.match(/:\s*(.+)$/);
|
|
248
|
+
if (typeMatch) {
|
|
249
|
+
type = typeMatch[1].trim();
|
|
250
|
+
param = param.substring(0, param.indexOf(":")).trim();
|
|
251
|
+
}
|
|
252
|
+
return {
|
|
253
|
+
name: param.trim(),
|
|
254
|
+
type,
|
|
255
|
+
isOptional: isOptional || defaultValue !== null,
|
|
256
|
+
defaultValue,
|
|
257
|
+
isRest,
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function extractBody(content, openBraceIndex) {
|
|
261
|
+
let depth = 0;
|
|
262
|
+
let i = openBraceIndex;
|
|
263
|
+
while (i < content.length) {
|
|
264
|
+
if (content[i] === "{")
|
|
265
|
+
depth++;
|
|
266
|
+
if (content[i] === "}") {
|
|
267
|
+
depth--;
|
|
268
|
+
if (depth === 0) {
|
|
269
|
+
return content.substring(openBraceIndex + 1, i);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
i++;
|
|
273
|
+
}
|
|
274
|
+
return content.substring(openBraceIndex + 1);
|
|
275
|
+
}
|
|
276
|
+
function findExpressionEnd(content, startIndex) {
|
|
277
|
+
let i = startIndex;
|
|
278
|
+
let depth = 0;
|
|
279
|
+
while (i < content.length) {
|
|
280
|
+
const char = content[i];
|
|
281
|
+
if (char === "(" || char === "[" || char === "{")
|
|
282
|
+
depth++;
|
|
283
|
+
if (char === ")" || char === "]" || char === "}") {
|
|
284
|
+
if (depth === 0)
|
|
285
|
+
return i;
|
|
286
|
+
depth--;
|
|
287
|
+
}
|
|
288
|
+
if ((char === ";" || char === "\n") && depth === 0)
|
|
289
|
+
return i;
|
|
290
|
+
i++;
|
|
291
|
+
}
|
|
292
|
+
return content.length;
|
|
293
|
+
}
|
|
294
|
+
function extractJsDoc(content, functionIndex) {
|
|
295
|
+
const before = content.substring(0, functionIndex).trimEnd();
|
|
296
|
+
const jsDocMatch = before.match(/\/\*\*[\s\S]*?\*\/\s*$/);
|
|
297
|
+
return jsDocMatch ? jsDocMatch[0] : null;
|
|
298
|
+
}
|
|
299
|
+
function extractDecorators(content, classIndex) {
|
|
300
|
+
const before = content.substring(0, classIndex).trimEnd();
|
|
301
|
+
const decorators = [];
|
|
302
|
+
const decoratorRegex = /@(\w+)(?:\([^)]*\))?\s*$/gm;
|
|
303
|
+
let match;
|
|
304
|
+
while ((match = decoratorRegex.exec(before)) !== null) {
|
|
305
|
+
decorators.push(match[1]);
|
|
306
|
+
}
|
|
307
|
+
return decorators;
|
|
308
|
+
}
|
|
309
|
+
function extractClassProperties(classBody) {
|
|
310
|
+
const properties = [];
|
|
311
|
+
const propRegex = /(?:(private|protected|public)\s+)?(?:(static)\s+)?(?:(readonly)\s+)?(\w+)(?:\?)?(?::\s*([^;=\n]+))?(?:\s*=\s*([^;\n]+))?;/g;
|
|
312
|
+
let match;
|
|
313
|
+
while ((match = propRegex.exec(classBody)) !== null) {
|
|
314
|
+
const visibility = match[1] || "public";
|
|
315
|
+
const name = match[4];
|
|
316
|
+
if (["if", "else", "return", "const", "let", "var", "for", "while"].includes(name))
|
|
317
|
+
continue;
|
|
318
|
+
properties.push({
|
|
319
|
+
name,
|
|
320
|
+
type: match[5]?.trim() || null,
|
|
321
|
+
isPrivate: visibility === "private",
|
|
322
|
+
isStatic: !!match[2],
|
|
323
|
+
defaultValue: match[6]?.trim() || null,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
return properties;
|
|
327
|
+
}
|
|
328
|
+
function extractConstants(content) {
|
|
329
|
+
const constants = [];
|
|
330
|
+
const constRegex = /(?:(export)\s+)?const\s+(\w+)(?::\s*([^=]+))?\s*=\s*([^;\n]+)/g;
|
|
331
|
+
let match;
|
|
332
|
+
while ((match = constRegex.exec(content)) !== null) {
|
|
333
|
+
const name = match[2];
|
|
334
|
+
// Skip if it's a function (arrow function)
|
|
335
|
+
const value = match[4].trim();
|
|
336
|
+
if (value.includes("=>") || value.startsWith("function"))
|
|
337
|
+
continue;
|
|
338
|
+
constants.push({
|
|
339
|
+
name,
|
|
340
|
+
type: match[3]?.trim() || null,
|
|
341
|
+
value,
|
|
342
|
+
isExported: !!match[1],
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return constants;
|
|
346
|
+
}
|
|
347
|
+
function extractInterfaces(content) {
|
|
348
|
+
const interfaces = [];
|
|
349
|
+
const interfaceRegex = /(?:(export)\s+)?interface\s+(\w+)(?:\s+extends\s+[^{]+)?\s*\{/g;
|
|
350
|
+
let match;
|
|
351
|
+
while ((match = interfaceRegex.exec(content)) !== null) {
|
|
352
|
+
interfaces.push({
|
|
353
|
+
name: match[2],
|
|
354
|
+
properties: [],
|
|
355
|
+
isExported: !!match[1],
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
return interfaces;
|
|
359
|
+
}
|
|
360
|
+
function calculateComplexity(body) {
|
|
361
|
+
let complexity = 1;
|
|
362
|
+
const complexityKeywords = [
|
|
363
|
+
/\bif\s*\(/g,
|
|
364
|
+
/\belse\s+if\s*\(/g,
|
|
365
|
+
/\bfor\s*\(/g,
|
|
366
|
+
/\bwhile\s*\(/g,
|
|
367
|
+
/\bswitch\s*\(/g,
|
|
368
|
+
/\bcase\s+/g,
|
|
369
|
+
/\bcatch\s*\(/g,
|
|
370
|
+
/\?\?/g,
|
|
371
|
+
/\?\./g,
|
|
372
|
+
/&&/g,
|
|
373
|
+
/\|\|/g,
|
|
374
|
+
/\?[^.?]/g,
|
|
375
|
+
];
|
|
376
|
+
for (const regex of complexityKeywords) {
|
|
377
|
+
const matches = body.match(regex);
|
|
378
|
+
if (matches)
|
|
379
|
+
complexity += matches.length;
|
|
380
|
+
}
|
|
381
|
+
return complexity;
|
|
382
|
+
}
|
|
383
|
+
function getLineNumber(content, index) {
|
|
384
|
+
return content.substring(0, index).split("\n").length;
|
|
385
|
+
}
|
|
386
|
+
//# sourceMappingURL=typescript-analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typescript-analyzer.js","sourceRoot":"","sources":["../../src/analyzers/typescript-analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAWzB,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IACpD,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,I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CAAC,KAAK,IAAI,EAAE,CAAC;QACvD,UAAU,CAAC,IAAI,CAAC;YACd,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;YACd,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;SACvB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAY;IACvC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,MAAM,kBAAkB,GAAG;QACzB,YAAY;QACZ,mBAAmB;QACnB,aAAa;QACb,eAAe;QACf,gBAAgB;QAChB,YAAY;QACZ,eAAe;QACf,OAAO;QACP,OAAO;QACP,KAAK;QACL,OAAO;QACP,UAAU;KACX,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,kBAAkB,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,OAAO;YAAE,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAC5C,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,aAAa,CAAC,OAAe,EAAE,KAAa;IACnD,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;AACxD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FileAnalysis } from "../models/function-info.js";
|
|
2
|
+
import { TestSuite } from "../models/test-case.js";
|
|
3
|
+
import { GenerationConfig, ProgrammingLanguage } from "../models/project-info.js";
|
|
4
|
+
export declare function generateTestSuite(analysis: FileAnalysis, language: ProgrammingLanguage, config: GenerationConfig): TestSuite;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
export function generateTestSuite(analysis, language, config) {
|
|
2
|
+
const describes = [];
|
|
3
|
+
// Generate tests for standalone functions
|
|
4
|
+
for (const func of analysis.functions) {
|
|
5
|
+
if (!func.isExported && !config.coverageTargets.functions)
|
|
6
|
+
continue;
|
|
7
|
+
const testCases = generateTestCasesForFunction(func, config);
|
|
8
|
+
describes.push({
|
|
9
|
+
name: func.name,
|
|
10
|
+
testCases,
|
|
11
|
+
nestedDescribes: [],
|
|
12
|
+
beforeEach: null,
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
// Generate tests for classes
|
|
16
|
+
if (config.coverageTargets.classes) {
|
|
17
|
+
for (const cls of analysis.classes) {
|
|
18
|
+
const classDescribe = generateTestsForClass(cls, config);
|
|
19
|
+
describes.push(classDescribe);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// Generate import statements
|
|
23
|
+
const imports = generateImportStatements(analysis, language, config);
|
|
24
|
+
return {
|
|
25
|
+
sourceFile: analysis.filePath,
|
|
26
|
+
testFile: "",
|
|
27
|
+
imports,
|
|
28
|
+
beforeEach: null,
|
|
29
|
+
afterEach: null,
|
|
30
|
+
describes,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function generateTestCasesForFunction(func, config) {
|
|
34
|
+
const testCases = [];
|
|
35
|
+
// Basic positive test case
|
|
36
|
+
testCases.push({
|
|
37
|
+
name: `should ${func.name} correctly with valid input`,
|
|
38
|
+
description: `Tests ${func.name} with standard valid input`,
|
|
39
|
+
type: "positive",
|
|
40
|
+
arrangement: generateArrangement(func),
|
|
41
|
+
action: generateAction(func),
|
|
42
|
+
assertion: generateAssertion(func),
|
|
43
|
+
isAsync: func.isAsync,
|
|
44
|
+
targetFunction: func.name,
|
|
45
|
+
targetClass: func.className,
|
|
46
|
+
mockDependencies: [],
|
|
47
|
+
});
|
|
48
|
+
// Parameter-based tests
|
|
49
|
+
if (func.parameters.length > 0) {
|
|
50
|
+
// Test with each parameter having edge values
|
|
51
|
+
for (const param of func.parameters) {
|
|
52
|
+
if (config.coverageTargets.edgeCases) {
|
|
53
|
+
testCases.push(...generateEdgeCaseTests(func, param));
|
|
54
|
+
}
|
|
55
|
+
if (config.coverageTargets.errorHandling) {
|
|
56
|
+
testCases.push(...generateErrorHandlingTests(func, param));
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Test with no arguments if all params are optional
|
|
61
|
+
if (func.parameters.every((p) => p.isOptional)) {
|
|
62
|
+
testCases.push({
|
|
63
|
+
name: `should handle ${func.name} called with no arguments`,
|
|
64
|
+
description: `Tests ${func.name} with no arguments when all params are optional`,
|
|
65
|
+
type: "edge_case",
|
|
66
|
+
arrangement: "// No arrangement needed - testing with no arguments",
|
|
67
|
+
action: func.isAsync
|
|
68
|
+
? `const result = await ${func.name}();`
|
|
69
|
+
: `const result = ${func.name}();`,
|
|
70
|
+
assertion: "expect(result).toBeDefined();",
|
|
71
|
+
isAsync: func.isAsync,
|
|
72
|
+
targetFunction: func.name,
|
|
73
|
+
targetClass: func.className,
|
|
74
|
+
mockDependencies: [],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
// Async-specific tests
|
|
78
|
+
if (func.isAsync) {
|
|
79
|
+
testCases.push({
|
|
80
|
+
name: `should handle ${func.name} rejection/error`,
|
|
81
|
+
description: `Tests that ${func.name} properly handles async errors`,
|
|
82
|
+
type: "error_handling",
|
|
83
|
+
arrangement: "// Setup to trigger error condition",
|
|
84
|
+
action: `const promise = ${func.name}(${generateInvalidArgs(func)});`,
|
|
85
|
+
assertion: `await expect(promise).rejects.toThrow();`,
|
|
86
|
+
isAsync: true,
|
|
87
|
+
targetFunction: func.name,
|
|
88
|
+
targetClass: func.className,
|
|
89
|
+
mockDependencies: [],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
// Return type specific tests
|
|
93
|
+
if (func.returnType) {
|
|
94
|
+
testCases.push(...generateReturnTypeTests(func));
|
|
95
|
+
}
|
|
96
|
+
return testCases;
|
|
97
|
+
}
|
|
98
|
+
function generateTestsForClass(cls, config) {
|
|
99
|
+
const nestedDescribes = [];
|
|
100
|
+
const classCases = [];
|
|
101
|
+
// Constructor tests
|
|
102
|
+
if (cls.constructorInfo) {
|
|
103
|
+
classCases.push({
|
|
104
|
+
name: "should create an instance",
|
|
105
|
+
description: `Tests that ${cls.name} can be instantiated`,
|
|
106
|
+
type: "positive",
|
|
107
|
+
arrangement: generateConstructorArrangement(cls),
|
|
108
|
+
action: `const instance = new ${cls.name}(${generateConstructorArgs(cls)});`,
|
|
109
|
+
assertion: `expect(instance).toBeInstanceOf(${cls.name});`,
|
|
110
|
+
isAsync: false,
|
|
111
|
+
targetFunction: "constructor",
|
|
112
|
+
targetClass: cls.name,
|
|
113
|
+
mockDependencies: [],
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// Method tests
|
|
117
|
+
for (const method of cls.methods) {
|
|
118
|
+
if (method.name.startsWith("_") && method.name !== "__init__")
|
|
119
|
+
continue;
|
|
120
|
+
const methodDescribe = {
|
|
121
|
+
name: method.name,
|
|
122
|
+
testCases: generateTestCasesForFunction({ ...method, className: cls.name }, config),
|
|
123
|
+
nestedDescribes: [],
|
|
124
|
+
beforeEach: `const instance = new ${cls.name}(${generateConstructorArgs(cls)});`,
|
|
125
|
+
};
|
|
126
|
+
nestedDescribes.push(methodDescribe);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
name: cls.name,
|
|
130
|
+
testCases: classCases,
|
|
131
|
+
nestedDescribes,
|
|
132
|
+
beforeEach: null,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function generateEdgeCaseTests(func, param) {
|
|
136
|
+
const tests = [];
|
|
137
|
+
const paramType = param.type?.toLowerCase() || "any";
|
|
138
|
+
if (paramType.includes("string") ||
|
|
139
|
+
paramType === "any" ||
|
|
140
|
+
!param.type) {
|
|
141
|
+
tests.push({
|
|
142
|
+
name: `should handle ${func.name} with empty string for ${param.name}`,
|
|
143
|
+
description: `Edge case: empty string for ${param.name}`,
|
|
144
|
+
type: "edge_case",
|
|
145
|
+
arrangement: generateArrangementWithOverride(func, param.name, '""'),
|
|
146
|
+
action: generateActionWithOverride(func, param.name, '""'),
|
|
147
|
+
assertion: "expect(result).toBeDefined();",
|
|
148
|
+
isAsync: func.isAsync,
|
|
149
|
+
targetFunction: func.name,
|
|
150
|
+
targetClass: func.className,
|
|
151
|
+
mockDependencies: [],
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
if (paramType.includes("number") ||
|
|
155
|
+
paramType === "any" ||
|
|
156
|
+
!param.type) {
|
|
157
|
+
tests.push({
|
|
158
|
+
name: `should handle ${func.name} with zero for ${param.name}`,
|
|
159
|
+
description: `Edge case: zero value for ${param.name}`,
|
|
160
|
+
type: "boundary",
|
|
161
|
+
arrangement: generateArrangementWithOverride(func, param.name, "0"),
|
|
162
|
+
action: generateActionWithOverride(func, param.name, "0"),
|
|
163
|
+
assertion: "expect(result).toBeDefined();",
|
|
164
|
+
isAsync: func.isAsync,
|
|
165
|
+
targetFunction: func.name,
|
|
166
|
+
targetClass: func.className,
|
|
167
|
+
mockDependencies: [],
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
return tests;
|
|
171
|
+
}
|
|
172
|
+
function generateErrorHandlingTests(func, param) {
|
|
173
|
+
const tests = [];
|
|
174
|
+
tests.push({
|
|
175
|
+
name: `should handle ${func.name} with null/undefined for ${param.name}`,
|
|
176
|
+
description: `Error handling: null or undefined for ${param.name}`,
|
|
177
|
+
type: "error_handling",
|
|
178
|
+
arrangement: generateArrangementWithOverride(func, param.name, "null"),
|
|
179
|
+
action: generateActionWithOverride(func, param.name, "null"),
|
|
180
|
+
assertion: "expect(result).toBeDefined();",
|
|
181
|
+
isAsync: func.isAsync,
|
|
182
|
+
targetFunction: func.name,
|
|
183
|
+
targetClass: func.className,
|
|
184
|
+
mockDependencies: [],
|
|
185
|
+
});
|
|
186
|
+
return tests;
|
|
187
|
+
}
|
|
188
|
+
function generateReturnTypeTests(_func) {
|
|
189
|
+
return [];
|
|
190
|
+
}
|
|
191
|
+
function generateArrangement(func) {
|
|
192
|
+
const args = func.parameters.map((p) => p.defaultValue ?? "undefined").join(", ");
|
|
193
|
+
return `// Arrange\nconst result = ${func.isAsync ? "await " : ""}${func.name}(${args});`;
|
|
194
|
+
}
|
|
195
|
+
function generateAction(func) {
|
|
196
|
+
const args = func.parameters.map((p) => p.name + ": " + (p.defaultValue ?? "undefined")).join(", ");
|
|
197
|
+
return func.isAsync ? `const result = await ${func.name}(${args});` : `const result = ${func.name}(${args});`;
|
|
198
|
+
}
|
|
199
|
+
function generateAssertion(_func) {
|
|
200
|
+
return "expect(result).toBeDefined();";
|
|
201
|
+
}
|
|
202
|
+
function generateInvalidArgs(func) {
|
|
203
|
+
return func.parameters.map((_p) => "undefined").join(", ");
|
|
204
|
+
}
|
|
205
|
+
function generateConstructorArrangement(_cls) {
|
|
206
|
+
return "// Arrange";
|
|
207
|
+
}
|
|
208
|
+
function generateConstructorArgs(cls) {
|
|
209
|
+
return (cls.constructorInfo?.parameters ?? []).map((p) => p.defaultValue ?? "undefined").join(", ");
|
|
210
|
+
}
|
|
211
|
+
function generateArrangementWithOverride(func, paramName, value) {
|
|
212
|
+
const args = func.parameters.map((p) => (p.name === paramName ? value : p.defaultValue ?? "undefined")).join(", ");
|
|
213
|
+
return `// Arrange with ${paramName}=${value}\nconst result = ${func.isAsync ? "await " : ""}${func.name}(${args});`;
|
|
214
|
+
}
|
|
215
|
+
function generateActionWithOverride(func, paramName, value) {
|
|
216
|
+
const args = func.parameters.map((p) => (p.name === paramName ? value : p.defaultValue ?? "undefined")).join(", ");
|
|
217
|
+
return func.isAsync ? `const result = await ${func.name}(${args});` : `const result = ${func.name}(${args});`;
|
|
218
|
+
}
|
|
219
|
+
function generateImportStatements(analysis, _language, _config) {
|
|
220
|
+
const base = analysis.filePath.replace(/\.(ts|tsx|js|jsx)$/, "").split("/").pop() ?? "module";
|
|
221
|
+
return ["import { } from './" + base + "';"];
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=test-generator.js.map
|
|
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O,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC;AACvH,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAS,EAAE,SAAiB,EAAE,KAAa;IAC7E,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACxH,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,wBAAwB,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC,CAAC,CAAC,kBAAkB,IAAI,CAAC,IAAI,IAAI,IAAI,IAAI,CAAC;AAChH,CAAC;AAED,SAAS,wBAAwB,CAAC,QAAsB,EAAE,SAA8B,EAAE,OAAyB;IACjH,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,IAAI,QAAQ,CAAC;IAC9F,OAAO,CAAC,qBAAqB,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createMCPServer } from "./server.js";
|
|
3
|
+
async function main() {
|
|
4
|
+
const server = createMCPServer();
|
|
5
|
+
const transport = await import("@modelcontextprotocol/sdk/server/stdio.js");
|
|
6
|
+
const stdioTransport = new transport.StdioServerTransport();
|
|
7
|
+
await server.connect(stdioTransport);
|
|
8
|
+
console.error("MCP Test Generator Server running on stdio");
|
|
9
|
+
}
|
|
10
|
+
main().catch((error) => {
|
|
11
|
+
console.error("Fatal error:", error);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
});
|
|
14
|
+
//# sourceMappingURL=index.js.map
|