Glpi now uses atoum for its unit tests!

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.

Introducing GLPI 9.1

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 !

0.90 release date, plugins directory and suggest

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.

New life for GLPI

The GLPI project has reached its thirteenth year of existence with several hundred thousand downloads, several thousand references and the many millions of machines managed by GLPI bearing witness to its success.

However, while the community users has grown exponentially, the team of contributors has remained stable and has even been reduced over the new legitimate aspirations of its members. In the same way, the available capacity of the association remained too limited to allow the professionalisation/salarisation of the developers as expected. We have worked hard to find solutions.

We are perfectly aware that, in order to develop GLPI, make it evolve and progress to match our ambitions and users hope, we need to increase significantly the human and financial resources allocated to this project. We are also aware of the limits of the actual associative and community framework in releasing the needed human and financial resources. After a long brainstorming and a rigorous analysis, we have chosen to change to an entrepreneurship model and to give the management of the project to the TECLIB Company.

It is now TECLIB that will ensure the life and evolution of the GLPI project. As an historical partner of the project, TECLIB is more likely to guarantee the growth of the project, both technically and philosophically, while preserving its users and its model under a free license.

Of course, this transfer will be progressive and the current team will be working beside TECLIB to provide the best support.

In the coming months, you will be pleased to see the strong involvement and the new energies, since many surprises have already been planned.

We would like to sincerely thank our entire community for their support and loyalty throughout these years.

Jean-Mathieu Doléans, Founder of project GLPI / Core Team

Julien Dombre, Development Manager / Core Team

GLPI 0.85 Release Candidate 2

We are very happy to announce the birth of the second release candidate of the v0.85 : GLPI-0.85-RC2.

We want to thanks all of you who work on the beta-test to debug or to translate GLPI.

First of all !!! WARNING !!! this version is not the final version of the 0.85.

Its aim is to allow you to test it and to find remaining bugs. We do not advise you to use this version in production.

You can download this version with the download section.

You could contribute at that time of final debug by testing this version and by making reviews of all bugs or problems that you encountered by using it. You can do it directly on the mailing-list (glpi-dev prefered) or using the forum section bug beta tests

You will find the list of the improvements made by this new version here

Best regards,

The development team

GLPI 0.85 Release Candidate 1

We are very happy to announce the birth of the first release candidate of the v0.85 : GLPI-0.85-RC1.

We want to thanks all of you who work on the beta-test to debug or to translate GLPI.

First of all !!! WARNING !!! this version is not the final version of the 0.85.

Its aim is to allow you to test it and to find remaining bugs. We do not advise you to use this version in production.

You can download this version with the download section.

You could contribute at that time of final debug by testing this version and by making reviews of all bugs or problems that you encountered by using it. You can do it directly on the mailing-list (glpi-dev prefered) or using the forum section bug beta tests

You will find the list of the improvements made by this new version here

Best regards,

The development team