[英]Tsung dynamic variables scope
I want to write a test case for a user hitting a websockets server with thousands of different packets generated by tsung, but I received only the same packet thousands of times. 我想编写一个测试案例,供用户使用tsung生成的成千上万个不同数据包访问Websockets服务器,但我只收到同一数据包数千次。
What is the scope of Tsung's dyn variables? Tsung的dyn变量的范围是什么?
....
<session name="websocket" probability="100" type="ts_websocket">
<setdynvars sourcetype="random_number" start="9" end="16">
<var name="randomNum" />
</setdynvars>
<for from="1" to="10" incr="1" var="counter">
<request subst="true">
<websocket frame="text" ack="no_ack" type="message">
{"randomNumber":%%_randomNum%%}
</websocket>
</request>
</for>
</session>
....
For each user I'll receive 10 messages all with the same "randomNumber", but I want the number to change between each of those 10 messages. 对于每个用户,我将收到全部具有相同“ randomNumber”的10条消息,但我希望数字在这10条消息之间进行切换。
我们可以结束我只需要将dyn_variable放入其中的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.