by Alexandre Delaunay | Jun 9, 2017 | Blog, News
About 2 years ago, we’ve begin to add some unit tests in the GLPI project; thanks to Valentin and Remi Collet. The PHPUnit framework has been used, since this is the most “common” choice for a PHP project.
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:
- testing variables types (if you test an integer and get a string, this is not correct),
- wonderful mocking system (that permit to mock php native functions, constants, …),
- use closure to test outputs, exceptions, … (way more interesting than phpunit’s annotations),
- concurrent run of tests (even if it have been disabled for GLPI),
- fully isolated tests,
- chained calls,
- more natural way to write tests (this is maybe just my point of view – but this is really more simple to me).
Also, GLPI is a French project, most core team members are French, just as atoum! 😉
On a technical note
Switching 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:
- atoum is not permissive at all. Every notice in the code will make tests fail per default (which is a good point); we had to fix them;
- we’re doing kind of functional tests and not only unit tests. Some existing tests used to change existing values in the database, before resetting them. That cannot be done running tests concurrently;
- atoum does not support dependencies across tests; which phpunit does. It should seem a bad point, but the point is “tests are isolated”. So… They cannot be dependent, we had to find another way;
- session usage: GLPI uses many data in the session; and that is really a problem for testing… We had to disable concurrent runs mainly because of that :’(
The future
In 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.
by Alexandre Delaunay | Apr 28, 2017 | Annonce, Blog
Après plusieurs semaines de développement, Teclib’ a le plaisir de vous annoncer la sortie de GLPI version 9.1.3. L’archive de la version 9.1.3 est disponible sur github.
Vous trouverez ci-dessous la liste des changements les plus importants de cette version corrective :
- correction d’un problème lors de la sauvegarde des adresses des entités,
- correction de l’ajout d’observateurs lors de la création de tickets,
- correction de la recherche globale sur le parc,
- correction de divers problèmes liés au planning (liste vide sur le bureau, export ical),
- correction de vérifications des droits dans les tickets (certaines actions restaient disponibles même à l’état résolu),
- corrections diverses sur l’API (vérifications additionnelles, erreurs dans la documentation),
- corrections sur l’export des recherches (pied de page, pagination).
Voir le journal des changements complet pour plus de détails. Nous remercions toutes les personnes qui ont contribué à cette nouvelle version et plus généralement toutes celles et ceux qui soutiennent régulièrement le projet GLPI.
by Alexandre Delaunay | Jan 23, 2017 | Annonce, Blog
Après plusieurs semaines de développement, Teclib’ a le plaisir de vous annoncer la sortie de GLPI version 9.1.2.
L’archive de la version 9.1.2 est (more…)
by Alexandre Delaunay | Nov 17, 2016 | Annonce, Blog
La nouvelle version mineure GLPi 9.1.1 contient des améliorations et apporte des corrections de bugs, telles que :
- Correction de problèmes de sécurité (more…)
by Alexandre Delaunay | Feb 23, 2016 | Blog, News
Dear Users,
To begin with, we reviewed GLPi’s version numbering (actual version is 0.90.1). Indeed, during the past 13 years of existence and after more than 80 releases, we received many requests for the release of version 1.0. Thus, we eventually decided it was time for a change! However, as releasing a version 1.0 would not completely reflect GLPi’s maturity and history, we chose to jump directly to version 9.1 instead of 0.91.
Furthermore, we are proud to announce that GLPi version 9.1 is due for release in spring, and includes the following features:
- a new and modern calendar view (based on Infotel’s work)
- a lock mecanism for assets and tickets (Olivier Moron, Raynet SAS – ARaymond Network contribution)
- a search engine for licenses
- an integrated REST API
- time to own & time to resolve, for tickets (Infotel contribution)
- simplified and dynamic way to add items to a ticket (Infotel contribution)
- many bug fixes and new features
The team is currently integrating these new features, and would stabilize the software in the coming weeks.
Thank you for using GLPi and for being part of our Innovative Community. Stay tuned for more news !
by Alexandre Delaunay | Sep 21, 2015 | Blog, News
Dear GLPi users,
We have good news to share with you. GLPi 0.90 release has been planned : 8 october 2015 ! Teclib’ and our contributors are working hard to release their plugins before this new version.
We’re also introducing a new plugin directory website featuring an improved user interface. We’re working hard to improve it, by adding user account creation for plugin submission and notification for new plugin’s versions. Please do not hesitate to let us comments, bugs or pull requests on the github forge .
To finish, we’ve setup a new service for feature proposals. Submitting a feature was not an easy process, consisting of a post on the forum and the creation a ticket by a GLPi developer on the forge. Now you can submit a feature, or vote for features already submitted.
The GLPi team would like to thanks you for using GLPi and being part of our wide community.