JMeter test FTP

background:

FTP is mainly used for file uploads and downloads.

FTP video collection in the surveillance video playback still have a lot of useless in mainstream high-definition video storage solutions in the video surveillance industry, mainly in 720p, 1080p mainstream, 4k and above rookie, will certainly promote high-definition video streams more and more, longer storage, ftp service video store is a good choice.


Examples of presentation

First, prepare yourself to an FTP server, it is necessary .FTP server set up is not complicated, there are many articles under Baidu


Create a thread group

Thread group - added - Configuration element - FTP Request Defaults


Configuration FTP Sampler (FTP request)

1) Get a file from the server, first modify the name to get under

Server name or IP : the FTP server name or ip address

Port number : FTP server port number default is 21

File Remote : Remote file path address,

Such as: /home/manisha/sample_ftp/a.mp4 a.mp4 remote file must exist

File Local : The FTP to pull the file is saved in a local path, and add a remote file name.

Such as: d: /home/a.mp4 a.mp4 the local home file should not exist currently.

Local File Contents: empty by default

RadioButton:

Get (RETR): download

Put (STOR): Upload Use

CheckBox:

Use Binary mode: whether to use binary mode, relatively large files recommended

Save File in Response: whether to save server replies


Remarks:

Transmission mode is not selected will be automatically matched jmeter

Look at the FTP server file:

FileZilla use tool to view a more convenient and intuitive.


2) send the file from the local to the server

再添加一个FTP Sampler

修改名称为post, 用例是从向ftp服务端发送一个文件

Remote File: 一个上传到远程FTP服务器的具体目录.

如: /home/sample/test.txt   test.txt是远程不存

Local File: 本地文件地址, 如 D:/home/sample/test.txt   test.txt必须存在


看下我们本地文件:


3) 添加察看结果树

在监听器->察看结果树, 运行查看结果

查看本地目录:

FTP 服务端, Jmeter取样结果和本地目录中文件大小约在14M左右, 测试成功.


Story:

二八法则: 通常我们所做的工作80%都是无用功,只有20%可以收效。如何避免这种情况的发生?二八法则告诉我们,要把主要精力放在20%的工作上,让其产生80%的收效。


参考文献:

http://jmeter.apache.org/usermanual/build-ftp-test-plan.html


原文地址:https://mp.weixin.qq.com/s/cjZ18NOWp0O5NUNFpZGtww

今日推荐阅读文章精选推荐

为什么要做接口测试

JMeter数据库操作

Jmeter接口测试-正则表达式

JMeter中文返回乱码

Jmeter接口测试-参数化

JMeter接口测试-基础

测试-感想


咨询工作加微信

扫描二维码


欢迎自荐和推荐, 需要的微信推送简历!

请猛戳下面二维码了解更多


Guess you like

Origin blog.51cto.com/14199068/2429554