当前位置:网站首页>Learn BeanShell before you dare to say you know JMeter
Learn BeanShell before you dare to say you know JMeter
2022-07-03 01:47:00 【Software testing Jun】
jmeter Of BeanShell Sampler, You can quote java Code , There are the following 3 Ways of planting :
Direct input java Code
Import java file
Import class file
BeanShell Script accesses variables mainly through vars and props To visit , Common main methods are as follows :
vars.get( Variable name ): Get the value corresponding to the defined variable , contain BeanShell Script generation variables ;
vars.put( Variable name , A variable's value ): Generate new variables or modify existing variables ;
props.get( Variable name ): obtain jmeter.properties Define the corresponding value of the variable in ;
01 Direct input Java Code
1、 stay testplan Add variable value to
add to BeanShell Sampler, Pay attention to BeanShell One must be added before and after Debug Sampler, It should be convenient for debugging to see the result , Added Debug Sampler No need for any operation .
Run to view the execution results
2、 stay jmeter Call method used in
View results
02 BeanShell Introduction in Java file
Write a Java Save the file to the desktop
stay BeanShell Introduce the Java file
View the results of the execution
03 BeanShell Introduction in class file
View the generated results
04 BeanShell Realize encryption and decryption
1、 stay IDEA Write the encrypted script in
2、 Then export the entire package file , Generate jar package
3、 take jar Put the package file in jmeter Of lib/ext Under the table of contents
And then in jmeter Of BeanShell This class is introduced in , Call the encryption method
View debugging results
Save the encrypted data to mdm In this variable , For jmeter Use in .
The technology industry should continue to learn , Don't fight alone in your study , It's best to keep warm , Achieve each other and grow together , The effect of mass effect is very powerful , Let's learn together , Punch in together , Will be more motivated to learn , And you can stick to it . You can join our testing technology exchange group :914172719( There are various software testing resources and technical discussions )
Here's a message for you , Mutual encouragement : When our abilities are insufficient , The first thing to do is internal practice ! When we are strong enough , You can look outside !
Finally, we also prepared a supporting learning resource for you , You can scan the QR code below via wechat , Get one for free 216 Page software testing engineer interview guide document information . And the corresponding video learning tutorial is free to share !, The information includes basic knowledge 、Linux necessary 、Shell、 The principles of the Internet 、Mysql database 、 Special topic of bag capturing tools 、 Interface testing tool 、 Test advanced -Python Programming 、Web automated testing 、APP automated testing 、 Interface automation testing 、 Testing advanced continuous integration 、 Test architecture development test framework 、 Performance testing 、 Safety test, etc. .
Friends who like software testing , If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One button, three links !
Good article recommends
Interview : First tier cities move bricks ! Another software testing post ,5000 That's enough …
What kind of person is suitable for software testing ?
The man who leaves work on time , Promoted before me …
The test post changes jobs repeatedly , Jump, jump and disappear …
“ One year in the job , The automated software test hired by high salary was discouraged .”
边栏推荐
- Telecom Customer Churn Prediction challenge
- Pytest learning notes (12) -allure feature · @allure Step () and allure attach
- Network security - vulnerabilities and Trojans
- 网络安全-最简单的病毒
- Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
- Vim 9.0正式发布!新版脚本执行速度最高提升100倍
- LeetCode 987. Vertical order transverse of a binary tree - Binary Tree Series Question 7
- Smart management of Green Cities: Digital twin underground integrated pipe gallery platform
- Network security - man in the middle attack
- 【数据挖掘】任务1:距离计算
猜你喜欢
C#应用程序界面开发基础——窗体控制(2)——MDI窗体
[interview question] 1369 when can't I use arrow function?
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-9
[Appendix 6 Application of reflection] Application of reflection: dynamic agent
【数据挖掘】任务2:医学数据库MIMIC-III数据处理
[技术发展-23]:DSP在未来融合网络中的应用
Leetcode skimming questions_ Sum of two numbers II - enter an ordered array
Virtual list
Wireshark data analysis and forensics a.pacapng
C#应用程序界面开发基础——窗体控制(1)——Form窗体
随机推荐
【数据挖掘】任务6:DBSCAN聚类
电信客户流失预测挑战赛
"Jetpack - livedata parsing"
[data mining] task 2: mimic-iii data processing of medical database
网络安全-木马
[error record] the shutter component reports an error (no directionality widget found. | richtext widgets require a directionality)
技术大佬准备就绪,话题C位由你决定
Network security - man in the middle attack
PS去除水印详解
Common English Vocabulary
High-Resolution Network (篇一):原理刨析
什么是调。调的故事
VIM 9.0 is officially released! The execution speed of the new script can be increased by up to 100 times
String splicing function of MySQL
Problems encountered in small program development of dark horse shopping mall
Openresty cache
[data mining] task 3: decision tree classification
Network security - Information Collection
【Camera专题】手把手撸一份驱动 到 点亮Camera
网络安全-动态路由协议RIP