Ideally, every non-trivial bug fix will have a regression test. Consider making and documenting a policy that requires that bug fixes will have accompanying regression tests, or some searchable justification (Trac keyword?) for why it's infeasible to add one. (Often this is a symptom that the underlying code is too complex and needs refactoring.)
This documentation should probably be somewhere under doc/HACKING.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
After discussion on IRC, it seems like [query:keywords=~test-waiver test-waiver] might be a reasonable keyword to use to mark tickets where we decide that it's infeasible to add a regression test for a bug.
Such a ticket should contain a written justification for why it's infeasible to add a regression test covering the bug. This can include excessive code complexity or the requirement for external test fixtures that need to be manually set up.
Being able to easily search Trac for such tickets will make it easier to locate places where we could improve the testability of our code.
Also patch reviewers should make sure the patch contains a regression test, and if one isn't present, make sure that there's a test-waiver keyword along with a comment explaining why that patch should be an exception from this rule. The reviewer should also review the justification and decide whether it's reasonable.
Do we also have a policy requiring any new features to have unit tests?
I think we should make it consistent across all tickets, and use the test-waiver keyword when we merge any code without tests. (Then we can search for "defect" or "regression" and "test-waiver" to find defect waivers, or regression waivers.)
Also, let's start trialing this for (some?) new code/tickets straight away, so we work out the bugs in the process.
I think CodingStandards.md already requires unit tests for new functionality. Also, I think we should be really strict about allowing waivers for testing of new functionality. I guess there are some features where pre-existing technical debt makes it really hard to add tests for the new stuff, but in those cases I would argue strongly for paying down the technical debt prior to implementing the new features.