@skyramp/mcp
Version:
Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution
38 lines (35 loc) • 1.57 kB
JavaScript
import { baseTestSchema } from "../types/TestTypes.js";
import { TestGenerationService, } from "../services/TestGenerationService.js";
import z from "zod";
// Concrete implementations for each test type
export class SmokeTestService extends TestGenerationService {
getTestType() {
return "smoke";
}
buildGenerationOptions(params) {
return super.buildBaseGenerationOptions(params);
}
}
const smokeTestSchema = {
...baseTestSchema,
endpointURL: z
.string()
.describe(baseTestSchema.endpointURL.description || "The endpoint URL to test"),
apiSchema: z
.string()
.describe(baseTestSchema.apiSchema.description || "The OpenAPI schema to test"),
};
export function registerSmokeTestTool(server) {
server.registerTool("skyramp_smoke_test_generation", {
description: `Generate a smoke test using Skyramp's deterministic test generation platform.
Smoke testing is a preliminary check used to verify that an endpoint is accessible and returns a valid response. Smoke tests are useful for quickly identifying critical defects after significant changes. They provide rapid validation for basic functionality verification and endpoint accessibility testing.
For detailed documentation visit: https://www.skyramp.dev/docs/smoke-test`,
inputSchema: smokeTestSchema,
annotations: {
keywords: ["smoke test", "quick test"],
},
}, async (params) => {
const service = new SmokeTestService();
return await service.generateTest(params);
});
}