-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New tool to serialize mata test cases to file. #9441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 28 commits
11b53b8
18c29f8
7d8e857
455d6d3
b26c98b
1744e5e
62e3171
26dd4f3
c318b06
81c1a61
75d279f
b309807
9bbf17a
973e8d7
82e1724
c081d6d
380b001
8a95353
7356c41
32c5a93
7f94828
cb9c42b
81a2734
0bc8208
d642542
9877ee5
1c4631d
f34e992
a1de3cd
6d6b1a9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| import { isEnabled } from "../../../experiments"; | ||
| import type { ServerTool } from "../../tool"; | ||
| import { check_status, run_tests } from "./tests"; | ||
| import { check_status, run_tests, testcase_export } from "./tests"; | ||
|
|
||
| export const apptestingTools: ServerTool[] = []; | ||
|
|
||
| if (isEnabled("mcpalpha")) { | ||
| apptestingTools.push(...[run_tests, check_status]); | ||
| apptestingTools.push(...[run_tests, check_status, testcase_export]); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| import { z } from "zod"; | ||
| <<<<<<< HEAD | ||
|
Check failure on line 2 in src/mcp/tools/apptesting/tests.ts
|
||
| import * as fs from "fs-extra"; | ||
| import { ApplicationIdSchema } from "../../../crashlytics/filters"; | ||
| import { upload, Distribution } from "../../../appdistribution/distribution"; | ||
| import { toYaml } from "../../../appdistribution/yaml_helper"; | ||
| ======= | ||
|
Check failure on line 7 in src/mcp/tools/apptesting/tests.ts
|
||
jrothfeder marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| import { ApplicationIdSchema } from "../../../crashlytics/filters"; | ||
| import { upload, Distribution } from "../../../appdistribution/distribution"; | ||
| >>>>>>> master | ||
|
Check failure on line 10 in src/mcp/tools/apptesting/tests.ts
|
||
jrothfeder marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| import { tool } from "../../tool"; | ||
| import { toContent } from "../../util"; | ||
|
|
@@ -74,6 +81,35 @@ | |
| }, | ||
| ); | ||
|
|
||
| <<<<<<< HEAD | ||
|
Check failure on line 84 in src/mcp/tools/apptesting/tests.ts
|
||
jrothfeder marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| export const testcase_export = tool( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if we want to create a new tool for this. In general, the CLI team is trying to reduce the number of tools in the Firebase MCP server, which is why I ended up combining the check_tests and get_devices tools in the previous PR. |
||
| "apptesting", | ||
| { | ||
| name: "testcase_export", | ||
| description: "Use this to export a testcases to a file.", | ||
| inputSchema: z.object({ | ||
| outputFile: z.string().describe("The path to the file."), | ||
| testCases: z.array( | ||
| z.object({ | ||
| displayName: z.string(), | ||
| aiInstructions: z.object({ | ||
| steps: z.array(AIStepSchema), | ||
| }), | ||
| }), | ||
| ), | ||
| }), | ||
| annotations: { | ||
| title: "Export testcases to a file.", | ||
| readOnlyHint: false, | ||
| }, | ||
| }, | ||
| async ({ outputFile, testCases }) => { | ||
| return toContent(fs.writeFileSync(outputFile, toYaml(testCases), "utf8")); | ||
| }, | ||
| ); | ||
|
|
||
| ======= | ||
|
Check failure on line 111 in src/mcp/tools/apptesting/tests.ts
|
||
| >>>>>>> master | ||
|
Check failure on line 112 in src/mcp/tools/apptesting/tests.ts
|
||
| export const check_status = tool( | ||
| "apptesting", | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.