Skip to content

Update Bug Reproduction and Patch Testing templates per test-handbook#104#6

Merged
afragen merged 1 commit into
afragen:developfrom
huzaifaalmesbah:update/reproduction-and-patch-testing-templates
May 20, 2026
Merged

Update Bug Reproduction and Patch Testing templates per test-handbook#104#6
afragen merged 1 commit into
afragen:developfrom
huzaifaalmesbah:update/reproduction-and-patch-testing-templates

Conversation

@huzaifaalmesbah

@huzaifaalmesbah huzaifaalmesbah commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Updates the Bug Reproduction and Patch Testing templates to match the new format being officialized in the WordPress Test Handbook.

This is the plugin-side counterpart to:

Once the handbook PR lands, the templates served by this plugin should match the documented format so testers see one consistent structure across the handbook and the plugin.

The Bug Report and Security Vulnerability templates are intentionally left unchanged — the handbook proposal only covers the two testing report types.

Proposal (from test-handbook#104 / #166)

The consensus reached in the handbook discussion (proposed by @SirLouen, endorsed by @huzaifaalmesbah, @Successfulsebunya, @ozgursar) is to standardize the reproduction and patch testing reports around a more testing-focused structure where the result is the final step in 'Steps taken', rather than a separate "Actual Results" section.

Reproduction Report

## Bug Reproduction Report

### Environment
- WordPress:
- PHP:
- Server:
- Database:
- Browser:
- OS:
- Theme:
- MU Plugins:
- Plugins:

### Steps taken
1.
x. 🐞 Bug occurs / ❌ Bug is not occurring

### Expected behavior
- Explain what behavior you were expecting from the ticket information.

### Additional Notes
- Any additional details worth mentioning.

### Screenshots/Screencast with results
- Screenshot showcasing the problem or the bug not occurring.

### Support Content
- Here you can add any support content useful for testing.
For example:
1. Blueprint JSON
2. Website Playground URL with parameters
3. Snippets of code
4. Additional Screenshots
5. etc...

Patch Testing Report

## Patch Testing Report
Patch tested: REPLACE_WITH_PATCH_URL

### Environment
- ...

### Steps taken
1.
x. ✅ Patch is solving the problem / ❌ Patch is failing

### Expected result
- Explain what results you were expecting from this patch.

### Additional Notes
- ...

### Screenshots/Screencast with results
- Screenshot/Screencast before
- Screenshot/Screencast after

### Support Content
- ...

Why this change is needed

  • The current templates mix "bug report" semantics (Description / Steps to Reproduce / Expected Results / Actual Results) into reports whose purpose is testing, not bug filing. Reviewers and testers have repeatedly noted this mismatch in the handbook discussion.
  • Testers are forced to re-state "Expected behavior" / "Actual result" content that the original reporter or patch author has already provided in the ticket. This is redundant and slows reviews.
  • A separate Screenshots/Screencast with results section makes visual evidence a first-class part of the report (especially needed for before/after patch comparisons).
  • A dedicated Support Content section gives testers a clear place to share Blueprint JSON, Playground URLs, code snippets, etc. — the kinds of supporting artifacts that are increasingly important in modern WordPress testing workflows.
  • Most importantly: the handbook is being updated to this format in #166. Keeping the plugin in sync avoids confusing testers with two different official templates.

Benefits

  • Single source of truth. Plugin output matches the format documented in the Test Handbook.
  • Faster, clearer testing reports. The flow mirrors what a tester actually does: set up environment → perform steps → observe result.
  • Less duplication with the originating ticket. Testers focus on what they did and what happened, not on re-describing the bug.
  • Better support for Playground / Blueprint workflows via the explicit Support Content section.
  • Result is unambiguous as the final step of the reproduction/patch testing flow, matching how testers naturally write reports (consensus reached in the handbook issue).
  • Bug Report and Security Vulnerability templates are unaffected, so existing Trac/HackerOne workflows continue to work exactly as before.

Implementation notes

  • New private method `get_testing_report_template()` builds the structure for both `bug-reproduction` and `patch-testing`.
  • Patch Testing inserts `Patch tested: REPLACE_WITH_PATCH_URL` at the top, replacing the previous Description-based approach.
  • Trac (`==` / `===`) and GitHub (`##` / `###`) heading markers are preserved; the trac-specific `x.` final list item marker is preserved.
  • Dead `bug-reproduction` and `patch-testing` cases removed from `get_description()`.
  • No JS/CSS changes required — no hardcoded references to the old section names.

Test plan

  • Open the Test Reports admin page.
  • Select Bug Reproduction + GitHub → verify sections match the proposal above, result appears as step 2.
  • Select Bug Reproduction + Trac → verify == === headings and x. final list marker.
  • Select Patch Testing + GitHub → verify Patch tested: REPLACE_WITH_PATCH_URL at top, Expected result + before/after screenshot lines present.
  • Select Patch Testing + Trac → verify wiki heading markers and x. final list marker.
  • Select Bug Report (Trac and GitHub) → confirm template is unchanged.
  • Select Security Vulnerability → confirm template is unchanged.
  • Click Copy to clipboard for each → confirm   is replaced with regular space in the clipboard payload.
  • Cross-check rendered output against Update reproduction and patch testing report templates WordPress/test-handbook#166 once that PR lands.

References

🤖 Generated with Claude Code

Adopts the structure proposed in WordPress/test-handbook#104:
Environment, Steps taken (result as final step), Expected
behavior/result, Additional Notes, Screenshots/Screencast with
results, Support Content. Patch Testing keeps the patch URL at
the top. Bug Report and Security Vulnerability templates are
unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.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.

2 participants