Prompts are available in English and Simplified Chinese. Showing English.
Draft tests for one meaningful branch
Select isolated behavior and deliver complete test code.References & what we used
- Common workflows: Work with tests
References the testing workflow; automatic selection, complete draft code and static-only checking are whenreset additions.
Identify the existing test framework. Prefer a pure function or clear branch touched by uncommitted changes; otherwise choose one with explicit behavior near existing tests. Inspect one target and at most three related tests. Establish expected behavior from callers, tests or documentation. Draft at most three missing cases and explain the regression each catches. Do not invent business rules or duplicate the implementation mechanically. Provide complete test code with imports and assertions, the intended path or insertion point, and the project's exact test command. Preserve source files and do not add a framework. Statically check signatures and conventions. Label the code unexecuted rather than claiming it passes. If the framework or expected behavior is missing, report the evidenced gap instead of setting up an environment. Execution contract: Start directly. Do not ask me to approve a plan, choose files or fill in a template. Use only this project, this conversation and materials already provided; do not search unrelated projects or private history. Complete what the evidence supports and report missing inputs. If the task is inapplicable, explain why and stop without inventing a result. Preserve existing files and uncommitted changes. Include complete proposed content in your reply; standalone artifacts may be saved under a new, unused filename. Do not install dependencies, change the environment, commit, push or deploy. Respect access and permission limits and report blocked work. Check your result once, deliver it and stop without asking whether to continue.