Skip to content

Add test-writing guidance to AGENTS.md#7

Draft
simon-mo wants to merge 11 commits into
mainfrom
cursor/agents-test-guidance-9d34
Draft

Add test-writing guidance to AGENTS.md#7
simon-mo wants to merge 11 commits into
mainfrom
cursor/agents-test-guidance-9d34

Conversation

@simon-mo

@simon-mo simon-mo commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a new Adding tests section to AGENTS.md with project-wide guidance for writing meaningful tests.

What changed

  • Prefer extending existing test files, conftest.py fixtures, and shared helpers over creating new test files or bespoke harnesses.
  • Focus on observable behavior and regression-prone paths; avoid trivial coverage that cannot break.
  • Summarize testing principles from three large open-source projects:
    • Linux kernel — match test scope to code; regression tests for fixed bugs
    • Kubernetes — reuse shared framework utilities; flaky tests are worse than no tests
    • PyTorch — parameterize over existing fixtures; test public APIs; keep tests atomic
  • Link to existing model-specific test docs at docs/contributing/model/tests.md.

Why this is not duplicating an existing PR

No open PR adds general test-writing guidance to AGENTS.md.

Test commands run

Documentation-only change; no code tests required.

AI assistance

AI assistance was used to draft this documentation update.

Open in Web Open in Cursor 

SherryC41 and others added 3 commits July 6, 2026 21:08
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
Co-authored-by: sherryC41 <sherry.c.c41@gmail.com>
Co-authored-by: Matthew Bonanni <mbonanni@redhat.com>
…P8 KV (vllm-project#47276)

Signed-off-by: simondanielsson <simon.danielsson99@hotmail.com>
Co-authored-by: nnyrhila <niko.nyrhila@amd.com>
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
@cursor cursor Bot force-pushed the cursor/agents-test-guidance-9d34 branch from 49951c4 to 4df2454 Compare July 6, 2026 22:54
akii96 and others added 4 commits July 6, 2026 19:06
…tion + Mistral/Granite parsers) (vllm-project#47550)

Signed-off-by: Aakif Nawaz <aakif.nawaz@amd.com>
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
Document principles for adding tests: reuse existing harnesses and
suites, focus on meaningful behavior over trivial coverage, and borrow
patterns from Linux, Kubernetes, and PyTorch testing practices.

Co-authored-by: Cursor Agent
Replace project-specific citations with distilled principles for
reusing existing harnesses, writing meaningful behavior tests, and
keeping tests reliable and independent.

Co-authored-by: Cursor Agent
- Merge Running tests and Adding tests into a leaner Tests section
- Offset added content by trimming coding style and commit examples
- Add guidance against one-off kernel benchmarks in tests/
- Require model eval results in PRs for output/accuracy changes

Co-authored-by: Cursor Agent
@cursor cursor Bot force-pushed the cursor/agents-test-guidance-9d34 branch from 4df2454 to 6a32233 Compare July 6, 2026 23:16
cursoragent and others added 4 commits July 6, 2026 23:21
- State test reason in name or docstring (AndreasKaratzas)
- Add keep-it-minimal principle; skip other suggestions to stay lean
  per simon-mo

Co-authored-by: Cursor Agent
Merge behavior/reason bullets to offset length while keeping
Design before you write and Keep it minimal as the two top picks.

Co-authored-by: Cursor Agent
Co-authored-by: Benjamin Chislett <chislett.ben@gmail.com>
Signed-off-by: Simon Mo <simon.mo@hey.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants