Manual › Tools

Testing the program

The test folder has two scripts that you can run from the root folder of the source (the one that has src, lib and scenarios). You need a JDK; scenario_test.py needs Python 3.6 or newer.

  • test/run.sh - the unit tests of the program code. It compiles the sources into a temporary folder and runs the tests one after the other. Every check prints PASS or FAIL. They cover, among other things, sending RTP to several clients, SRTP, keyword replacement, scenario comments, H.264 video, the serial number and the Machine-ID, the security tools, Trace to Scenario and the Command tab. Run test/run.sh bench for the speed test of the keyword replacement.
  • test/scenario_test.py - runs scenario files against each other. A server scenario and a client scenario that belong together (test/pairs.txt lists the pairs) are started with the real program, the client makes the calls, and the result is judged. Options let you set how many calls, how many at the same time and at what speed: test/scenario_test.py -n 1000 -c 50 --cps 100 Reg makes 1000 registrations, 50 at a time, 100 per second. This is a good way to check that a new scenario has its counterpart and to load-test.