1、添加自定义函数,增加 号码生成函数 MobileGenerator和身份证生成函数IdCardGenerator
在package org.apache.jmeter.functions;中增加自定义函数,详细参照代码:https://gitee.com/hongyeao/jmeter-hh
2、导入自定义jar
(1)创建字符串截取方法
1 package com.example.Controller; 2 3 public class TestJar { 4 public String doAppend(String mobile){ 5 String newmobile = ""; 6 newmobile = mobile.substring(0,3); 7 return newmobile; 8 } 9 10 }