How to implement nested loop in jmeter?

前端 未结 1 1274
野的像风
野的像风 2020-12-21 08:22

I am thinking about how to test a servlet with two parameters: X and Y, using JMeter.

X and Y are random numbers from 0 to 100.

I am thinking of implement a

相关标签:
1条回答
  • 2020-12-21 09:12

    Your schema may be like the following below:

        Thread Group
            User Defined Variables
            maxX = 100
            maxY = 100
            Loop Controller X
            Loop Count: ${__BeanShell(Integer.parseInt(vars.get("maxX"))+1)}
            Counter X
            Start: 0
            Increment: 1
            Maximum: ${maxX}
            Reference Name: loopX
                Loop Controller Y
                Loop Count: ${__BeanShell(Integer.parseInt(vars.get("maxY"))+1)}
                Counter Y
                Start: 0
                Increment: 1
                Maximum: ${maxY}
                Reference Name: loopY
                        YOUR HTTP Request
                        servlet?param1=${loopX}&param2=${loopY}
                        . . .
    

    enter image description here

    Here you can find solution for your case but with CSV data sources used instead of counters:
    Looping 2 CSV files

    0 讨论(0)
提交回复
热议问题