打开jmeter右键选择线程组,点击线程组右键选择取样器,选择BeanShell取样器,
将这段代码粘贴 :String[ ] ip = {'需要参数化的ip',"10.20.xxx.xxx"有几个加几个}:
vars.put (‘host’,ip[${__random(0,2)}])从零开始算
然后将${host}作为变量填写到http请求里面ip里面
打开jmeter右键选择线程组,点击线程组右键选择取样器,选择BeanShell取样器,
将这段代码粘贴 :String[ ] ip = {'需要参数化的ip',"10.20.xxx.xxx"有几个加几个}:
vars.put (‘host’,ip[${__random(0,2)}])从零开始算
然后将${host}作为变量填写到http请求里面ip里面