@skyramp/mcp 0.0.14 → 0.0.15
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.
|
@@ -33,6 +33,7 @@ export class TestGenerationService {
|
|
|
33
33
|
const languageSteps = getLanguageSteps({
|
|
34
34
|
language: params.language || "",
|
|
35
35
|
testType: params.testType,
|
|
36
|
+
framework: params.framework,
|
|
36
37
|
});
|
|
37
38
|
return {
|
|
38
39
|
content: [
|
|
@@ -43,10 +44,9 @@ export class TestGenerationService {
|
|
|
43
44
|
: "Generated the test and DO NOT MODULARIZE THE CODE"}
|
|
44
45
|
${result} ${shouldModularize ? getModularizationPrompt() : ""}
|
|
45
46
|
${languageSteps}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Authentication: Please provide me with your authentication token (by default we assume a Bearer Token). If you don't require any token for your service please just say: 'No token required'`,
|
|
47
|
+
- Notify the user that they can also use **Execute with Skyramp** tool to run the test. If this is your first test you are trying to execute with Skyramp, it may take a little bit longer than usual.
|
|
48
|
+
- Before I can execute the test for you, I need to confirm the following information:
|
|
49
|
+
Authentication: Please provide me with your authentication token (by default we assume a Bearer Token). If you don't require any token for your service please just say: 'No token required'`,
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
isError: false,
|
|
@@ -131,14 +131,14 @@ export class TestGenerationService {
|
|
|
131
131
|
throw new Error(`Test generation failed: ${result}`);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
return
|
|
134
|
+
return `
|
|
135
|
+
**Generated Test Details:**
|
|
135
136
|
- Test Type: ${this.getTestType()}
|
|
136
137
|
- Output Directory: ${generateOptions.outputDir}
|
|
137
138
|
- Language: ${generateOptions.language}
|
|
138
139
|
- Framework: ${generateOptions.framework}
|
|
139
140
|
|
|
140
|
-
${result}
|
|
141
|
-
`;
|
|
141
|
+
${result}`;
|
|
142
142
|
}
|
|
143
143
|
catch (error) {
|
|
144
144
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -56,7 +56,7 @@ For detailed documentation visit: https://www.skyramp.dev/docs/quickstart`,
|
|
|
56
56
|
},
|
|
57
57
|
}, async (params) => {
|
|
58
58
|
var docker = new Docker();
|
|
59
|
-
var image = "public.ecr.aws/skyramp/rampup/runner:mcp-v0.0.
|
|
59
|
+
var image = "public.ecr.aws/skyramp/rampup/runner:mcp-v0.0.5";
|
|
60
60
|
// Use path.basename for safer filename extraction
|
|
61
61
|
const filename = path.basename(params.testFile);
|
|
62
62
|
if (!filename) {
|
|
@@ -16,21 +16,25 @@ python3 -m pytest --browser chromium <test-file>.py
|
|
|
16
16
|
`;
|
|
17
17
|
}
|
|
18
18
|
// framework pytest
|
|
19
|
-
|
|
19
|
+
if (params.framework === "pytest") {
|
|
20
|
+
pythonSteps += `
|
|
20
21
|
# Install pytest dependency
|
|
21
22
|
pip3 install pytest
|
|
22
23
|
|
|
23
24
|
# Execute test file
|
|
24
25
|
python3 -m pytest <test-file>.py
|
|
25
26
|
`;
|
|
27
|
+
}
|
|
26
28
|
// robot framework
|
|
27
|
-
|
|
29
|
+
if (params.framework === "robot") {
|
|
30
|
+
pythonSteps += `
|
|
28
31
|
# Install robotframework dependency
|
|
29
32
|
pip3 install robotframework
|
|
30
33
|
|
|
31
34
|
# Execution of test file
|
|
32
35
|
python3 -m robot <robot-file>.robot
|
|
33
36
|
`;
|
|
37
|
+
}
|
|
34
38
|
return pythonSteps;
|
|
35
39
|
case "javascript":
|
|
36
40
|
return `
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
export function getModularizationPrompt() {
|
|
2
2
|
return `
|
|
3
|
-
**IMPORTANT:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Please refactor the code with these modularization principles. Respond with the complete, modularized code only.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
`;
|
|
3
|
+
**IMPORTANT NEXT STEPS: Please refactor the code with these modularization principles. Respond with the complete, modularized code only in the same file.**
|
|
4
|
+
Think carefully and only take action on the specific task I have given you with the most concise and elegant solution that changes as little code as possible. Make the code modular WITHOUT ANY ERRORS by creating helper functions with parameterized variables for flexibility without creating any new test cases or new classes, and make sure the logic is the same before and after modularization. If functions are already modularized (like breakpoint_section_0, breakpoint_section_1), then rename them with meaningful names and use them. Make sure not to delete any existing lines of code because that could cause errors in test execution. The diff should be minimal. DO NOT ADD DEPENDENCY INSTRUCTIONS IN THE CODE.`;
|
|
10
5
|
}
|