The R&D team makes extensive use of PHP unit tests in order to ensure functional correctness in all the icingaweb2 modules integrated into NetEye 4. In fact, for each icingaweb2 module we developed a PHPUnit component that allows us to perform unit tests on all PHP classes and functions present in the module. These PHP unit tests are included in the devel package of the module, which contains all the tests developed for the module.
These kinds of tests are of course part of the continuous automated testing process performed in our continuous integration pipeline.
Until now each icingaweb2 module shipped a dedicated script php_run_tests.sh for executing all the PHPUnit tests of the module, whose aim was to:
Download the third-party libraries needed to execute the unit tests contained in the module
Execute all the unit tests present in the module
Remove all the libraries just downloaded
This approach had two main downsides:
There was a significant time overhead for unit test execution of each icingaweb2 module (as well as network overhead) caused by downloading the third-party libraries
Code was duplicated due to the replication of the script php_run_tests.sh in each icingaweb2 module
To solve these two issues, we decided to create a new rpm package called php-neteye-devel, which is now a required dependency for each icingaweb2devel package.
We solved the first issue by shipping within the php-neteye-devel package all the third-party libraries needed for running PHP unit tests. All devel packages for Icingaweb2 modules now have to simply declare a dependency on php-neteye-devel. In this way all the third party libraries needed for PHP unit tests will be pre-installed whenever a devel package for icingaweb2 is installed.
The second issue was solved by generalizing the script that executes the PHP unit tests of a single icingaweb2 module. The devel packages in each icingaweb2 module will now only have to create a symbolic link to the new, generalized script.
As the NetEye R&D team, we sometimes need to develop features in NetEye that require a lot of work to finish implementing. To handle the development of these features, we're always trying to divide the work into smaller, more manageable Read More
Over the course of the last few years, we've introduced more and more features in NetEye 4. This fact has had a side effect that's not directly visible to customers, namely that we keep adding more and more tests to Read More
In the last few weeks the NetEye development team and the Alyvix development team have been collaborating to achieve support for Time Periods in Alyvix. In this blog post, we'd like to share some interesting challenges that this feature has Read More
Suggested reader skill level: Proficient in software development Reading time: 10 min What you will learn: “Blockchain is hard.” Even if everyone has heard this sentence at least once, the truth is that it's not. It’s just a database, with Read More
With the introduction of the Composable Index Templates in Elastic, we at NetEye had to redesign the way index settings and mappings are applied to the indices generated by El Proxy. In this post I'll explain: How the new Composable Read More