list_tests
Retrieve and filter test runs from the QIT CLI for WordPress/WooCommerce plugins. Use status, test type, or extension filters to find specific results.
Instructions
List test runs with optional filters. Default per_page is 10 to reduce response size.
⚠️ QIT CLI not detected. QIT CLI not found. Please install it using one of these methods:
Via Composer (recommended): composer require woocommerce/qit-cli --dev
Set QIT_CLI_PATH environment variable: export QIT_CLI_PATH=/path/to/qit
Ensure 'qit' is available in your system PATH
For more information, visit: https://github.com/woocommerce/qit-cli
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by test status | |
| test_type | No | Filter by test type (e.g., 'security', 'e2e') | |
| extension | No | Filter by extension slug | |
| per_page | No | Maximum number of results to return (default: 10) |
Implementation Reference
- src/tools/test-results.ts:104-122 (handler)Handler function that constructs flags from input arguments and invokes the underlying 'list-tests' CLI command via executeAndFormat.handler: async (args: { status?: string; test_type?: string; extension?: string; per_page?: number; }) => { // Default per_page to 10 to prevent large responses const perPage = args.per_page ?? 10; const flags: Record<string, string | boolean | undefined> = { test_status: args.status, test_types: args.test_type, extensions: args.extension, per_page: perPage.toString(), }; const cmdArgs = buildArgs("list-tests", [], flags); return executeAndFormat(cmdArgs); },
- src/tools/test-results.ts:86-103 (schema)Zod schema for input validation, defining optional filters for status, test_type, extension, and per_page limit.inputSchema: z.object({ status: z .enum(["pending", "running", "success", "failed", "warning"]) .optional() .describe("Filter by test status"), test_type: z .string() .optional() .describe("Filter by test type (e.g., 'security', 'e2e')"), extension: z .string() .optional() .describe("Filter by extension slug"), per_page: z .number() .optional() .describe("Maximum number of results to return (default: 10)"), }),
- src/tools/test-results.ts:83-123 (registration)Complete definition of the 'list_tests' tool, including name, description, input schema, and handler, within the testResultsTools export.list_tests: { name: "list_tests", description: "List test runs with optional filters. Default per_page is 10 to reduce response size.", inputSchema: z.object({ status: z .enum(["pending", "running", "success", "failed", "warning"]) .optional() .describe("Filter by test status"), test_type: z .string() .optional() .describe("Filter by test type (e.g., 'security', 'e2e')"), extension: z .string() .optional() .describe("Filter by extension slug"), per_page: z .number() .optional() .describe("Maximum number of results to return (default: 10)"), }), handler: async (args: { status?: string; test_type?: string; extension?: string; per_page?: number; }) => { // Default per_page to 10 to prevent large responses const perPage = args.per_page ?? 10; const flags: Record<string, string | boolean | undefined> = { test_status: args.status, test_types: args.test_type, extensions: args.extension, per_page: perPage.toString(), }; const cmdArgs = buildArgs("list-tests", [], flags); return executeAndFormat(cmdArgs); }, },
- src/tools/index.ts:10-13 (registration)Aggregation of all tools including testResultsTools (which contains list_tests) into allTools export.export const allTools = { ...authTools, ...testExecutionTools, ...testResultsTools,
- src/server.ts:29-29 (registration)Final registration of all tools (including list_tests) into the MCP server tools array.const tools = Object.entries(allTools).map(([_, tool]) => ({