Introducing Sippy Cup: SIPp Load Testing Made Easy

Recently the Mojo Lingo team has done a lot of work to improve the performance of Adhearsion, both internally to the project as well as when used in applications for some of our clients. The best way to observe the performance of something is to load it up and see where it falls down. In the telephony/VoIP world, load testing is often done with an Open Source tool known as SIPp. SIPp is truly great; I know of no other Open Source telephony testing tool that is as efficient at generating load and as flexible in what can be generated. For an introduction to load testing with SIPp, check out Luca’s great article on the subject.

SIPp is great, but…

SIPpAs great as SIPp is however, it’s not the easiest thing to use. It requires test scenarios to be written in a fairly verbose XML format. But even if you love XML, the real pain is lining up the call media. In our world, load tests usually need to interact like a human caller might. This primarily means sending DTMF button presses to the voice application. SIPp doesn’t send media by default, and it gets upset if you try to re-use/loop a single silent audio file (at least, it does without a third-party patch). But even then, it’s very easy to sleep just a little too long and have your telephony engine hang up for lack of received media. Usually this forces us to record an interaction with the application, then use SIPp to play that interaction back. But that makes setting up new test scenarios rather time consuming. Wouldn’t it be great if we could just describe the interactions in a test format, and have something construct the media for us?

Enter Sippy Cup

Yes, that would be great! Enter Sippy Cup. Sippy Cup is designed to make creating SIPp scenarios as painless as possible. And after creating your scenario, it can even test and log the results for you. No more remembering the arcane command line options!

Sippy Cup Scenario Steps

The syntax for creating a test scenario is designed to be as friendly as possible. As of the v0.2.0 release, here are the commands you can use in your test runs:

  • sleep <seconds> Wait a specified number of seconds
  • invite Send a SIP INVITE to the specified target
  • receive_trying Expect to receive a 100 Trying response from the target
  • receive_ringing Expect to receive a 180 Ringing response from the target
  • receive_progress Expect to receive a 183 Progress response from the target
  • receive_answer Expect to receive a 200 OK (answering the call) response from the target
  • wait_for_answer Convenient shortcut for receive_trying; receive_ringing; receive_progress; receive_answer, with all but the answer marked as optional
  • ack_answer Send an ACK in response to a 200 OK
  • send_digits <string> Send a DTMF string. May send one or many digits, including 0-9, *, #, and A-D
  • send_bye Send a BYE (hangup request)
  • receive_bye Expect to receive a BYE from the target
  • ack_bye Send an ACK in response to a BYE
  • wait_for_hangup Convenient shortcut for receive_bye; ack_bye

Running Sippy Cup

Given some basic information about the test, including the source and destination addresses, the number of calls to send, and these instructions, we can generate a SIPp scenario and accompanying audio file in PCAP format. Here’s a complete example:

$ cat my_scenario.yml
max_concurrent: 10
calls_per_second: 5
number_of_calls: 20
  - invite
  - wait_for_answer
  - ack_answer
  - sleep 3
  - send_digits '3125551234'
  - sleep 5
  - send_digits '#'
  - wait_for_bye

$ sippy_cup -c my_scenario.yml
Compiling media to my_test_scenario.pcap...done.
Compiling scenario to my_test_scenario.xml...done.

Now you can take the my_test_scenario.xml and run it with SIPp. Or, you can let Sippy Cup do it for you:

$ sippy_cup -r my_scenario.yml
Preparing to run SIPp command: "sudo sipp -i -p 8836 -sf /Users/bklang/src/sippy_cup/my_test_scenario.xml -l 10 -m 20 -r 5 -s 1 > /dev/null 2>&1"
# test run output removed

Get Started!

For more information on the Sippy Cup project, check out the Sippy Cup home page or check out the code on Github. And get to testing those voice applications!

Subscribe to our mailing list

* indicates required
I want to read about...
Email Format

9 thoughts on “Introducing Sippy Cup: SIPp Load Testing Made Easy

  1. Thank you for making sipp testing easier. How can I inject CSV fields into the yml file? Here is my yml file that clearly doesn’t work:

    max_concurrent: 10
    calls_per_second: 5
    number_of_calls: 20
    - invite
    - wait_for_answer
    - ack_answer
    - sleep 3
    - sleep 20
    # choose option
    - send_digits '1'
    - sleep 5
    # enter ID
    - send_digits [field0]
    - sleep 10
    # enter password
    - send_digits [field1]
    # logout
    - sleep 60
    - wait_for_bye
    • Unfortunately SippyCup does not currently have support for referencing CSV files from YAML. It’s something we’d like to add, but haven’t yet. Pull requests to add this functionality would be welcome :)

      Also, you can still use SippyCup to create (compile) the scenario and then run the result through sipp manually with the CSV options.

  2. A very handy tool but have you thought about making a web version? People could visit your site, complete an online form or select a template, maybe retrieve previous configured tests and download the required files and command line to run. Even more simple plus allows users to share tests and maybe test results. Saves you having to install and learn another tool.

What do you think?