public SampleResult runTest(JavaSamplerContext arg0) { log.info("<<<发送地址:" + conf.getBaseUri() + conf.getApiUri()); log.info("<<<发送数据:" + sb.toString()); try { HttpSend.doPost(conf, headMsg, sb.toString(), log); } catch (Exception e) { log.info("ERROR...", e); } results.setSuccessful(true); return results; }
public Arguments getDefaultParameters() { Arguments params = new Arguments(); conf.setApiUri("tradeorder/cancel/v1"); String confStr = gson.toJson(conf); String handMsg = gson.toJson(headMsg); params.addArgument("conf", confStr); params.addArgument("handMsg", handMsg); params.addArgument("orderSerial", "订单号,由商户生成"); params.addArgument("accountSerial", "账户编号"); params.addArgument("sourceApplySerial", "原基金公司订单编号"); params.addArgument("tradePassword", "交易密码,特殊授权的商户可以不传该字段"); params.addArgument("remark", "备注"); return params; }