All Projects → SIPp → Pysipp

SIPp / Pysipp

Licence: gpl-2.0
SIPp for Humans - launch multiple agents with Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pysipp

Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+5342.57%)
Mutual labels:  testing-tools, test-automation
Detox
High velocity native mobile development requires us to adopt continuous integration workflows, which means our reliance on manual QA has to drop significantly. Detox tests your mobile app while it’s running in a real device/simulator, interacting with it just like a real user.
Stars: ✭ 8,988 (+8799.01%)
Mutual labels:  test-automation, testing-tools
Carina
Carina automation framework: Web, Mobile, API, DB
Stars: ✭ 549 (+443.56%)
Mutual labels:  testing-tools, test-automation
Tlsfuzzer
SSL and TLS protocol test suite and fuzzer
Stars: ✭ 335 (+231.68%)
Mutual labels:  testing-tools, test-automation
System tester
A Development Tool for creating and managing system tests for Ruby on Rails >= 5.1 Applications
Stars: ✭ 73 (-27.72%)
Mutual labels:  testing-tools, test-automation
Es Check
Checks the version of ES in JavaScript files with simple shell commands 🏆
Stars: ✭ 448 (+343.56%)
Mutual labels:  testing-tools, test-automation
Pyats Docker
Dockerfile and scripts for pyATS
Stars: ✭ 34 (-66.34%)
Mutual labels:  testing-tools, test-automation
DeepfakeHTTP
DeepfakeHTTP is a web server that uses HTTP dumps as a source for responses.
Stars: ✭ 373 (+269.31%)
Mutual labels:  test-automation, testing-tools
Meissa
Cross-platform Distributed Test Runner. Executes tests in parallel, time balanced on multiple machines.
Stars: ✭ 66 (-34.65%)
Mutual labels:  testing-tools, test-automation
Qtools
QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS
Stars: ✭ 64 (-36.63%)
Mutual labels:  testing-tools, test-automation
Nut.js
Native UI testing / controlling with node
Stars: ✭ 309 (+205.94%)
Mutual labels:  testing-tools, test-automation
Testcafe
A Node.js tool to automate end-to-end web testing.
Stars: ✭ 9,176 (+8985.15%)
Mutual labels:  testing-tools, test-automation
sbml-test-suite
The SBML Test Suite is a conformance testing system. It allows developers and users to test the degree and correctness of the SBML support provided in a software package.
Stars: ✭ 21 (-79.21%)
Mutual labels:  test-automation, testing-tools
Awesome Test Automation
A curated list of awesome test automation frameworks, tools, libraries, and software for different programming languages. Sponsored by http://sdclabs.com
Stars: ✭ 4,712 (+4565.35%)
Mutual labels:  testing-tools, test-automation
jdbdt
JDBDT: Java Database Delta Testing
Stars: ✭ 12 (-88.12%)
Mutual labels:  test-automation, testing-tools
Cypress
Fast, easy and reliable testing for anything that runs in a browser.
Stars: ✭ 35,145 (+34697.03%)
Mutual labels:  testing-tools, test-automation
request-baskets
HTTP requests collector to test webhooks, notifications, REST clients and more ...
Stars: ✭ 149 (+47.52%)
Mutual labels:  test-automation, testing-tools
Openrunner
Computest Openrunner: Benchmark and functional testing for frontend-heavy web applications
Stars: ✭ 16 (-84.16%)
Mutual labels:  test-automation, testing-tools
Zazkia
tcp proxy to simulate connection problems
Stars: ✭ 49 (-51.49%)
Mutual labels:  testing-tools, test-automation
Awesome K6
A curated list of resources on automated load- and performance testing using k6 🗻
Stars: ✭ 78 (-22.77%)
Mutual labels:  testing-tools, test-automation

Build Status

pysipp is for people who hate SIPp

but (want to) use it for automated testing because it gets the job done...

What is it?

Python configuring and launching the infamous SIPp using an api inspired by requests

It definitely lets you

  • 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

It doesn't try to

  • Auto-generate SIPp XML scripts like sippy_cup
    • pysipp in no way tries to work around the problem of SIPp's awful XML control language; your current scenario scripts are compatible!

Basic Usage

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

Authentication

When using the [authentication] sipp keyword in scenarios, providing the credentials can be done with the auth_username and auth_password arguments, for example:

pysipp.client(auth_username='sipp', auth_password='sipp-pass')

Multiple Agents

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:

test_scenario/
  uac.xml
  referer_uas.xml
  referee_uas.xml

If you've configured your DUT to listen for for SIP on 10.10.8.1:5060 and route traffic to the destination specified in the SIP Request-URI header and your local ip address is 10.10.8.8:

scen = pysipp.scenario(dirpath='path/to/test_scenario/',
                       proxyaddr=('10.10.8.1', 5060))

# run all agents in sequence starting with servers
scen()

pysipp by default uses -screen_file SIPp argument to redirect output, but this argument is only available in SIPp version >= 3.5.0, for lower versions to run properly, this argument must be disable setting enable_screen_file to False:

scen = pysipp.scenario(enable_screen_file=False)

If you've got multiple such scenario directories you can iterate over them:

for path, scen in pysipp.walk('path/to/scendirs/root/'):
    print("Running scenario collected from {}".format(path))
    scen()

Async Scenario Launching

You can also launch multiple multi-UA scenarios concurrently using non-blocking mode:

scens = []
for path, scen in pysipp.walk('path/to/scendirs/root/', proxyaddr=('10.10.8.1', 5060)):
    print("Running scenario collected from {}".format(path))
    scen(block=False)
    scens.append(scen)

# All scenarios should now be running concurrently so we can continue
# program execution...
print("Continuing program execution...")

# Wait to collect all the results
print("Finalizing all scenarios and collecting results")
for scen in scens:
  scen.finalize()

scen.finalize() actually calls a special cleanup function defined in the pysipp_run_protocol hook which invokes the internal reporting functions and returns a dict of cmd -> process items.

API

To see the mapping of SIPp command line args to pysipp.agent.UserAgent attributes, take a look at pysipp.command.sipp_spec. This should give you an idea of what can be set on each agent.

Features

  • (a)synchronous multi-scenario invocation
  • fully plugin-able thanks to pluggy
  • detailed console reporting

... more to come!

Dependencies

SIPp duh...Get the latest version on github

Install

from git

pip install git+git://github.com/SIPp/pysipp.git

Hopes and dreams

I'd love to see pysipp become a standard end-to-end unit testing tool for SIPp itself (particularly if paired with pytest).

Other thoughts are that someone might one day write actual Python bindings to the internals of SIPp such that a pure Python DSL can be used instead of the silly default xml SIP-flow mini-language. If/when that happens, pysipp can serve as a front end interface.

Advanced Usage

pysipp comes packed with some nifty features for customizing SIPp default command configuration and launching as well as detailed console reporting. There is even support for remote execution of SIPp over the network using rpyc

Enable detailed console reporting

pysipp.utils.log_to_stderr("DEBUG")

Applying default settings

For now see #4

More to come?

  • document attributes / flags
  • writing plugins
  • using a pysipp_conf.py
  • remote execution
  • async mult-scenario load testing
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].