Skip to main content
Glama

run_test_group

Execute a predefined group of tests for WordPress/WooCommerce plugins using configuration from qit.json to validate functionality and security.

Instructions

Run a group of tests defined in qit.json configuration file.

⚠️ QIT CLI not detected. QIT CLI not found. Please install it using one of these methods:

  1. Via Composer (recommended): composer require woocommerce/qit-cli --dev

  2. Set QIT_CLI_PATH environment variable: export QIT_CLI_PATH=/path/to/qit

  3. Ensure 'qit' is available in your system PATH

For more information, visit: https://github.com/woocommerce/qit-cli

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupYesName of the test group defined in qit.json
configNoPath to qit.json configuration file
waitNoWait for all tests to complete before returning
jsonNoReturn output in JSON format

Implementation Reference

  • The async handler function for the 'run_test_group' tool. It constructs CLI arguments for the 'run:group' command using the provided group name and optional flags (config, wait, json), sets an appropriate timeout, and executes the command via executeAndFormat.
    handler: async (args: { group: string; config?: string; wait?: boolean; json?: boolean; }) => { const cmdArgs = buildArgs("run:group", [args.group], { config: args.config, wait: args.wait, json: args.json, }); const timeout = args.wait ? 1800000 : 300000; return executeAndFormat(cmdArgs, { timeout }); },
  • Zod input schema defining parameters for the run_test_group tool: required 'group' string, optional 'config', 'wait', and 'json'.
    inputSchema: z.object({ group: z.string().describe("Name of the test group defined in qit.json"), config: z .string() .optional() .describe("Path to qit.json configuration file"), wait: z .boolean() .optional() .describe("Wait for all tests to complete before returning"), json: z .boolean() .optional() .describe("Return output in JSON format"), }),
  • The complete definition object for the 'run_test_group' tool, including name, description, inputSchema, and handler, exported as part of testExecutionTools.
    run_test_group: { name: "run_test_group", description: "Run a group of tests defined in qit.json configuration file.", inputSchema: z.object({ group: z.string().describe("Name of the test group defined in qit.json"), config: z .string() .optional() .describe("Path to qit.json configuration file"), wait: z .boolean() .optional() .describe("Wait for all tests to complete before returning"), json: z .boolean() .optional() .describe("Return output in JSON format"), }), handler: async (args: { group: string; config?: string; wait?: boolean; json?: boolean; }) => { const cmdArgs = buildArgs("run:group", [args.group], { config: args.config, wait: args.wait, json: args.json, }); const timeout = args.wait ? 1800000 : 300000; return executeAndFormat(cmdArgs, { timeout }); }, },
  • Registration of testExecutionTools (containing run_test_group) by spreading into the allTools export used by the MCP server.
    export const allTools = { ...authTools, ...testExecutionTools,
  • src/server.ts:29-35 (registration)
    MCP server lists all tools from allTools, converting Zod schemas to JSON schema for the ListToolsRequestHandler.
    const tools = Object.entries(allTools).map(([_, tool]) => ({ name: tool.name, description: cliInfo ? tool.description : `${tool.description}\n\n⚠️ QIT CLI not detected. ${getQitCliNotFoundError()}`, inputSchema: zodToJsonSchema(tool.inputSchema), }));

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/woocommerce/qit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server