UNPKG

@skyramp/mcp

Version:

Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution

70 lines (64 loc) 1.87 kB
export function getLanguageSteps(params) { const { language, testType } = params; switch (language) { case "python": let pythonSteps = ` # Install skyramp dependency pip3 install skyramp `; // e2e and ui tests if (testType === "e2e" || testType === "ui") { pythonSteps += ` # Install playwright dependencies pip3 install pytest-playwright # Execute the test file python3 -m pytest --browser chromium <test-file>.py `; } // framework pytest pythonSteps += ` # Install pytest dependency pip3 install pytest # Execute test file python3 -m pytest <test-file>.py `; // robot framework pythonSteps += ` # Install robotframework dependency pip3 install robotframework # Execution of test file python3 -m robot <robot-file>.robot `; return pythonSteps; case "javascript": return ` # install dependencies for package.json npm install @skyramp/skyramp @playwright/test # Execution of test file npx playwright test <test-file>.spec.js --reporter=list `; case "typescript": return ` # install dependencies for package.json npm install @skyramp/skyramp @playwright/test # Execution of test file npx playwright test <test-file>.spec.ts --reporter=list `; case "java": return ` # Prerequisites # Compile the test file javac -cp "./lib/*" -d target <test-file>.java # Execution of test file 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 ""; } }