Regression Test Tracker
Overview
Track, manage, and maintain regression test suites across releases to ensure previously fixed bugs stay fixed and existing features remain stable. Maps regression tests to bug tickets, monitors test health over time, and identifies gaps where fixed bugs lack corresponding regression tests.
Prerequisites
- Test framework with tagging or marking support (
@tag, pytest.mark, JUnit @Tag)
- Bug tracking system with issue IDs (GitHub Issues, Jira, Linear)
- Git history accessible for correlating bug fixes with test additions
- Existing test suite with named test cases
- CI pipeline producing test result artifacts (JUnit XML or JSON)
Instructions
- Scan the codebase with Grep for bug-fix commits by searching commit messages for patterns like
fix:, bugfix, closes #, or Jira ticket IDs.
- For each bug-fix commit, check whether a corresponding regression test exists:
- Search test files for the bug ticket ID in test names, comments, or tags.
- Verify the test exercises the specific code path that was fixed.
- Flag fixes without regression tests as coverage gaps.
- Create a regression test inventory file (
regression-tests.json or regression-tests.md) mapping:
- Bug ticket ID to test file and test name.
- Severity of the original bug (critical, high, medium, low).
- Date the regression test was added.
- Current test status (passing, failing, skipped).
- Tag existing regression tests with metadata for traceability:
- Jest: Add
// @regression BUG-123 comments or use describe.each with ticket data.
- pytest: Apply
@pytest.mark.regression and @pytest.mark.bug("BUG-123") markers.
- JUnit: Use
@Tag("regression") and @DisplayName("BUG-123: description").
- Generate a regression coverage report showing:
- Total bugs fixed vs. bugs with regression tests (coverage percentage).
- Untested regressions ranked by severity.
- Tests that have become flaky or were disabled.
- Set up a CI check that fails the build if a bug-fix PR does not include at least one regression test.
- Schedule periodic audits (weekly or per-release) to verify all regression tests still pass and remain relevant.
Output
- Regression test inventory file mapping bugs to tests
- Tagged test files with regression markers and ticket references
- Coverage gap report listing bug fixes without regression tests
- CI configuration for regression test enforcement
- Release readiness checklist based on regression suite pass rate
Error Handling
| Error |
Cause |
Solution |
| Regression test passes but bug reappears |
Test does not cover the exact failure condition |
Review the original bug report; update the test to assert against the specific edge case |
| Orphaned regression tags |
Bug ticket was closed as duplicate or invalid |
Audit tags quarterly; remove or reassign tests for invalid tickets |
| Regression test consistently skipped |
Test marked as skip due to environment issues |
Fix the environment dependency or convert to an integration test with proper setup |
| False coverage gap |
Bug was fixed by a refactor that removed the vulnerable code path |
Mark as "resolved by removal" in the inventory; add a comment explaining why no test is needed |
| Flaky regression test |
Non-deterministic timing or data dependency |
Stabilize with retries, fixed seeds, or mocked clocks; tag as @flaky for monitoring |
Examples
pytest regression test with marker:
import pytest
@pytest.mark.regression
@pytest.mark.bug("GH-1042") # 1042 = configured value
def test_csv_export_handles_unicode_characters():
"""Regression: GH-1042 -- CSV export crashed on non-ASCII names."""
result = export_csv([{"name": "Rene"}])
assert "Rene" in result
assert result.startswith("name\n")
Jest regression test with ticket reference:
describe('BUG-789: Cart total calculation', () => { # 789 = configured value
it('applies percentage discount before tax', () => {
const cart = createCart([{ price: 100, qty: 2 }]);
cart.applyDiscount({ type: 'percent', value: 10 });
expect(cart.subtotal).toBe(180);
expect(cart.tax).toBe(18); // 10% tax on discounted subtotal
});
});
Regression inventory entry:
{
"BUG-1042": { # 1042 = configured value
"test_file": "tests/test_export.py::test_csv_export_handles_unicode_characters",
"severity": "high",
"added": "2026-01-15", # 2026 year
"status": "passing"
}
}
Resources
1---2name: tracking-regression-tests3description: Track and manage regression test suites across releases. Use when performing specialized testing. Trigger with phrases like "track regressions", "manage regression suite", or "validate against baseline".4license: MIT5---6# Regression Test Tracker
7
8## Overview
9
10Track, manage, and maintain regression test suites across releases to ensure previously fixed bugs stay fixed and existing features remain stable. Maps regression tests to bug tickets, monitors test health over time, and identifies gaps where fixed bugs lack corresponding regression tests.
11
12## Prerequisites
13
14- Test framework with tagging or marking support (`@tag`, `pytest.mark`, JUnit `@Tag`)
15- Bug tracking system with issue IDs (GitHub Issues, Jira, Linear)
16- Git history accessible for correlating bug fixes with test additions
17- Existing test suite with named test cases
18- CI pipeline producing test result artifacts (JUnit XML or JSON)
19
20## Instructions
21
221. Scan the codebase with Grep for bug-fix commits by searching commit messages for patterns like `fix:`, `bugfix`, `closes #`, or Jira ticket IDs.
232. For each bug-fix commit, check whether a corresponding regression test exists:
24 - Search test files for the bug ticket ID in test names, comments, or tags.
25 - Verify the test exercises the specific code path that was fixed.
26 - Flag fixes without regression tests as coverage gaps.
273. Create a regression test inventory file (`regression-tests.json` or `regression-tests.md`) mapping:
28 - Bug ticket ID to test file and test name.
29 - Severity of the original bug (critical, high, medium, low).
30 - Date the regression test was added.
31 - Current test status (passing, failing, skipped).
324. Tag existing regression tests with metadata for traceability:
33 - Jest: Add `// @regression BUG-123` comments or use `describe.each` with ticket data.
34 - pytest: Apply `@pytest.mark.regression` and `@pytest.mark.bug("BUG-123")` markers.
35 - JUnit: Use `@Tag("regression")` and `@DisplayName("BUG-123: description")`.
365. Generate a regression coverage report showing:
37 - Total bugs fixed vs. bugs with regression tests (coverage percentage).
38 - Untested regressions ranked by severity.
39 - Tests that have become flaky or were disabled.
406. Set up a CI check that fails the build if a bug-fix PR does not include at least one regression test.
417. Schedule periodic audits (weekly or per-release) to verify all regression tests still pass and remain relevant.
42
43## Output
44
45- Regression test inventory file mapping bugs to tests
46- Tagged test files with regression markers and ticket references
47- Coverage gap report listing bug fixes without regression tests
48- CI configuration for regression test enforcement
49- Release readiness checklist based on regression suite pass rate
50
51## Error Handling
52
53| Error | Cause | Solution |
54|-------|-------|---------|
55| Regression test passes but bug reappears | Test does not cover the exact failure condition | Review the original bug report; update the test to assert against the specific edge case |
56| Orphaned regression tags | Bug ticket was closed as duplicate or invalid | Audit tags quarterly; remove or reassign tests for invalid tickets |
57| Regression test consistently skipped | Test marked as `skip` due to environment issues | Fix the environment dependency or convert to an integration test with proper setup |
58| False coverage gap | Bug was fixed by a refactor that removed the vulnerable code path | Mark as "resolved by removal" in the inventory; add a comment explaining why no test is needed |
59| Flaky regression test | Non-deterministic timing or data dependency | Stabilize with retries, fixed seeds, or mocked clocks; tag as `@flaky` for monitoring |
60
61## Examples
62
63**pytest regression test with marker:**
64
65```python
66import pytest
67
68@pytest.mark.regression
69@pytest.mark.bug("GH-1042") # 1042 = configured value
70def test_csv_export_handles_unicode_characters():
71 """Regression: GH-1042 -- CSV export crashed on non-ASCII names."""
72 result = export_csv([{"name": "Rene"}])
73 assert "Rene" in result
74 assert result.startswith("name\n")
75```
76
77**Jest regression test with ticket reference:**
78
79```typescript
80describe('BUG-789: Cart total calculation', () => { # 789 = configured value
81 it('applies percentage discount before tax', () => {
82 const cart = createCart([{ price: 100, qty: 2 }]);
83 cart.applyDiscount({ type: 'percent', value: 10 });
84 expect(cart.subtotal).toBe(180);
85 expect(cart.tax).toBe(18); // 10% tax on discounted subtotal
86 });
87});
88```
89
90**Regression inventory entry:**
91
92```json
93{
94 "BUG-1042": { # 1042 = configured value
95 "test_file": "tests/test_export.py::test_csv_export_handles_unicode_characters",
96 "severity": "high",
97 "added": "2026-01-15", # 2026 year
98 "status": "passing"
99 }
100}
101```
102
103## Resources
104
105- pytest markers: https://docs.pytest.org/en/stable/how-to/mark.html
106- JUnit 5 tags: https://junit.org/junit5/docs/current/user-guide/#writing-tests-tagging-and-filtering
107- Jest describe/test organization: https://jestjs.io/docs/api#describename-fn
108- Regression testing best practices: https://martinfowler.com/bliki/SelfTestingCode.html