Get random values from an array

前端 未结 3 2083
醉话见心
醉话见心 2020-12-16 23:15

I defined a new variable

Name        Value            Description
categories  (1, 2, 3, 4, 5)  my categories ids

and in my path i want to

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 23:23

    __StringFromArrayAtRandomindex is not part of JMeter core nor part of JMeter plugins.

    Is it a custom function ?

    Furthermore, you have a syntax error (there is a missing ) at end:

    ${__StringFromArrayAtRandomindex('1', '2', '3', '4', '5')}
    

    To do the same thing, use a CSV Data Set which will contain:

    1
    2
    3
    4
    5
    

    Set:

    Variable Names=categoryId
    

    You can then use it like this:

    ${categoryId} 
    

提交回复
热议问题