当前位置:网站首页>2.2 JMeter基本元件
2.2 JMeter基本元件
2022-07-27 14:44:00 【fd-度假的鱼】
2.2 JMeter基本元件
元件:多个类似功能组件的容器统称
组件:实现独立某个功能的统称(类似函数)
取样器:不同协议实现的组件
2.2.1 JMeter元件类型
基本元件:
线程组:模拟用户的
配置元件:进行测试环境和测试数据的初始化。类似自定化脚本中的setup
前置处理器:对要发送的请求进行预处理。类似自动化脚本中的参数化
取样器:往服务器发送请求。类似于自动化脚本中的发送请求代码
后置处理器:对收到的服务器的响应进行数据提取。类似自动化脚本中获取响应中特定字段的语句
断言:将收到的响应结果与预期结果做对比。类似自动化脚本中的断言
监听器:查看测试脚本运行的结果和日志,类似自动化脚本中的测试报告
定时器:等待一定时间。类似自动化脚本中的sleep
测试片段:封装基本功能,不单独执行,需要通过脚本调用才能执行。类似自动化脚本中封装的函数。


(2.2.1 基本元件)
2.2.2 JMeter元件的作用域
在JMeter中,元件的作用域是靠测试计划树形结构中元件的父子关系来确定的
提示:核心是“取样器”,其他组件都是以取样器为核心运行的,组件添加的位置不同,生效的取样器也不同。
作用域的原则
1.取样器:元件不和其他元件相互作用,因此不存在作用域的问题;
2.逻辑控制器:元件只对其子节点中的取样器和逻辑控制器作用;
3.其他六大元件:除取样器和逻辑控制器外,如果是某个取样器的子节点,则该元件对其父子节点起作用;
4.如果其父节点不是取样器,则其作用域是该元件父节点下的其他所有后代节点(包括子节点,子节点的子节点等)
提示:以上元件中还没开始学习,暂时理解jmeter这种树形结构影响作用域即可。

(2.2.2 元件的作用域)
作用域的原来:
核心:根据测试计划中的树形结构的父子节点来确定的
原则:
.取样器是没有作用域的
.逻辑控制器:只针对其子节点下的所有元件有小
.其他元件
如果其父节点是取样器,只针对父节点(取样器)有效
如果父节点是非取样器,针对父节点下的所有子节点及子节点有效
2.2.3 JMeter元件执行顺序
1.配置元件(config elements)
2.前置处理器程序(Per-processors)
3.定时器(timers)
4.取样器(Sampler)
5.后置处理程序(Post-processors)
6.断言(Assertions)
7.监听器(listenres)
注意:
.配置元件、前置处理器、后置处理器都需要依赖取样器才能运行
.在同一个作用域下,相同类型元件的执行顺序是从上到下按顺序执行
提示:
.前置处理器、后置处理器、断言等元件功能对取样器器作用(如果在它们的作用域内没有任何取样器,则不会执行)
.如果在同一作用域范围内有多个同一类型的元件,则这些元件按照它们在测试计划中的上下顺序依次执行
(2.2.3 元件的执行顺序)
边栏推荐
- Personal perception of project optimization
- [sword finger offer] interview question 45: arrange the array into the smallest number
- Reduce program ROM ram, GCC -ffunction sections -fdata sections -wl, – detailed explanation of GC sections parameters
- The method of exchanging two numbers in C language
- centos上mysql5.7主从热备设置
- Keil implements compilation with makefile
- 无线网络分析有关的安全软件(aircrack-ng)
- Makefile specifies the path of the library file loaded when the program runs
- 云管平台中租户以及多租户概念简单说明
- [sword finger offer] interview question 46: translating numbers into strings - dynamic programming
猜你喜欢

C language: string function and memory function

Openwrt增加对 sd card 支持

Security software related to wireless network analysis (airtrack ng)
![[sword finger offer] interview question 50: the first character that appears only once - hash table lookup](/img/72/b35bdf9bde72423410e365e5b6c20e.png)
[sword finger offer] interview question 50: the first character that appears only once - hash table lookup

Clickhouse 20.x distributed table testing and chproxy deployment (II)

DRF学习笔记(四):DRF视图

Binary Insertion Sort

单机高并发模型设计

openwrt 增加RTC(MCP7940 I2C总线)驱动详解

Mlx90640 infrared thermal imager temperature sensor module development notes (VII)
随机推荐
使用transform:translate()出现内容模糊问题
Flask连接mysql数据库已有表
C language: custom type
: 0xC0000005: 写入位置 0x01458000 时发生访问冲突----待解
Ncnn reasoning framework installation; Onnx to ncnn
Nacos
Reduce program ROM ram, GCC -ffunction sections -fdata sections -wl, – detailed explanation of GC sections parameters
C: On function
Three uses of static keyword
Paper_Book
[sword finger offer] interview question 46: translating numbers into strings - dynamic programming
Openwrt compilation driver module (write code at any position outside the openwrt source code, and compile independently in a modular manner.Ko)
Network device hard core technology insider router Chapter 22
Insert sort directly
Six capabilities of test and development
flink打包程序提交任务示例
Mapreduce实例(一):WordCount
__typeof和typeof的差异
Stock account opening commission discount, stock trading account opening which securities company is good, is online account opening safe
Personal perception of project optimization