You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Describe MikeBuzzetti here. javascript examples

${__javaScript(Math.floor(Math.random() * 200),temp)}
Get a random number between 0 and 200, store it in temp (return temp)

${__javaScript(rndStocks =Math.floor(Math.random()*('${numberStocks}'));$numberStocks='${numberStocks}' - rndStocks; ,numberOfSellStocks)}
Get a random number between 0 and jmeter varialbe numberStocks then subtract that number from numberStocks returns rndStocks in numberOfSellStocks

  • No labels