but (want to) use it for automated testing because it gets the job done...
Python configuring and launching the infamous SIPp using an api inspired by requests
- Launch multi-UA scenarios (aka SIPp subprocesses) sanely
- avoids nightmarish shell command concoctions from multiple terminals
- allows for complex functional or end-to-end SIP testing
- Reuse your existing SIPp XML scripts
- Integrate nicely with pytest
- Auto-generate SIPp XML scripts like sippy_cup
- we believe this is the wrong way to work around the problem of SIPp's shitty XML control language
Launching the default UAC scenario is a short line:
import pysipp
pysipp.client(destaddr=('10.10.8.88', 5060))()
Manually running the default uac
--calls--> uas
scenario is also simple:
uas = pysipp.server(srcaddr=('10.10.8.88', 5060))
uac = pysipp.client(destaddr=uas.srcaddr)
# run server async
uas(block=False) # returns a `pysipp.launch.PopenRunner` instance by default
uac() # run client synchronously
For multi-UA orchestrations we can use a pysipp.scenario
.
The scenario from above is the default agent configuration:
scen = pysipp.scenario()
scen() # run uac and uas synchronously to completion
Say you have a couple SIPp xml scrips and a device you're looking to test using them (eg. a B2BUA or SIP proxy). Assuming you've organized the scripts nicely in a directory like so:
< 8000 div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test_scenario/ uac.xml referer_uas.xml referee_uas.xml">test_scenario/
uac.xml
referer_uas.xml
referee_uas.xml