发布新日志

  • Jmeter Random Variable配置项可以为每个线程生成随机变量

    2018-02-05 11:35:44

    配置元件Random Variable可以配置生成随机数,自定义输出格式,最大最小值,以及是否为每个线程单独生成:

    复制代码
    Variable Name:     uuid
    Output Format:     12345678-1234-4444-a123-000000000000
    Minimum Value:     111111111111
    Maximum Value:     999999999999
    Seed for Random function:${__Random(1,10,)} //如果指定为一个固定值,则每次迭代,各个线程得到的随机值都会相同
    Per Thread (User): True  //每个线程生成一个随机数
    复制代码
    复制代码
    iteration: 1
        thread: 1
            sampler 1: VALUE_1-1
            sampler 2: VALUE_1-1
            ...
        thread: 2
            sampler 1: VALUE_2-1
            sampler 2: VALUE_2-1
            ...
        ...
    iteration: 2
        thread: 1
            sampler 1: VALUE_1-2
            sampler 2: VALUE_1-2
            ...
        thread: 2
            sampler 1: VALUE_2-2
            sampler 2: VALUE_2-2
            ...
        ...
    复制代码
Open Toolbar