wopee-mcp 1.21.0 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/build/prompts/fetch_test_results/index.js +65 -0
- package/build/prompts/index.js +2 -1
- package/build/prompts/shared/types.js +1 -0
- package/build/tools/index.js +2 -0
- package/build/tools/shared/gql-queries.js +22 -0
- package/build/tools/shared/types.js +6 -0
- package/build/tools/wopee_dispatch_agent/index.js +1 -1
- package/build/tools/wopee_fetch_executed_test_cases/factory.js +13 -0
- package/build/tools/wopee_fetch_executed_test_cases/index.js +43 -0
- package/build/tools/wopee_fetch_executed_test_cases/schema.js +18 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -298,7 +298,7 @@ Dispatches an autonomous testing agent to execute test cases for a selected suit
|
|
|
298
298
|
- `testCases` - Array of test case objects to execute, each containing:
|
|
299
299
|
- `testCaseId` - The ID of the test case
|
|
300
300
|
- `userStoryId` - The ID of the associated user story
|
|
301
|
-
- **Returns:**
|
|
301
|
+
- **Returns:** Array of executed test case objects with their initial execution state (uuid, executionStatus, agentReportStatus, codeReportStatus, etc.)
|
|
302
302
|
|
|
303
303
|
**Example Usage:**
|
|
304
304
|
|
|
@@ -306,6 +306,27 @@ Dispatches an autonomous testing agent to execute test cases for a selected suit
|
|
|
306
306
|
Dispatch agent for my latest suite's user story US001 and test case TC003
|
|
307
307
|
```
|
|
308
308
|
|
|
309
|
+
### Test Results
|
|
310
|
+
|
|
311
|
+
#### `wopee_fetch_executed_test_cases`
|
|
312
|
+
|
|
313
|
+
Fetches executed test cases and their results for a given analysis suite. Use this to check the status and reports of dispatched agent runs.
|
|
314
|
+
|
|
315
|
+
- **Parameters:**
|
|
316
|
+
- `suiteUuid` - The UUID of the analysis suite to fetch results for
|
|
317
|
+
- `analysisIdentifier` _(optional)_ - Analysis identifier to narrow results (e.g. `A068`)
|
|
318
|
+
- **Returns:** Array of results grouped by user story, each containing executed test cases with execution status, agent report, agent report status, code report, and code report status
|
|
319
|
+
|
|
320
|
+
**Example Usage:**
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Fetch test results for suite <suiteUuid>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
```
|
|
327
|
+
Show me the executed test cases for my latest analysis suite
|
|
328
|
+
```
|
|
329
|
+
|
|
309
330
|
## Typical Workflow
|
|
310
331
|
|
|
311
332
|
1. **Start with a suite:**
|
|
@@ -326,6 +347,20 @@ Dispatch agent for my latest suite's user story US001 and test case TC003
|
|
|
326
347
|
4. **Run tests:**
|
|
327
348
|
- Use `wopee_dispatch_agent` to execute test cases with the autonomous testing agent
|
|
328
349
|
|
|
350
|
+
5. **Check results:**
|
|
351
|
+
- Use `wopee_fetch_executed_test_cases` to check the status and reports of dispatched agent runs
|
|
352
|
+
- Or use the `fetch-test-results` prompt for a formatted summary of all test results
|
|
353
|
+
|
|
354
|
+
## Available Prompts
|
|
355
|
+
|
|
356
|
+
### `fetch-project-summary`
|
|
357
|
+
|
|
358
|
+
Fetches analysis suites and their user stories/test cases, then displays a formatted summary with two markdown tables: a suite overview and a detailed test case breakdown.
|
|
359
|
+
|
|
360
|
+
### `fetch-test-results`
|
|
361
|
+
|
|
362
|
+
Fetches analysis suites and their executed test case results, then displays formatted markdown tables showing execution status, agent report status, and code report status for each test case. Also surfaces failed report details.
|
|
363
|
+
|
|
329
364
|
## Notes
|
|
330
365
|
|
|
331
366
|
- Most tools require a `suiteUuid`. Always start by fetching or creating a suite.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PromptName } from "../shared/types.js";
|
|
2
|
+
export const fetchTestResults = {
|
|
3
|
+
name: PromptName.FETCH_TEST_RESULTS,
|
|
4
|
+
config: {
|
|
5
|
+
title: "Fetch test results",
|
|
6
|
+
description: "Fetch and display test execution results for analysis suites",
|
|
7
|
+
},
|
|
8
|
+
handler: () => ({
|
|
9
|
+
messages: [
|
|
10
|
+
{
|
|
11
|
+
role: "user",
|
|
12
|
+
content: {
|
|
13
|
+
type: "text",
|
|
14
|
+
text: `Please, fetch my analysis suites using 'wopee_fetch_analysis_suites' tool. If there are more than 5 suites, ask the user to select which suite(s) they want to see results for.
|
|
15
|
+
|
|
16
|
+
Then, for each selected suite, fetch the executed test cases using 'wopee_fetch_executed_test_cases' tool with the suite's uuid and analysisIdentifier.
|
|
17
|
+
|
|
18
|
+
After fetching all of the necessary data, summarize and display readable markdown tables as an output in the same chat conversation. Do NOT create, write, or save any files to disk - only display the formatted tables in your response.
|
|
19
|
+
|
|
20
|
+
Display the following tables:
|
|
21
|
+
|
|
22
|
+
1. **Suite Overview Table** - one row per suite showing:
|
|
23
|
+
- Suite name
|
|
24
|
+
- Analysis identifier
|
|
25
|
+
- Execution status
|
|
26
|
+
- Suite running status
|
|
27
|
+
|
|
28
|
+
### Example:
|
|
29
|
+
| Suite Name | Identifier | Execution Status | Running Status |
|
|
30
|
+
|------------|------------|------------------|----------------|
|
|
31
|
+
| Analysis - A068 | A068 | FINISHED | IDLE |
|
|
32
|
+
| Analysis - A067 | A067 | IN_PROGRESS | IN_PROGRESS |
|
|
33
|
+
|
|
34
|
+
___
|
|
35
|
+
|
|
36
|
+
2. **Test Case Results Table** - for each suite that has executed test cases:
|
|
37
|
+
- Suite name
|
|
38
|
+
- User story ID
|
|
39
|
+
- Test case ID
|
|
40
|
+
- Execution status
|
|
41
|
+
- Agent report status (PASSED/FAILED or N/A)
|
|
42
|
+
- Code report status (PASSED/FAILED or N/A)
|
|
43
|
+
|
|
44
|
+
### Example:
|
|
45
|
+
| Suite Name | User Story | Test Case | Execution | Agent Status | Code Status |
|
|
46
|
+
|------------|------------|-----------|-----------|--------------|-------------|
|
|
47
|
+
| Analysis - A068 | US001 | TC001 | FINISHED | PASSED | PASSED |
|
|
48
|
+
| | US001 | TC002 | FINISHED | PASSED | FAILED |
|
|
49
|
+
| | US002 | TC001 | FINISHED | FAILED | N/A |
|
|
50
|
+
| Analysis - A067 | US001 | TC001 | IN_PROGRESS | N/A | N/A |
|
|
51
|
+
|
|
52
|
+
___
|
|
53
|
+
|
|
54
|
+
3. If any test case has a FAILED agent or code report status, display the report content below the tables under a "Failed Reports" section, showing the suite name, test case ID, and the report text.
|
|
55
|
+
|
|
56
|
+
## Important Notes:
|
|
57
|
+
- If a test case's executionStatus is IN_PROGRESS, note that results are not yet available.
|
|
58
|
+
- Use "N/A" for report statuses that are null (not yet available).
|
|
59
|
+
- Group test cases by user story within each suite.
|
|
60
|
+
`,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
}),
|
|
65
|
+
};
|
package/build/prompts/index.js
CHANGED
package/build/tools/index.js
CHANGED
|
@@ -5,9 +5,11 @@ import { wopeeDispatchAgent } from "./wopee_dispatch_agent/index.js";
|
|
|
5
5
|
import { wopeeDispatchAnalysis } from "./wopee_dispatch_analysis/index.js";
|
|
6
6
|
import { wopeeCreateBlankSuite } from "./wopee_create_blank_suite/index.js";
|
|
7
7
|
import { wopeeFetchAnalysisSuites } from "./wopee_fetch_analysis_suites/index.js";
|
|
8
|
+
import { wopeeFetchExecutedTestCases } from "./wopee_fetch_executed_test_cases/index.js";
|
|
8
9
|
export const TOOLS = [
|
|
9
10
|
wopeeCreateBlankSuite,
|
|
10
11
|
wopeeFetchAnalysisSuites,
|
|
12
|
+
wopeeFetchExecutedTestCases,
|
|
11
13
|
wopeeDispatchAnalysis,
|
|
12
14
|
wopeeDispatchAgent,
|
|
13
15
|
wopeeFetchArtifact,
|
|
@@ -155,6 +155,28 @@ export const GenerateReusableTestCaseSteps = `
|
|
|
155
155
|
generateReusableTestCaseSteps(input: $input)
|
|
156
156
|
}
|
|
157
157
|
`;
|
|
158
|
+
export const FetchExecutedTestCases = `
|
|
159
|
+
query FetchExecutedTestCases($input: FetchExecutedTestCasesInput!) {
|
|
160
|
+
fetchExecutedTestCases(input: $input) {
|
|
161
|
+
userStoryId
|
|
162
|
+
executedTestCases {
|
|
163
|
+
uuid
|
|
164
|
+
suiteUuid
|
|
165
|
+
analysisSuiteUuid
|
|
166
|
+
analysisIdentifier
|
|
167
|
+
userStoryId
|
|
168
|
+
testCaseId
|
|
169
|
+
executionStatus
|
|
170
|
+
agentReport
|
|
171
|
+
agentReportStatus
|
|
172
|
+
codeReport
|
|
173
|
+
codeReportStatus
|
|
174
|
+
createdAt
|
|
175
|
+
updatedAt
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
`;
|
|
158
180
|
export const CreateBlankAnalysisSuite = `
|
|
159
181
|
mutation CreateBlankAnalysisSuite($projectUuid: ID!) {
|
|
160
182
|
createBlankAnalysisSuite(projectUuid: $projectUuid) {
|
|
@@ -2,6 +2,7 @@ export var ToolName;
|
|
|
2
2
|
(function (ToolName) {
|
|
3
3
|
ToolName["WOPEE_CREATE_BLANK_SUITE"] = "wopee_create_blank_suite";
|
|
4
4
|
ToolName["WOPEE_FETCH_ANALYSIS_SUITES"] = "wopee_fetch_analysis_suites";
|
|
5
|
+
ToolName["WOPEE_FETCH_EXECUTED_TEST_CASES"] = "wopee_fetch_executed_test_cases";
|
|
5
6
|
ToolName["WOPEE_DISPATCH_ANALYSIS"] = "wopee_dispatch_analysis";
|
|
6
7
|
ToolName["WOPEE_DISPATCH_AGENT"] = "wopee_dispatch_agent";
|
|
7
8
|
ToolName["WOPEE_FETCH_ARTIFACT"] = "wopee_fetch_artifact";
|
|
@@ -56,3 +57,8 @@ export var GenerationStatus;
|
|
|
56
57
|
GenerationStatus["FINISHED"] = "FINISHED";
|
|
57
58
|
GenerationStatus["FAILED"] = "FAILED";
|
|
58
59
|
})(GenerationStatus || (GenerationStatus = {}));
|
|
60
|
+
export var ReportStatus;
|
|
61
|
+
(function (ReportStatus) {
|
|
62
|
+
ReportStatus["PASSED"] = "PASSED";
|
|
63
|
+
ReportStatus["FAILED"] = "FAILED";
|
|
64
|
+
})(ReportStatus || (ReportStatus = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { getConfig } from "../../utils/getConfig.js";
|
|
2
|
+
export const createFetchExecutedTestCasesInput = (input) => {
|
|
3
|
+
const { WOPEE_PROJECT_UUID } = getConfig();
|
|
4
|
+
if (!WOPEE_PROJECT_UUID)
|
|
5
|
+
throw new Error("WOPEE_PROJECT_UUID is not set");
|
|
6
|
+
return {
|
|
7
|
+
projectUuid: WOPEE_PROJECT_UUID,
|
|
8
|
+
analysisSuiteUuid: input.suiteUuid,
|
|
9
|
+
...(input.analysisIdentifier
|
|
10
|
+
? { analysisIdentifier: input.analysisIdentifier }
|
|
11
|
+
: {}),
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { WopeeFetchExecutedTestCasesInputSchema, FetchExecutedTestCasesInputSchema, } from "./schema.js";
|
|
2
|
+
import { ToolName } from "../shared/types.js";
|
|
3
|
+
import { _parseError } from "../shared/helpers.js";
|
|
4
|
+
import { createFetchExecutedTestCasesInput } from "./factory.js";
|
|
5
|
+
import { FetchExecutedTestCases } from "../shared/gql-queries.js";
|
|
6
|
+
import { requestClient } from "../../utils/requestClient.js";
|
|
7
|
+
export const wopeeFetchExecutedTestCases = {
|
|
8
|
+
name: ToolName.WOPEE_FETCH_EXECUTED_TEST_CASES,
|
|
9
|
+
config: {
|
|
10
|
+
title: "Fetch executed test cases",
|
|
11
|
+
description: "Fetch executed test cases and their results (agent report, code report, execution status) for a given analysis suite.",
|
|
12
|
+
inputSchema: WopeeFetchExecutedTestCasesInputSchema.shape,
|
|
13
|
+
},
|
|
14
|
+
handler: async (input) => {
|
|
15
|
+
try {
|
|
16
|
+
const factoryInput = createFetchExecutedTestCasesInput(input);
|
|
17
|
+
const parsedInput = FetchExecutedTestCasesInputSchema.parse(factoryInput);
|
|
18
|
+
const result = await requestClient(FetchExecutedTestCases, {
|
|
19
|
+
input: parsedInput,
|
|
20
|
+
});
|
|
21
|
+
if (!result?.fetchExecutedTestCases)
|
|
22
|
+
return {
|
|
23
|
+
content: [
|
|
24
|
+
{
|
|
25
|
+
type: "text",
|
|
26
|
+
text: "Failed to fetch executed test cases: no data returned",
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
};
|
|
30
|
+
return {
|
|
31
|
+
content: [
|
|
32
|
+
{
|
|
33
|
+
type: "text",
|
|
34
|
+
text: JSON.stringify(result.fetchExecutedTestCases, null, 2),
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
catch (error) {
|
|
40
|
+
return _parseError(error);
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const WopeeFetchExecutedTestCasesInputSchema = z.object({
|
|
3
|
+
suiteUuid: z
|
|
4
|
+
.string({
|
|
5
|
+
description: "UUID of the analysis suite to fetch executed test cases for",
|
|
6
|
+
})
|
|
7
|
+
.min(1, "Suite UUID is required"),
|
|
8
|
+
analysisIdentifier: z
|
|
9
|
+
.string({
|
|
10
|
+
description: "Analysis identifier of the suite (ex. A068). Can be found in the analysis suite data.",
|
|
11
|
+
})
|
|
12
|
+
.optional(),
|
|
13
|
+
});
|
|
14
|
+
export const FetchExecutedTestCasesInputSchema = z.object({
|
|
15
|
+
projectUuid: z.string().min(1, "Project UUID is required"),
|
|
16
|
+
analysisSuiteUuid: z.string().min(1, "Suite UUID is required"),
|
|
17
|
+
analysisIdentifier: z.string().optional(),
|
|
18
|
+
});
|
package/package.json
CHANGED