当前位置:网站首页>JMeter cross thread parameter association requires no script
JMeter cross thread parameter association requires no script
2022-06-30 22:37:00 【Software testing Xiaobai】
Jmeter Cross thread parameter correlation requires no script
In multithreaded operation , We may need to find the required content in the response data , Extract this content and use it as the data rented by the next thread , To this end, I bring you a simple method !
One 、 The demo website is public 、 We use utf-8 The encoding format of , At the same time, we set up Chinese
Get into jmeter Of bin Under the table of contents , find jmeter.porperties file , Open in Notepad

newly added / Modify the configuration file , Maintain the good usage habits of the Chinese people 、 And the character encoding set I can understand

Change to Chinese , Tools can be used clearly

Code set in line with national conditions , This size is not out of order
Two 、 start-up jmter、 Demo start
Add thread group 、 Header correlator 、 Fruit trees —— Put on the shelf first

Pictured —— Just in case we check in the test plan :
Run each thread group independently
Add http request , Let's distinguish thread groups , Add a unique identifier to each thread group

Let's fill in everything that should be filled in , Here's the point
stay http Add on request xpath Extractor

xpath The extractor is http The subordinate of the request , Do not add the wrong location
Check use tidy—— Don't ask why , You have to tick
Customize a variable val( It can be anything you want , Of course, don't write in Chinese )
Xpath query expression : This is the content of the response data that we need to extract
Match the Numbers : Default -1 Represents the return of all elements , We changed it 1 Just one , It can also be 0 Any one
The default value : You can leave it blank
In thread group A Next, add a sampler , First choice Beanshell Sampler
Open the function assistant to find setProperty, Attribute name customize a variable ,value of porperty Add to what we just defined xpath The variable of , Generate directly after completion

It can be copied directly to us Beanshell In the sampler

Although I wrote the script , We didn't write any code
Thread group A And the setting is completed , Now start setting the thread group B

Or function assistant 、porperty, The attribute name has just been set out
We directly generate , Can see the referenced variables ${val}, It was before xpath Variable
Finally, add our function —— Be accomplished
The verification results , Run


Extracted //title

At a glance
welfare

边栏推荐
- [Android, kotlin, tflite] mobile device integration depth learning light model tflite (image classification)
- 后疫情时代,云计算如何为在线教育保驾护航
- How to change the win11 computer name? Win11 method of changing computer name
- 唯一性索引与逻辑删除冲突问题解决思路
- Discuz forum speed up to delete XXX under data/log PHP file
- Is it difficult to get a certified equipment supervisor? What is the relationship with the supervising engineer?
- "More Ford, more China" saw through the clouds, and the orders of Changan Ford's flagship products exceeded 10000
- 【BSP视频教程】BSP视频教程第19期:单片机BootLoader的AES加密实战,含上位机和下位机代码全开源(2022-06-26)
- Apache server OpenSSL upgrade
- Wechat applet transmits parameters (data-) by clicking events
猜你喜欢

Anfulai embedded weekly report no. 270: June 13, 2022 to June 19, 2022

KubeVela 1.4:让应用交付更安全、上手更简单、过程更透明

MIT博士论文 | 优化理论与机器学习实践

总结的一些内存问题

Where can I find the computer device manager

在线客服聊天系统源码_美观强大golang内核开发_二进制运行傻瓜式安装_附搭建教程...

腾讯3年,功能测试进阶自动化测试,送给在手工测试中迷茫的你

Nansen复盘加密巨头自救:如何阻止百亿多米诺倾塌

Anfulai embedded weekly report no. 271: June 20, 2022 to June 26, 2022

深入解析 Apache BookKeeper 系列:第四篇—背压
随机推荐
Redis的事务和锁机制
Nansen double disk encryption giant self rescue: how to prevent the collapse of billions of dominoes
Redis - 01 缓存:如何利用读缓存提高系统性能?
ESP8266 成为客户端和服务器
远程办公期间,项目小组微信群打卡 | 社区征文
How to upload binary pictures in uniapp
Ten of the most heart piercing tests / programmer jokes, read the vast crowd, how to find?
[golang] golang实现截取字符串函数SubStr
Some memory problems summarized
Meet the StreamNative | 杨子棵:是什么让我放弃了大厂 Offer
Web APIs comprehensive case -tab column switching - dark horse programmer
Win11如何优化服务?Win11优化服务的方法
严格次小生成树
多线程经典案例
Apache server OpenSSL upgrade
Win11电脑名如何更改?Win11更改电脑名的方法
Youfu network hybrid cloud accelerates enterprise digital transformation and upgrading
Flip the linked list ii[three ways to flip the linked list +dummyhead/ head insertion / tail insertion]
[450. delete nodes in binary search tree]
How to ensure the security of our core drawings by drawing encryption