Kamailio source tree include a set of few dozen of shell-based unit tests developed several years ago, residing inside test/unit/ of the source code tree. They were more or less not actively maintained during the past few years.
Based on the interest from the community and discussions during past IRC development meetings as well as panels at Kamailio World Conference, a new effort was started recently to built a unit testing framework leveraging Docker.
The first version has been published on GitHub, being available at:
It has only few tests by now, but we hope to grow their number significantly in the near future. As a matter of fact, Giacomo Vacca is going to do an workshop about it at the next Kamailio World Conference, during May 14-16, in Berlin, Germany.
The unit tests have been run when releasing a new stable version during the past months. They leverage tools such as sipp or sipsak for generating SIP traffic and testing routing scenarios, but some of them go beyond SIP and detect source code issues such as missing symbols or broken dependencies.
The architecture of the unit testing framework is still a moving target, we aim to provide something easy for community members to contribute to as well as require for newly added modules to be accompanied by a set of basic tests.
One of the main benefits it would be to have the reports of the issues that can be reproduced submitted along with a unit test. It would make it easier to troubleshoot and then after fixing it, would be tested always before releases in order to avoid regressions.
Right now, a good help from community would represent converting the old unit tests to the new framework, afterwards we can decommission test/unit. The conversion should be rather easy, as we still rely on shell and the sip tools like sipp/sipsak … If you want to help here by you need clarifications or get stuck somewhere, just write to mailing list and I would be more than happy to assist. Such contributions should be submitted as pull requests in order to be easy to review:
This post is to open the discussion about the unit testing framework to the broad community. To participate, write us on sr-users mailing list.
Looking forward to meeting many of you at Kamailio World Conference 2018, it is only one month away!