refactor: 前端输入框Mock补全JMeter内置函数的提示

This commit is contained in:
CaptainB 2022-09-26 15:56:47 +08:00 committed by f2c-ci-robot[bot]
parent 5a1e8d4ec2
commit f066d9c5ca
1 changed files with 23 additions and 9 deletions

View File

@ -145,39 +145,53 @@ export const MOCKJS_FUNC = [
export const JMETER_FUNC = [ export const JMETER_FUNC = [
{type: "Information", name: "${__threadNum}", description: "get thread number"}, {type: "Information", name: "${__threadNum}", description: "get thread number"},
{type: "Information", name: "${__threadGroupName}", description: "get thread group name"},
{type: "Information", name: "${__samplerName}", description: "get the sampler name (label)"}, {type: "Information", name: "${__samplerName}", description: "get the sampler name (label)"},
{type: "Information", name: "${__machineIP}", description: "get the local machine IP address"}, {type: "Information", name: "${__machineIP}", description: "get the local machine IP address"},
{type: "Information", name: "${__machineName}", description: "get the local machine name"}, {type: "Information", name: "${__machineName}", description: "get the local machine name"},
{type: "Information", name: "${__time}", description: "return current time in various formats"}, {type: "Information", name: "${__time}", description: "return current time in various formats"},
{type: "Information", name: "${__timeShift}", description: "return a date in various formats with the specified amount of seconds/minutes/hours/days added"},
{type: "Information", name: "${__log}", description: "log (or display) a message (and return the value)"}, {type: "Information", name: "${__log}", description: "log (or display) a message (and return the value)"},
{type: "Information", name: "${__logn}", description: "log (or display) a message (empty return value)"}, {type: "Information", name: "${__logn}", description: "log (or display) a message (empty return value)"},
{type: "Input", name: "${__StringFromFile}", description: "read a line from a file"}, {type: "Input", name: "${__StringFromFile}", description: "read a line from a file"},
{type: "Input", name: "${__FileToString}", description: "read an entire file"}, {type: "Input", name: "${__FileToString}", description: "read an entire file"},
{type: "Input", name: "${__CSVRead}", description: "read from CSV definitioned file"}, {type: "Input", name: "${__CSVRead}", description: "read from CSV delimited file"},
{type: "Input", name: "${__XPath}", description: "Use an XPath expression to read from a file"}, {type: "Input", name: "${__XPath}", description: "Use an XPath expression to read from a file"},
{type: "Input", name: "${__StringToFile}", description: "write a string to a file"},
{type: "Calculation", name: "${__counter}", description: "generate an incrementing number"}, {type: "Calculation", name: "${__counter}", description: "generate an incrementing number"},
{type: "Formatting", name: "${__dateTimeConvert}", description: "Convert a date or time from source to target format"},
{type: "Calculation", name: "${__digest}", description: "Generate a digest (SHA-1, SHA-256, MD5...)"},
{type: "Calculation", name: "${__intSum}", description: "add int numbers"}, {type: "Calculation", name: "${__intSum}", description: "add int numbers"},
{type: "Calculation", name: "${__longSum}", description: "add long numbers"}, {type: "Calculation", name: "${__longSum}", description: "add long numbers"},
{type: "Calculation", name: "${__Random}", description: "generate a random number"}, {type: "Calculation", name: "${__Random}", description: "generate a random number"},
{type: "Calculation", name: "${__RandomDate}", description: "generate random date within a specific date range"},
{type: "Calculation", name: "${__RandomFromMultipleVars}", description: "extracts an element from the values of a set of variables separated by |"},
{type: "Calculation", name: "${__RandomString}", description: "generate a random string"}, {type: "Calculation", name: "${__RandomString}", description: "generate a random string"},
{type: "Calculation", name: "${__UUID}", description: "generate a random type 4 UUID"}, {type: "Calculation", name: "${__UUID}", description: "generate a random type 4 UUID"},
{type: "Scripting", name: "${__groovy}", description: "run an Apache Groovy script"},
{type: "Scripting", name: "${__BeanShell}", description: "run a BeanShell script"}, {type: "Scripting", name: "${__BeanShell}", description: "run a BeanShell script"},
{type: "Scripting", name: "${__javaScript}", description: "process JavaScript (Mozilla Rhino)"}, {type: "Scripting", name: "${__javaScript}", description: "process JavaScript (Nashorn)"},
{type: "Scripting", name: "${__jexl}", description: "evaluate a Commons Jexl expression"}, {type: "Scripting", name: "${__jexl2}", description: "evaluate a Commons Jexl2 expression"},
{type: "Scripting", name: "${__jexl2}", description: "evaluate a Commons Jexl expression"}, {type: "Scripting", name: "${__jexl3}", description: "evaluate a Commons Jexl3 expression"},
{type: "Properties", name: "${__isPropDefined}", description: "Test if a property exists"},
{type: "Properties", name: "${__property}", description: "read a property"}, {type: "Properties", name: "${__property}", description: "read a property"},
{type: "Properties", name: "${__P}", description: "read a property (shorthand method)"}, {type: "Properties", name: "${__P}", description: "read a property (shorthand method)"},
{type: "Properties", name: "${__setProperty}", description: "set a JMeter property"}, {type: "Properties", name: "${__setProperty}", description: "set a JMeter property"},
{type: "Variables", name: "${__split}", description: "Split a string into variables"}, {type: "Variables", name: "${__split}", description: "Split a string into variables"},
{type: "Variables", name: "${__V}", description: "evaluate a variable name"},
{type: "Variables", name: "${__eval}", description: "evaluate a variable expression"}, {type: "Variables", name: "${__eval}", description: "evaluate a variable expression"},
{type: "Variables", name: "${__evalVar}", description: "evaluate an expression stored in a variable"}, {type: "Variables", name: "${__evalVar}", description: "evaluate an expression stored in a variable"},
{type: "String", name: "${__regexFunction}", description: "parse previous response using a regular expression"}, {type: "Properties", name: "${__isVarDefined}", description: "Test if a variable exists"},
{type: "String", name: "${__escapeOroRegexpChars}", description: "quote meta chars used by ORO regular expression"}, {type: "Variables", name: "${__V}", description: "evaluate a variable name"},
{type: "String", name: "${__char}", description: "generate Unicode char values from a list of numbers"}, {type: "String", name: "${__char}", description: "generate Unicode char values from a list of numbers"},
{type: "String", name: "${__unescape}", description: "Process strings containing Java escapes (e.g. & )"}, {type: "String", name: "${__changeCase}", description: "Change case following different modes"},
{type: "String", name: "${__unescapeHtml}", description: "Decode HTML-encoded strings"},
{type: "String", name: "${__escapeHtml}", description: "Encode strings using HTML encoding"}, {type: "String", name: "${__escapeHtml}", description: "Encode strings using HTML encoding"},
{type: "String", name: "${__escapeOroRegexpChars}", description: "quote meta chars used by ORO regular expression"},
{type: "String", name: "${__escapeXml}", description: "Encode strings using XMl encoding"},
{type: "String", name: "${__regexFunction}", description: "parse previous response using a regular expression"},
{type: "String", name: "${__unescape}", description: "Process strings containing Java escapes (e.g. \n & \t)"},
{type: "String", name: "${__unescapeHtml}", description: "Decode HTML-encoded strings"},
{type: "String", name: "${__urldecode}", description: "Decode a application/x-www-form-urlencoded string"},
{type: "String", name: "${__urlencode}", description: "Encode a string to a application/x-www-form-urlencoded string"},
{type: "String", name: "${__TestPlanName}", description: "Return name of current test plan"}, {type: "String", name: "${__TestPlanName}", description: "Return name of current test plan"},
] ]