TA的每日心情 | 开心 2018-5-18 16:44 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
各位大侠,小弟在使用loadrunner测试用java 写的脚本时,遇到异常,我的action里的方法如下:
public int action() throws Throwable {
Map request = new HashMap();
// Map request = new ConcurrentHashMap();
//Map control =new ConcurrentHashMap();
Map control= new HashMap();
String partid=RandomStringUtils.random(14, false, true);//数字
String name=RandomStringUtils.random(8, true, false);//字母
String language=RandomStringUtils.random(3, false, true);
String local=RandomStringUtils.random(3, true, false);
control.put("requestId", "<requestID>");//参数化
control.put("requesterLocale", local);
control.put("requesterLanguage", language);
control.put("requesterName", name);
//control.put("pageStartIndex", "1");
//control.put("pageEndIndex", "2");
//request.put("**Id", partid);
request.put("control", control);
request.put("version", "1.0");
request.put("inquiryLevel", new Integer(2));
request.put("idTpCd", "<idtpcd>");
request.put("refNum", "<refNum>");
request.put("contactName", "<contactname>");
request.put(TRADE_CODE, "ecif.getPersonByCondition");
request.put("version", "1");
System.out.println("===========ecif.getPersonByCondition=========");
lr.start_transaction("my request");
tp.submit(request);
lr.end_transaction("my request", lr.AUTO);
return 0;
}//end of action
在controler里面运行时就老报java.util.ConcurrentModificationException ,请高手指点 |
|