In the up coming Kaltura server version, “Eagle” (CE5), we have developed the new, exciting Kaltura Server Testing Infrastructure. The new infrastructure utilizes PHPUnit (http://www.phpunit.de/manual/current/en/) to help you write, run and maintain tests easily.
*The Test infrastructure loads automatically even when using the PHPUnit command line runner.
The infrastructure provides the following key features:
Separation between the test logic, test data and test configuration – Adding, updating or deleting test cases is done by simply editing the data file – no logic changes.
Global data file – This enables you to define data once that is then shared between all tests such as Kaltura Partner ID, all test configurations are set when the tests are deployed.
Base assert functions for Kaltura API and server objects.
Automated generation of mock objects – the test data generator will create mock objects for your tests from a given server (database) and the objects ids.
One of the most exciting features is: automated correction of data files based on the failure report– after running a test, a new data file is generated and all failed fields are set with new updated values. All you have to do is go over the failure report and see if they are valid failures you want to override, if not, go, FIX your CODE and use the old data file again.
Automated API tests generator – adaptively create tests for every action and service, including plugins for the tested server.
For example – if you have a new plugin you can create tests for it automatically.
You can still use all of PHPUnit’s capabilities.
And those are just the key features. There are plenty more features such as opening a client for API tests and easy deployment on any server.
*Example of a test data file with 2 test procedures and several test cases.
Current use of the testing infrastructure
At Kaltura we use this infrastructure to enhance our server stabilization in multiple ways:
Full regression tests
Nightly test of the latest API code
Nightly test of the latest installation package
Nightly running of the server’s unit tests
Tune in for our next posts were we’ll share how to install, use and deploy the infrastructure.
Let us known the comments if you are interested in more use cases or have ideas about extending this infrastructure.
Contact us if you think this infrastructure can help you on your installation or general use of the Kaltura server.
Happy Testing 🙂
Kaltura's mission is to power any video experience. Our wide array of video solutions are deployed globally across thousands of enterprises, media companies, service providers, and educational institutions, leveraging video to teach, learn, communicate, collaborate, and entertain.