4
votes

I would like to use a custom <iq> stanza with tsung (to test ejabberd).

Suppose my <iq> looks like this:

<iq type="get">
    <query Xmlns="jabberd:test:sample">
        <search term="l"></search>
     </query>
</iq> 

How would I add that into a tsung configuration like:

<transaction name="online">
    <request>
        <jabber type="chat" ack="no_ack" size="16" destination="online"</jabber>
    </request>
</transaction>
<thinktime value="300"></thinktime>`
1
Please take a look at these tips for how to improve your question: meta.stackexchange.com/questions/156810/…Nathaniel Waisbrot
please give the some idea for pass custom iq in tsung is there any example please suggestHari Haran

1 Answers

0
votes

Take a look at Section 6.6.3.11. raw XML here. You can specify custom XML stanzas using raw type jabber requests.

So your request above would look like this(make sure you escape your XML):

<jabber type="raw" ack="no_ack"
 data="&lt;iq type=&quot;get&quot;
         &gt;&lt;query Xmlns=&quot;jabberd:test:sample&quot;&gt;
           &lt;search term=&quot;l&quot;&gt;&lt;/search&gt;
         &lt;/query&gt;
       &lt;/iq&gt;">
</jabber>