====== Jmeter script performance=======
Thread group parameter transfer; mixed scene test
json extraction: s.. relative path writing
When a json extractor writes multiple json extractors, there must be a default value
If there is no corresponding multiple default value, jmeter will report an error, there is a red number 9 in the upper right corner, click the red number, logcat=== prompt error message
If there is a red number in the upper right corner, it means that the jmeter tool is running wrong.
Error: 1. The jmeter file is missing: 2. The jmeter component runs incorrectly
json is a fetcher, only response-body can be extracted
Regular extractor:
Response field selection: all parts of the http request, the content of the request part can be extracted
Regular expression: left boundary (regular expression) stone boundary
Only regular expression: (.*?)==-=== can match any content greedily
"createtime" : 1605615783454,
Left margin: general rule, take the smallest left margin createtime": [don't] space after the colon
Regular expression: (.*?)
With boundary: general rule, take the smallest right boundary empty
Template: $1$ ==== take the first () matching value
Commonly used regular expressions
The left and right boundary values, the middle matching content uses () to represent the regular expression matching in the user brackets
. Matches all characters except newline
* Match 0 or more times-greedy
+ Match 1 or more times-laziness
? Match 0 or 1 time
.* .+
\d \d+ [0-9]+ number
\w \w+ string of English letters or numbers
Scope: the scope of this element
The execution sequence of the sampler is from top to bottom (not including logic control)
======DDT Data Driven Test =======
DDT
According to the different data, the driving test result changes, so as to realize the test
Data storage method: txt, csv, xml\json\yml
Jmeter implements DDT (1)
csv data file settings ==== entry-level method
csv file, it is a text file separated by "comma", later, it was collected by excel
What is the default encoding format for excel files? ----------Not utf-8
csv file design, can be csv, txt, json suffix file
csv data file settings, to be precise, the support is a text file, not a csv
Notepad saves txt files, the default encoding ======utf-8
- File, use txt file as much as possible Reason: character set encoding
- Opening csv files consumes more local resources than txt, so when doing performance testing, try to use txt files
file path:
Relative path: the relative starting point is your current jmx file ./
Absolute path