Fetch test execution results
wopee_fetch_executed_test_casesRetrieve executed test case results from an analysis suite, including status, agent report, and code report. Call after dispatching the agent to check progress or completion.
Instructions
Retrieve results of test cases executed by the autonomous agent. Returns each test case with its execution status (IN_PROGRESS, FINISHED, FAILED), agent report (natural language findings), and code report (technical details). Read-only: does not trigger any execution. Use this after wopee_dispatch_agent to check results — if status is IN_PROGRESS, wait and call again. Requires suite UUID. Optionally accepts an analysis identifier (e.g. A068, found in suite data) to filter to a specific analysis run. Returns an empty array if no test cases have been executed in this suite. Do NOT use this to fetch test artifacts like user stories or code — use wopee_fetch_artifact for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| suiteUuid | Yes | UUID of the analysis suite to fetch executed test cases for | |
| analysisIdentifier | No | Analysis identifier of the suite (ex. A068). Can be found in the analysis suite data. |
Implementation Reference
- Main tool definition and handler for wopee_fetch_executed_test_cases. The handler takes a suiteUuid (and optional analysisIdentifier), creates the input via factory, sends a GraphQL request to fetch executed test cases, and returns the results as JSON.
import { WopeeFetchExecutedTestCasesInput, WopeeFetchExecutedTestCasesInputSchema, FetchExecutedTestCasesInputSchema, } from "./schema.js"; import { FetchExecutedTestCasesResponse, ToolName } from "../shared/types.js"; import { _parseError } from "../shared/helpers.js"; import { createFetchExecutedTestCasesInput } from "./factory.js"; import { FetchExecutedTestCases } from "../shared/gql-queries.js"; import { requestClient } from "../../utils/requestClient.js"; export const wopeeFetchExecutedTestCases = { name: ToolName.WOPEE_FETCH_EXECUTED_TEST_CASES, config: { title: "Fetch test execution results", description: "Retrieve results of test cases executed by the autonomous agent. Returns each test case with its execution status (IN_PROGRESS, FINISHED, FAILED), agent report (natural language findings), and code report (technical details). Read-only: does not trigger any execution. Use this after wopee_dispatch_agent to check results — if status is IN_PROGRESS, wait and call again. Requires suite UUID. Optionally accepts an analysis identifier (e.g. A068, found in suite data) to filter to a specific analysis run. Returns an empty array if no test cases have been executed in this suite. Do NOT use this to fetch test artifacts like user stories or code — use wopee_fetch_artifact for that.", inputSchema: WopeeFetchExecutedTestCasesInputSchema.shape, }, handler: async (input: WopeeFetchExecutedTestCasesInput) => { try { const factoryInput = createFetchExecutedTestCasesInput(input); const parsedInput = FetchExecutedTestCasesInputSchema.parse(factoryInput); const result = await requestClient<{ fetchExecutedTestCases: FetchExecutedTestCasesResponse[]; }>(FetchExecutedTestCases, { input: parsedInput, }); if (!result?.fetchExecutedTestCases) return { content: [ { type: "text" as const, text: "Failed to fetch executed test cases: no data returned", }, ], }; return { content: [ { type: "text" as const, text: JSON.stringify(result.fetchExecutedTestCases, null, 2), }, ], }; } catch (error) { return _parseError(error); } }, }; - Zod schemas for the tool. WopeeFetchExecutedTestCasesInputSchema defines the public input (suiteUuid required, analysisIdentifier optional). FetchExecutedTestCasesInputSchema adds projectUuid for internal use.
import { z } from "zod"; export const WopeeFetchExecutedTestCasesInputSchema = z.object({ suiteUuid: z .string({ description: "UUID of the analysis suite to fetch executed test cases for", }) .min(1, "Suite UUID is required"), analysisIdentifier: z .string({ description: "Analysis identifier of the suite (ex. A068). Can be found in the analysis suite data.", }) .optional(), }); export const FetchExecutedTestCasesInputSchema = z.object({ projectUuid: z.string().min(1, "Project UUID is required"), analysisSuiteUuid: z.string().min(1, "Suite UUID is required"), analysisIdentifier: z.string().optional(), }); export type WopeeFetchExecutedTestCasesInput = z.infer< typeof WopeeFetchExecutedTestCasesInputSchema >; export type FetchExecutedTestCasesInput = z.infer< typeof FetchExecutedTestCasesInputSchema >; - src/tools/index.ts:1-20 (registration)Tool registration: imports wopeeFetchExecutedTestCases from its directory and exports it in the TOOLS array.
import { wopeeFetchArtifact } from "./wopee_fetch_artifact/index.js"; import { wopeeUpdateArtifact } from "./wopee_update_artifact/index.js"; import { wopeeGenerateArtifact } from "./wopee_generate_artifact/index.js"; import { wopeeDispatchAgent } from "./wopee_dispatch_agent/index.js"; import { wopeeDispatchAnalysis } from "./wopee_dispatch_analysis/index.js"; import { wopeeCreateBlankSuite } from "./wopee_create_blank_suite/index.js"; import { wopeeFetchAnalysisSuites } from "./wopee_fetch_analysis_suites/index.js"; import { wopeeFetchExecutedTestCases } from "./wopee_fetch_executed_test_cases/index.js"; import { wopeeSendChatMessage } from "./wopee_send_chat_message/index.js"; import { wopeeReadChatHistory } from "./wopee_read_chat_history/index.js"; import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js"; export const TOOLS = [ wopeeCreateBlankSuite, wopeeFetchAnalysisSuites, wopeeFetchExecutedTestCases, wopeeDispatchAnalysis, wopeeDispatchAgent, - src/tools/shared/types.ts:1-16 (registration)Enum definition ToolName.WOPEE_FETCH_EXECUTED_TEST_CASES = 'wopee_fetch_executed_test_cases', used as the tool's name identifier.
export enum ToolName { WOPEE_CREATE_BLANK_SUITE = "wopee_create_blank_suite", WOPEE_FETCH_ANALYSIS_SUITES = "wopee_fetch_analysis_suites", WOPEE_FETCH_EXECUTED_TEST_CASES = "wopee_fetch_executed_test_cases", WOPEE_DISPATCH_ANALYSIS = "wopee_dispatch_analysis", WOPEE_DISPATCH_AGENT = "wopee_dispatch_agent", WOPEE_FETCH_ARTIFACT = "wopee_fetch_artifact", WOPEE_UPDATE_ARTIFACT = "wopee_update_artifact", WOPEE_GENERATE_ARTIFACT = "wopee_generate_artifact", WOPEE_SEND_CHAT_MESSAGE = "wopee_send_chat_message", WOPEE_READ_CHAT_HISTORY = "wopee_read_chat_history", WOPEE_CREATE_GITHUB_ISSUE = "wopee_create_github_issue", } - Factory function createFetchExecutedTestCasesInput that enriches user input with WOPEE_PROJECT_UUID from config to create the internal request input.
import { getConfig } from "../../utils/getConfig.js"; import { FetchExecutedTestCasesInput, WopeeFetchExecutedTestCasesInput, } from "./schema.js"; export const createFetchExecutedTestCasesInput = ( input: WopeeFetchExecutedTestCasesInput, ): FetchExecutedTestCasesInput => { const { WOPEE_PROJECT_UUID } = getConfig(); if (!WOPEE_PROJECT_UUID) throw new Error("WOPEE_PROJECT_UUID is not set"); return { projectUuid: WOPEE_PROJECT_UUID, analysisSuiteUuid: input.suiteUuid, ...(input.analysisIdentifier ? { analysisIdentifier: input.analysisIdentifier } : {}), }; };