[Tsung] how to use parse_bidi

Nicolas Niclausse nicolas at niclux.org
Mon Jun 16 09:01:13 CEST 2008


Srivatsan Raghavan ecrivait le 14.06.2008 01:45:
> hey all, i'm writing a plugin for my company's custom protocol for 
> tsung.  and the idea is you login first, then you test various commands 
> in a single transaction.
> 
> atm i've put them all into various attributes in a single new tag.  but 
> it appears i can do roundtrip communications using parse_bidi, but i'm 
> unclear how i can do
> extended n-level communications like this, for instance
> 1) login -> login_id
> 2) if login successful ->   make_query_x( login_id)
> 3) if query_x_successful -> make_query_y(login_id)
> 4) logout(login_id)

Do you parse the response of your server ? If yes, then your can store the 
result of the login in the State (state_rcv.dyndata) returned by 
yourprotocol:parse()

Then, use add_dynparams to change the next request parameters according to 
the current state.



-- 
Nicolas


More information about the Tsung-users mailing list