jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 63065] Getting Typed variable declaration error after upgrading to jmeter 5.0
Date Tue, 08 Jan 2019 10:58:32 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=63065

--- Comment #8 from garun11@gmail.com ---
try{
checkDist = vars.get ("checkoutDistribution");
int checkDistInt = Integer.parseInt(checkDist);

addDist = vars.get("addToCartDistribution");
int addDistInt = Integer.parseInt(addDist);

int getRandom = ${_Random(1,100)};
if (getRandom <=checkDistInt) {
pdpCase = "0";
checkCase = "1";
}
else if (getRandom <=addDistInt) {
pdpCase = "1";
checkCase = "0";
}
else  {
pdpCase = "2";
checkCase = "0";
}

vars.put("pdpCase",pdpCase);
vars.put("checkoutCase",checkCase);
vars.put("hasUserLogin","guest");
} 
catch (Throwable e) {
  log.error("BSH threw an exception", e);
}

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message