update_case
Modify existing test case details such as title, description, steps, severity, and tags in QASE test management platform. Ensure accurate and up-to-date test case documentation.
Instructions
Update an existing test case
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| automation | No | ||
| behavior | No | ||
| code | Yes | ||
| custom_fields | No | ||
| description | No | ||
| id | Yes | ||
| is_flaky | No | ||
| layer | No | ||
| milestone_id | No | ||
| params | No | ||
| postconditions | No | ||
| preconditions | No | ||
| priority | No | ||
| severity | No | ||
| status | No | ||
| steps | No | ||
| suite_id | No | ||
| tags | No | ||
| title | No | ||
| type | No |
Implementation Reference
- src/operations/cases.ts:172-179 (handler)The core handler function that performs the actual update case operation using the Qase client, including data conversion.export const updateCase = pipe( ( code: string, id: number, data: Omit<z.infer<typeof UpdateCaseSchema>, 'code' | 'id'>, ) => client.cases.updateCase(code, id, convertCaseData(data)), toResult, );
- src/operations/cases.ts:49-93 (schema)Zod schema defining the input parameters for the update_case tool.export const UpdateCaseSchema = z.object({ code: z.string(), id: z.number(), title: z.string().optional(), description: z.string().optional(), preconditions: z.string().optional(), postconditions: z.string().optional(), severity: z.number().optional(), priority: z.number().optional(), type: z.number().optional(), behavior: z.number().optional(), automation: z.number().optional(), status: z.number().optional(), suite_id: z.number().optional(), milestone_id: z.number().optional(), layer: z.number().optional(), is_flaky: z.boolean().optional(), params: z .array( z.object({ title: z.string(), value: z.string(), }), ) .optional(), tags: z.array(z.string()).optional(), steps: z .array( z.object({ action: z.string(), expected_result: z.string().optional(), data: z.string().optional(), position: z.number().optional(), }), ) .optional(), custom_fields: z .array( z.object({ id: z.number(), value: z.string(), }), ) .optional(), });
- src/index.ts:185-189 (registration)Registration of the update_case tool in the MCP server's list of tools, including name, description, and input schema.{ name: 'update_case', description: 'Update an existing test case', inputSchema: zodToJsonSchema(UpdateCaseSchema), },
- src/index.ts:354-357 (handler)MCP server request handler that dispatches the update_case tool call, parses arguments, and invokes the core updateCase function..with({ name: 'update_case' }, ({ arguments: args }) => { const { code, id, ...caseData } = UpdateCaseSchema.parse(args); return updateCase(code, id, caseData); })
- src/operations/cases.ts:156-170 (helper)Helper function to convert the input data format for the Qase API, handling is_flaky boolean to int and params array to object.const convertCaseData = ( data: Omit<z.infer<typeof UpdateCaseSchema>, 'code' | 'id'>, ) => ({ ...data, is_flaky: data.is_flaky === undefined ? undefined : data.is_flaky ? 1 : 0, params: data.params ? data.params.reduce( (acc, param) => ({ ...acc, [param.title]: [param.value], }), {}, ) : undefined, });