${__BeanShell(123*456,)}:返回56088;
${__BeanShell(source("function.bsh",))}:執行在function.bsh中的腳本;
${__changeCase(test,UPPER,upper_test)}
${__char(65,66)},變成AB
${__counter(FALSE,i)}; 全局計數器
${__counter(TRUE,i)}; 每一個用戶有本身的計數器
${__CSVRead(E:\user_info.csv,0)};讀取第一列的值 ${__CSVRead(E:\user_info.csv,next())}; 每次讀取下一次的值,配合第一條使用,不然不知道從哪裏開始 ${__CSVRead(E:\user_info.csv,*user_info)};使用別名,而後經過如下方法獲取數據 ${__CSVRead(*user_info, 1)}
${__dateTimeConvert(01212018,MMddyyyy,dd/MM/yyyy,)}
${__dateTimeConvert(1526574881000,,dd/MM/yyyy HH:mm,)}; 官方例子,可是本地沒試出來
關於撒鹽加密(salt)java
使用salt加密,它的基本想法是這樣的:
1.用戶註冊時,在密碼上撒一些鹽。生成一種味道,記住味道。
2.用戶再次登錄時,在輸入的密碼上撒鹽,聞一聞,判斷是否和原來的味道相同,相同就讓你吃飯。
正則表達式![]()
${__digest(MD5,test,1,,)}
${__escapeOroRegexpChars([^"].+?,test)}
${__escapeXml("bread" & 'butter')}
name=Smith column=age table=birthdays SQL=select ${column} from ${table} where name='${name}' ${__eval(${SQL})}; 引用SQL變量
QUERY = select ${column} from ${table}; column=name, table=customers
${__evalVar(QUERY)} = select name from customers
${__FileToString(E:\user_info.csv,utf-8,user_info)}
${__groovy(123*456,test)}
${__intSum(1,2,3,4,5,6,7,8,test)}
${__isPropDefined(START.HMS)}
${__isVarDefined(JMeterThread.last_sample_ok)}
${__javaScript(new Date(),date)}
${__jexl2(vars.get("START.YMD"),test)}
${__jexl3(vars.get("START.YMD"),test)}
${__log(testing,ERR,error throw test,error test)}
與__log相似,不過它只記錄一條日誌,不返回值。算法
${__logn(testing,,)}
${__longSum(1,2,3,4,sum)}
${__machineIP(ip)}
${__machineName(name)}
${__P(group1.threads,)}
${__property(log_level.jmeter,log_Level,)}
${__Random(1,20,random_num)}
${__RandomDate(,,2050-07-08,,)}
${__RandomFromMultipleVars(a|b|c|d|e,select)}
${__RandomString(5,a3fxis,random_char)}
${__regexFunction(road(.*)test,$1$,1,,,,)}
${__samplerName(sample_name)}
${__setProperty(log_level.jmeter,Debug,true)}
${__split(test|is|intresting,para,|)}
${__StringFromFile(D:\user_info.txt,info,,)}
${__TestPlanName}
${__threadNum}
${__time(yyyy-MM-dd hh:mm:ss,)}
${__timeShift(yyyy-MM-dd HH:mm:ss,PT20.345S,,,c)}
${__unescape(\r\n)}
${__unescapeHtml( )}
${__urldecode(Word+%22school%22+is+%22%C3%A9cole%22+in+french)}
${__urlencode(Word "school" is "école" in french)}
${__UUID}
${A1} - 能夠正確訪問 ${A${N}} - 沒法訪問,嵌套變量 ${__V(A${N})} - 能夠訪問。A${N}變成A1,__V函數返回A1的值
${__XPath(/path/to/build.xml,//target/@name)}
原文連接:https://www.jianshu.com/p/c66b846e2ada
apache