Unfortunately, many parts of the code are not tested yet... This is a huge job; but we’re working on it. Nowadays, each new feature implemented in GLPI is unit tested; and we plan to spend time this summer to work on all of this.Why now?I personally appreciate atoum since its very beginning, and I’ve proposed to switch a while ago. Since we plan to add more and more tests; switching while there are still a few tests was easier. That’s why it’s been done now.So, why to switch?Well... Speaking of PHP unit testing frameworks, there are not so many possible choices. PHPunit is probably the oldest unit testing framework available for PHP; and it does the job, really. atoum is a more recent and modern choice, and it has some interesting capabilities:
Also, GLPI is a French project, most core team members are French, just as atoum! 😉On a technical noteSwitching from PHPUnit to atoum is not something very difficult, especially if you did not yet use advanced features (which is the case for GLPI); but it is not really something that can be scripted. In facts, it could for some common cases, but reviewing tests is not something bad globally. Also, re-writing tests is a very good start point to learn new syntax, asserters and possibilities.For the GLPI project, we’ve spent two days working on the rewrite. What we had to take care of:
The futureIn a close future, we plan to improve our unit tests; since many parts of the code are not tested at all. We also plan to split our unique directory into several ones, making possible to disable concurrent runs only on functional tests, not on the whole tests suite.Johan Cwiklinski.