jmeter BeanShell 预处理程序随机返回指定列表中自定义的值
String[] query = new String[]{"Baidu Search","Friends","Google Search","LinkedIn","Tik Tok","Twitter","WeChat","YouTube"};
String[] version = new String[]{"4.2.0","4.2.1","4.3.4","4.3.0","5.0.0"};
Random random = new Random();
int i = random.nextInt(query.length);
int x = random.nextInt(version.length);
vars.put("randomOption",query[i]);//传给jmeter
vars.put("version",version[x]);