1、使用BeanShell Sampler,写如下代码:
import java.util.UUID; UUID uuid1 = UUID.randomUUID();//获取UUID的值 //把uuid中的‘-’去掉,从左开始取32位字符,然后传给变量id vars.put是beanshell的赋值函数 vars.put("id",(uuid1.toString()).toUpperCase().replaceAll("-","").substring(0,32));
标签:UUID,vars,32,截取,uuid1,put,jmeter,id From: https://www.cnblogs.com/yan-test/p/16772870.html