1.创建线程组
在“测试计划”上右键 【添加】-->【线程(用户)】-->【线程组】。

设置线程数和循环次数。我这里设置线程数为500,循环一次。

2.配置取样器(sampler)
菜单栏 【选项】-->【Plugins Manager】

【Available Plugins】安装UDP Protocol Support

在“线程组”右键 【添加-】->【取样器】-->【UDP请求】设置


Wait for Response:是否等待响应
Close UDP Socket:关闭UDP Socket
Response Timeout:响应超时
Data Encode/Decode Class:
kg.apc.jmeter.samplers.HexStringUDPDecoder 直接发送16进制数据,HEX-encoded
kg.apc.jmeter.samplers.UDPSampler 填写字符串
kg.apc.jmeter.samplers.DNSJavaDecoder dns解析填写格式如: www.6san.com. A IN
kg.apc.jmeter.samplers。UDPTrafficDecoder接口可以自定义编码/解码
3.设置监听树
在“取样器”右键 【添加-】->【监听】-->【查看结果树】

结果

网友评论