当前位置:网站首页>Learn BeanShell before you dare to say you know JMeter
Learn BeanShell before you dare to say you know JMeter
2022-07-02 04:40:00 【Peng Yuyan in the testing industry】
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 following is the supporting information , For doing 【 software test 】 For our friends, it should be the most comprehensive and complete war preparation warehouse , This warehouse also accompanied me through the most difficult journey , I hope it can help you !
Last : It can be in the official account : Programmer Xiaohao ! Get a free copy of 216 Page software testing engineer interview guide document information . And the corresponding video learning tutorial is free to share !, It 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. .
If my blog helps you 、 If you like my blog content , please “ give the thumbs-up ” “ Comment on ” “ Collection ” One button, three links ! Friends who like software testing , You can join our testing technology exchange group :779450660 There are various software testing resources and technical discussions )
边栏推荐
- Handling of inconsistency between cursor and hinttext position in shutter textfield
- Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
- [C language] Dynamic Planning --- from entry to standing up
- How muddy is the water in the medical beauty industry with a market scale of 100 billion?
- Shutdown procedure after 60
- CorelDRAW Graphics Suite2022免费图形设计软件
- Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
- Thinkphp6 limit interface access frequency
- Unity particle Foundation
- Mysql中常见的锁
猜你喜欢
Learn AI safety monitoring project from zero [attach detailed code]
Common sense of cloud server security settings
Pytoch --- use pytoch to realize u-net semantic segmentation
win10 磁盘管理 压缩卷 无法启动问题
Interview question: do you know the difference between deep copy and shallow copy? What is a reference copy?
idea自动导包和自动删包设置
cs架构下抓包的几种方法
Social media search engine optimization and its importance
Cannot activate CONDA virtual environment in vscode
[C language] Dynamic Planning --- from entry to standing up
随机推荐
unable to execute xxx. SH: operation not permitted
Wechat applet map annotation
Learn what definitelytyped is through the typescript development environment of SAP ui5
Let genuine SMS pressure measurement open source code
Summary of main account information of zhengdaliu 4
Free drawing software recommended - draw io
Pytorch---使用Pytorch进行图像定位
Oracle stored procedure and job task setting
Homework of the 16th week
Thinkphp Kernel wo system source Commercial Open source multi - user + multi - Customer Service + SMS + email notification
Cannot activate CONDA virtual environment in vscode
Okcc why is cloud call center better than traditional call center?
Message mechanism -- message processing
Common locks in MySQL
win11安装pytorch-gpu遇到的坑
Win10 disk management compressed volume cannot be started
Spring moves are coming. Watch the gods fight
Dare to go out for an interview without learning some distributed technology?
Unity particle Foundation
Mysql表insert中文变?号的问题解决办法