@skyramp/mcp 0.0.12 → 0.0.14
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 +2 -2
- package/build/tools/executeSkyrampTestTool.js +1 -1
- package/build/tools/generateE2ERestTool.js +3 -0
- package/build/tools/generateFuzzRestTool.js +1 -0
- package/build/tools/generateIntegrationRestTool.js +3 -0
- package/build/tools/generateLoadRestTool.js +3 -0
- package/build/utils/modularization-prompts.js +3 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ Add the following configuration. For more information, read the [Cursor MCP docu
|
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
[](https://cursor.com/install-mcp?name=skyramp-mcp&config=eyJjb21tYW5kIjoibnB4IC15IEBza3lyYW1wL21jcEBsYXRlc3QifQ==)
|
|
86
|
+
[](https://cursor.com/en/install-mcp?name=skyramp-mcp&config=eyJjb21tYW5kIjoibnB4IC15IEBza3lyYW1wL21jcEBsYXRlc3QifQ==)
|
|
87
87
|
|
|
88
88
|
### Note: To pull latest changes restart the MCP server
|
|
89
89
|
|
|
@@ -120,7 +120,7 @@ On Windows, you might need to use this alternative configuration:
|
|
|
120
120
|
}
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
[](https://cursor.com/install-mcp?name=skyramp-mcp&config=eyJjb21tYW5kIjoiY21kIC9rIG5weCAteSBAc2t5cmFtcC9tY3BAbGF0ZXN0In0=)
|
|
123
|
+
[](https://cursor.com/en/install-mcp?name=skyramp-mcp&config=eyJjb21tYW5kIjoiY21kIC9rIG5weCAteSBAc2t5cmFtcC9tY3BAbGF0ZXN0In0=)
|
|
124
124
|
|
|
125
125
|
## Available tools
|
|
126
126
|
|
|
@@ -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.4";
|
|
60
60
|
// Use path.basename for safer filename extraction
|
|
61
61
|
const filename = path.basename(params.testFile);
|
|
62
62
|
if (!filename) {
|
|
@@ -19,6 +19,9 @@ export class E2ETestService extends TestGenerationService {
|
|
|
19
19
|
playwrightInput: params.playwrightInput,
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
async handleApiAnalysis(params, generateOptions) {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
26
|
export function registerE2ETestTool(server) {
|
|
24
27
|
server.registerTool("skyramp_e2e_test_generation", {
|
|
@@ -5,6 +5,7 @@ const fuzzTestSchema = {
|
|
|
5
5
|
...baseTestSchema,
|
|
6
6
|
responseData: z
|
|
7
7
|
.string()
|
|
8
|
+
.default("")
|
|
8
9
|
.describe("Sample response body data, provided either as an inline JSON/YAML string or as an absolute file path prefixed with '@' (e.g., @/absolute/path/to/file)"),
|
|
9
10
|
};
|
|
10
11
|
export class FuzzTestService extends TestGenerationService {
|
|
@@ -18,6 +18,9 @@ export class IntegrationTestService extends TestGenerationService {
|
|
|
18
18
|
playwrightInput: params.playwrightInput,
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
+
async handleApiAnalysis(params, generateOptions) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
21
24
|
}
|
|
22
25
|
export function registerIntegrationTestTool(server) {
|
|
23
26
|
server.registerTool("skyramp_integration_test_generation", {
|
|
@@ -47,6 +47,9 @@ export class LoadTestService extends TestGenerationService {
|
|
|
47
47
|
loadTargetRPS: params.loadTargetRPS,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
+
async handleApiAnalysis(params, generateOptions) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
50
53
|
}
|
|
51
54
|
export function registerLoadTestTool(server) {
|
|
52
55
|
server.registerTool("skyramp_load_test_generation", {
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
export function getModularizationPrompt() {
|
|
2
2
|
return `
|
|
3
3
|
**IMPORTANT: Now please modularize the code by**
|
|
4
|
-
|
|
5
|
-
1. Group related lines logically (e.g., login steps together) to improve readability and parameterize the test function(s) with meaningful parameters to make it more flexible.
|
|
6
|
-
2. Parameterize the test function(s) with meaningful parameters to make it more flexible. Preserve the original order of code lines within each function
|
|
7
|
-
3. Do not change or remove any existing lines of code, variable names, function names, or function structures.
|
|
8
|
-
4. Only extract reusable logical sections into helper functions or parameterized structures where applicable.
|
|
9
|
-
5. SEARCH REPOSITORY FOR CODE THAT CAN BE REUSED AND USE IT. WITHOUT BREAKING NEW OR EXISTING TESTS/FUNCTIONS/CODE.
|
|
10
|
-
6. Do not create any new test cases or a new modular file but only helper functions with modularization done in the same file.
|
|
11
|
-
7. Make sure the logic is same and the test works as expected.
|
|
12
|
-
8. Do not add any new logic or classes or any other files.
|
|
4
|
+
Please modularize and parameterize the test function(s) in the following code, modularize each functionality done by user into clear separate logical groups to make it more readable, and parameterize the modularized function(s) with necessary meaningful parameters to make it more flexible, making sure to keep the order of code lines, existing variable names, existing function names, existing function structures as same, without altering or removing any existing code lines. Keep the skyramp command comments in the beginning of the code. Respond with the complete, modularized code only. DO NOT ADD DEPENDENCY INSTRUCTIONS IN THE CODE.
|
|
13
5
|
|
|
14
6
|
Please refactor the code with these modularization principles. Respond with the complete, modularized code only.
|
|
7
|
+
|
|
8
|
+
|
|
15
9
|
`;
|
|
16
10
|
}
|