jmeter引入java的jar包BeanShell预处理内路径的引用
1、IDEA内 :package test
2、BeanShell预处理内:import test.Demo1Test
3、jmeter引用报文:
import test.Demo1Test;
//批量进件审批请求明文
String r = "[st\":[{\"peoName\":\"李三\",\"peoIdType\":\"0\",\"peoIdNo\":\"5759552844848093\",\"peoTel\":\"69941631\",\"relation\":\"02\"}],\"accountList\":[{\"acUse\":\"1\",\"acType\":\"11\",\"acNo\":\"6212261703007393554\",\"acName\":\"测试三\",\"bankNo\":\"03008\",\"idType\":\"0\",\"idNo\":\"110000199101031113\",\"phoneNo\":\"16905589921\",\"validDate\":\"2611\",\"cvvNo\":\"234\"},{\"acUse\":\"2\",\"acType\":\"11\",\"acNo\":\"6212261703007393554\",\"],\"callbackUrl\":null}]";
//把明文放入r内
vars.put("r",r);
Demo1Test demo1Test = new Demo1Test();
//调用test.jar包,加密之后放入ttt内
String ttt = demo1Test.jiami(r);
vars.put("ttt",ttt);