@skyramp/mcp
Version:
Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution
70 lines (64 loc) • 1.87 kB
JavaScript
export function getLanguageSteps(params) {
const { language, testType } = params;
switch (language) {
case "python":
let pythonSteps = `
pip3 install skyramp
`;
// e2e and ui tests
if (testType === "e2e" || testType === "ui") {
pythonSteps += `
pip3 install pytest-playwright
python3 -m pytest --browser chromium <test-file>.py
`;
}
// framework pytest
pythonSteps += `
pip3 install pytest
python3 -m pytest <test-file>.py
`;
// robot framework
pythonSteps += `
pip3 install robotframework
python3 -m robot <robot-file>.robot
`;
return pythonSteps;
case "javascript":
return `
npm install @skyramp/skyramp @playwright/test
npx playwright test <test-file>.spec.js --reporter=list
`;
case "typescript":
return `
npm install @skyramp/skyramp @playwright/test
npx playwright test <test-file>.spec.ts --reporter=list
`;
case "java":
return `
javac -cp "./lib/*" -d target <test-file>.java
JUNIT_PLATFORM_VER="1.9.3"
classpath="target:$(echo ./lib/*.jar | tr ' ' ':')"
java -jar "./lib/junit-platform-console-standalone-\${JUNIT_PLATFORM_VER}.jar" \\
--classpath "\$classpath" \\
--include-engine=junit-jupiter \\
--select-class=<test-file> \\
--reports-dir=target/test-results
`;
default:
return "";
}
}