当前位置:网站首页>Day22 send request and parameterization using JMeter
Day22 send request and parameterization using JMeter
2022-06-25 05:52:00 【Small fish】
Use JMeter Send a request
send out Get Request with parameters

stay http Write the corresponding request path in the request , Parameter with kv Format write parameters

stay http Request that the default value be set web The default value of the server
- The default agreement is http
- The default port is 80

send out post request
And send get Request consistent steps , Just change the request type to post

If you need to json Format sending parameters need to be added http The header manager adds... To the manager content-type:application/json, Check right post Use multipart/form-data

Send a file

- File name : Write a specific path
- Parameter name : Parameter name in actual case
- MIME type :multipart/form-data

keep cookie

add to http cookie Manager


JMeter Generation script
- Generate scripts by recording
- Third party tool recording (badboy etc. )
- adopt jmeter Bring your own proxy server for recording
- Manually capture packets and write scripts
Add... Under test plan http proxy server

The port can be set to a port that is not occupied by the machine
Target controller : Save the recorded script under the thread group

Exclusion mode , Exclude by adding suggestions , Filter out the static resources in the request .( These resources have no impact on performance )
Set up a proxy server in the browser , The port number should be the same as jmeter Consistent settings
Start the browser and then operate ,jmeter Will record into script

If you record a script for a local project , Use the set proxy when accessing ip To visit , Otherwise, you cannot record

Jmeter A parameterized
If you need to iterate through a request 10 Time , It is required to send different parameter values for each request
- Jmeter You can use parameterized test operations , Common parameterization methods include user-defined variables and CSV
Use defined variables
How to add : test plan -> Thread group -> The configuration element -> User defined variables
Operation steps :
- Add thread group
- Add user-defined variables ( Add... In the test plan attributes by configuring components or between )
- add to HTTP request
- Add view result tree
advantage : All the places that need this value use one variable , Easy to maintain
Inferiority : Multiple users can only take one value , Multiple values cannot be used by multiple users


Use ${ Parameter name } Call parameters
CSV File parameterization
How to add : test plan -> Thread group -> The configuration element ->CSV data
Operation steps :
- Add thread group
- Definition CSV file
- add to CSV Data file settings
- add to HTTP request
- Add view result tree
advantage : Different values can be taken for the same user after multiple cycles , It is suitable for parametric testing with large amount of data , It is a common method in interface testing or performance testing



![[ Failed to transfer the external chain picture , The origin station may have anti-theft chain mechanism , It is suggested to save the pictures and upload them directly (img-WmJMEB5o-1645265315859)(C:\Users\HP\AppData\Roaming\Typora\typora-user-images\image-20220219180106406.png)]](/img/a6/8e4c77e54d52f13e2c0a8a881366bc.jpg)
Three requests log in with three accounts respectively
边栏推荐
- Guava immutable set
- Semantic segmentation fcns in the wild: pixel level adaptive and constraint based adaptation
- The e-book "action guide for large organizations to further promote zero code application platform" was officially released!
- Classic usage of the sumproduct function
- Jenkins installation and configuration
- Soft exam information system project manager_ Information system security management - Senior Information System Project Manager of soft test 026
- [interview with a large factory] meituan had two meetings. Was there a surprise in the end?
- Try with resource close resource flow
- Technology inventory: past, present and future of Message Oriented Middleware
- Create a complete binary tree in array order
猜你喜欢
Learn the interface test, see it is very good, and make a note
Use generator-easy-ui5 to quickly create the engineering structure of SAP ui5 applications

Invalid bound statement (not found)

2022.1.23 diary
Do you know what a three-tier architecture is?

MySQL tuning -- 02 -- slow query log
Part 34 of SAP ui5 application development tutorial - device adaptation of SAP ui5 application based on device type
How SAP ui5 device type detection device API works

ThreadLocal
SAP ui5 application development tutorial XXIX - Introduction to routing and navigation functions of SAP ui5 trial version
随机推荐
CVPR2021-Semi-supervised Domain Adaptation based on Dual-level Domain Mixing for Semantic Segmentati
Configuration file ui5 local in SAP ui5 tools Configuration points of yaml
Duplicate symbols for architecture i386 clang
Semantic segmentation cvpr2020 unsupervised intra domain adaptation for semantic segmentation through self supervision
CST8227
Monkey test of APP automation
16 application problem solving
ArcGIS Engine + Visual Studio installation tutorial
Kyma application connectivity feature introduction
Double recursion in deep analysis merge sort
C language -- Sanzi chess
Aiot project that is an introduction to the basics of the Internet of things and can be implemented in practice
The k-th node of the binary search tree [sword finger offer]
SAP ui5 date type sap ui. model. type. Analysis of date parsing format
Try with resource close resource flow
Semantic segmentation cvpr2019-advance: advantageous enterprise minimization for domain adaptation in semantic segmentation
Guava new collection type
Wind farm visualization: wind farm data
JMeter stress testing and agent recording
Array introduction plus example 01