wants to insert the phone number of 135, enter the formula =RANDBETWEEN(13500000000,13599999999).
Here is the result generated by excel:
13529542520
13530064418
13519555817
13567783918
13512706205
13528176869
13523997184
dataMap.put("version", paramsMap.get("version"));1 dataMap.put("channelSource", paramsMap.get("channelSource")); dataMap.put("sourceType", paramsMap.get("sourceType")); dataMap.put("hostApp", paramsMap.get("hostApp"));1 dataMap.put("token", paramsMap.get("token"));1 dataMap.put("timestamp", paramsMap.get("timestamp"));1 dataMap.put("userNo", paramsMap.get("userNo"));1 dataMap.put("productCode", paramsMap.get("productCode"));1 dataMap.put("method", paramsMap.get("method"));1
The rules encrypt the following parameters, first take session=public_key_1, and then encrypt the parameters, arrange them in the order of Arabic numerals and syllables, and use Jmeter's MD5 encryption.
${__substring(${__time(yyyyMMdd,)},6,8)}= 24 The __substring function takes the substring in the string and specifies the starting subscript ${__substring(hell world,5,10,)} = world ${__time(yyyyMMdd,)} =20170224 //Return the year, month, day
[plain] view plain copy ${__time(,)} 1450056496991 //No formatting parameters, returns the current millisecond time ${__time(yyyyMMdd,)} 20170223 //Return the year month day ${__time(HHmmss,60)} 170116 //Return hours, minutes and seconds ${__time(yyyyMMdd-HHmmss,)} 20170223-170116 //全 ${__time(yyyy-MM-dd HH:mm:ss,ReqTime)} Displayed as -> 2016-11-28 20:01:32
6. Excel function to generate IP randomly
=ROUND(RAND()*255,0)&"."&ROUND(RAND()*255,0)&"."&ROUND(RAND()*255,0)&"."&ROUND(RAND()*255,0)
The random data is as follows:
Do not add the random function compiler to the stress test script before the stress test. Because the random function, MD5, is to be calculated. Each computation consumes memory and response time. Impact test.
So try to do it well and put the data in a CSV file.
7. Regular expression, filter data less than 5 digits. Select regular expressions for notepad++
To replace the short number with less than 5 digits, use notepad++ to remove the number of digits less than 5 digits and replace it with empty. ^.{0,5}\r\n
8. The random number of the mobile phone number is obtained, and the mobile phone in different cities
Enter the following formula, then fill the formula down to the right:
=CHOOSE(RANDBETWEEN(1,10),1510204,1589025,1390522,1352017,1370592,1870529,1800572,1800521,1307529,1306529)&TEXT(RANDBETWEEN(0,10^4-1),"0000")
The formula is divided into two parts, CHOOSE(RANDBETWEEN(1,10), 1515204, 1589525, 1390522) means randomly select one of three numbers from 1515204, 1589525, 1390522; TEXT(RANDBETWEEN(0,10^4-1), "0000 ") indicates that the random number between 0-9999 is displayed in 4 digits. Thereby, the effect of randomly generating a number in a given number segment is realized.
Make mobile numbers in different cities
9. Vlookup in EXCEL, CONCATENATE----& splicing, function application splicing data
& Splicing Equivalent to CONCATENATE
Replace countless lines with one line in notpad++, and replace \r\n with empty
Replacement succeeded
Manual concatenation function CONCATENATE