目前我正在研究 jmeter 中的负载拆分方案。
我的测试计划结构如下所示:
TestPlan
BeanShell Preprocessor (here I have below code)
Integer totalLoad = 0;
Integer searchUsers = 0;
Integer createUseres = 0;
totalLoad = Integer.parseInt (vars.get("TOTALUSERS"));
searchUsers = ((totalLoad / 100) * 40); createUseres =((totalLoad / 100) * 10); guestUsers = ((totalLoad / 100) * 50);
vars.put("searchUsers", searchUsers.toString());
vars.put("createUseres", createUseres.toString());
vars.put("guestUsers", guestUsers.toString());
Thread group: Search (I am using ${searchUsers} in the number of Threads(users) field)
Thread group: Create (I am using ${createUseres} in the number of Threads(users) field)
Thread group: Guest (I am using ${guestUsers} in the number of Threads(users) field)
这对我不起作用。
你能帮忙吗?