Per request, I’m adding some detail on the use of Jenkins and how I configured it to run the jobs and retain the details.
First, why did I use Jenkins? Several reasons:
- Jenkins is a build process, so by having the tests in Jenkins, I can kick off tests when a different job finishes building… i.e. developers push a new version of call control, and that starts the tests running
- Jenkins allows me to retain historical data easily
- Jenkins is push button, so anyone can come along and run the job.
Jekins Set Up with SIPP
Regarding my set up, from a high level, I needed Jenkins to kick off two simultaneous jobs… one is Running the SIPP load, and the other is capturing a PCAP during the test. The PCAP capture may not be necessary for your tests… But if you do want it, you’ll need to run the jobs simultaneously.
In Jenkins I use the Multi Job plugin: https://wiki.jenkins-ci.org/display/JENKINS/Multijob+Plugin
You then create a new project/job and set it up as a Multi-Job. On the job details, you add a build option for a Multi Job Phase. Then you can add multiple jobs to one phase.
This lets Jenkins run multiple jobs simultaneously.
Why not just have the parent job call the child jobs like job1, job2, etc.?
the answer is due to collecting pass/fail criteria. If you just have a Jenkins job kick off other jobs, the parent job will always pass, even if the children fail.
The MultiJob Plugin will fail the parent job, if the children jobs fail.
Jenkins Running Sipp
To run the SIPP command I have a Jenkins job just for that. In the Job details, under “Build Environment” I check “Execute Shell Script on Remote Host using SSH” (I believe this is avail with the SSH plugin.) NOTE: You must define your SSH host and login on the main Jenkins configuration.
In the Execute Shell Script text box, I add:
sudo sipp -s [Phone number] [Proxy] -sf /uac_pcap_g711.xml -m 2000 -mi [Proxy media IP] -d 1200 -trace_rtt -trace_err -stat_delimiter ,
That’s it. Now when this job is run, it will cd to the sipp folder, then run the sudo of sipp to call the number using our specific IP for the proxy.
In the packet capture job, I do the same thing as the SIPP job, I check off “Execute Shell Script…” but I point to a script I’ve made… like pcap.sh on the file structure. In that file, I have a call to run tshark for X seconds and Output the pcap file to a specific folder.
Then back to the MultiJob parent, it points to these two jobs, as one part of one phase.