Uploaded image for project: 'Tsung development'
  1. Tsung development
  2. TSUN-210

If tag doesn't work with Dynvars from code eval

    Details

    • Type: Bug
    • Status: Not Yet Scheduled
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None
    • Environment:
      Ubuntu

      Description

      <setdynvars sourcetype="eval" code="fun(

      {Pid,DynVars}

      )->
      Rand = random:uniform(100),
      if
      Rand < 80 -> 1;
      _ -> 2;
      end
      end.">
      <var name="rnd_type" />
      </setdynvars>
      <if var="rnd_type" eq="1">
      <transaction name="chat_online">
      <request> <jabber type="chat" ack="no_ack" size="25" destination="online"></jabber> </request>
      </transaction>
      <thinktime min="1" max="3" random="true"></thinktime>
      </if>
      <if var="rnd_type" eq="2">
      <transaction name="chat_offline">
      <request> <jabber type="chat" ack="no_ack" size="25" destination="offline"></jabber> </request>
      </transaction>
      <thinktime min="1" max="3" random="true"></thinktime>
      </if>

      None of actions in 2 if happened. Am i wrong or misunderstand TSUNG. Please help

        Expenses

          Activity

          There are no comments yet on this issue.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development