sipp

Using sipp variable inside <exec> section


How to inject a string from SIPP command line into <exec> section of script ?

SIPP wiki talks about declaration but not how to use it inside <exec>

CMD:

    sipp -sf sipp_pcap.txt ........ -key k1 "5060" -set pcap_file "abc.pcap"

sipp_pcap.txt

    <scenario name=" UAC">
    <Global variables="pcap_file" />
    <Reference variables="pcap_file" />

    ………..
    ……….


                     <exec play_pcap_video="/root/backup/[$pcap_file]” />

    …………..
    ……………..

Solution

  • There was issue with sipp v.3.3 and in sipp v.3.5 its working, if you use key instead of set like below:

    CMD:

        sipp -sf sipp_pcap.txt ........ -key k1 "5060" -key pcap_file "abc.pcap"
    

    sipp_pcap.txt

        <scenario name=" UAC">
        <Global variables="pcap_file" />
        <Reference variables="pcap_file" />
    
        ………..
        ……….
    
                         // no $ symbol
                         <exec play_pcap_video="/root/backup/[pcap_file]” />
    
        …………..
        ……………..
    

    PS: Still do not know how to use with set