Minimal testcase
From Achievo/ATK Wiki
Often, you will encounter a problem for which you seek help on the forum or otherwise. Or you have found a bug for which you want to file a testcase in bugzilla.
In both cases, it is important to create a *minimal testcase*. This increases the chance that someone will actuall try your testcase, and it will also increase the chance that the problem can be found.
A minimal testcase is a piece of code that is stripped down as much as possible, in such a way, that it still demonstrates the problem. Here are some guidelines for creating a minimal testcase:
- Include only those nodes that take part in the problem. Usually you only need to include multiple nodes if you have a problem with one of the relations.
- Strip any attribute, override and custom functions that do not influence the problem. Just strip it from the app, and see if the problem still exists.
- Provide the testcase in the form of a module that another developer can install without hassle. This means adding a module.inc file and a .sql file for creating the necessary table.
- Documentation in the code helps.