sipp使用

本文档介绍了如何使用SIPp进行压力测试,包括如何配置XML场景文件和CSV变量文件。XML文件用于定义测试流程,如注册、认证等场景。CSV文件则提供了变量值,供SIPp在测试过程中读取。通过调整CSV文件,可以实现大规模的压力测试。此外,还给出了401和407认证响应的处理方法。
摘要由CSDN通过智能技术生成

在安装sipp之后,把自己写的xml文件及其相应的csv文件与sipp这个可执行文件放在一起,运行如下命令即可:

  ./sipp -sf test.xml -inf test.csv -p 6077 -i <local-ip> -m 4 <ip address of registrar>:5060

     -sf  读取场景文件


     -inf 读取csv文件


     -p  本机采用端口


     -i  本机IP

     -m  要进行压力测试的次数


     Ip address of registrar  要进行压力测试的IP地址

 

xml文件其实描述了一个测试环境,其实最详细的还是sipp官网上的文档

http://sipp.sourceforge.net/doc3.0/reference.html


1.关于xml文件

下面放两个网上找的xml文件的例子,出处不明,原创不知:


例1:

模拟若干个注册包到AST,AST回 407 authentication,SIPp发送invite带auth验证消息到AST,AST回100 tring 和200 ok。SIPp回Bye消息,AST回200 ok。


Register­----------->AST


401<----------------AST


Register----------->AST


100<----------------AST


200<----------------AST


编写该SIP得发包流程得场景xml文件内容如下
<?xml version="1.0" encoding="ISO-8859-1" ?>


<!DOCTYPE scenario SYSTEM "sipp.dtd">

 

 


<!-- This program is free software; you can redistribute it and/or      -->


<!-- modify it under the terms of the GNU General Public License as     -->


<!-- published by the Free Software Foundation; either version 2 of the -->


<!-- License, or (at your option) any later version.                    -->


<!--                                                                    -->


<!-- This program is distributed in the hope that it will be useful,    -->


<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of     -->


<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      -->


<!-- GNU General Public License for more details.                       -->


<!--                                                                    -->


<!-- You should have received a copy of the GNU General Public License  -->


<!-- along with this program; if not, write to the                      -->


<!-- Free Software Foundation, Inc.,                                    -->


<!-- 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
                     -->

<!--                                                               

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值