首页 > 解决方案 > 正在进行下载(视频)或更大文件下载的负载测试

问题描述

我正在查看具有 100 个用户负载的渐进式下载视频文件的负载测试。我正在查看的测试工具是Jmeter、Load Runner 和 NeoLoad。虽然创建负载所需的脚本非常简单,但它由几个请求组成,它能够与服务器建立连接并开始下载文件。虽然我知道渐进式技术已经很老了,但它仍然在许多网站中使用。我的问题是关于策略的。

  1. 我们是否需要下载完整的文件(在我的情况下是 1.3 GB)?
  2. 即使我们考虑将响应保存为文件,网络和磁盘 I/O 等资源是否已达到最大值?这个策略适合这里吗?
  3. 我们能否有一些其他策略,让我们可以在持续时间内让服务器参与并测试连接问题和传输速度的潜在问题?

标签: jmetervideo-streamingperformance-testinglarge-filesprogressive-download

解决方案


  1. Depending on your use case, there is Seeking feature so theoretically you should be able to specify start offset so you will not have to get the whole file. Also you can consider using HTTP Header Manager to send Range header
  2. If your target is to verify that the file has been downloaded fully and it is not broken you can tick "Save Response as MD5 Hash" box on "Advanced" tab of the HTTP Request sampler - this way you will save at least 130 GB of disk space. MD5 checksum can be verified using i.e. MD5Hex Assertion

    JMeter HTTP Request

  3. The main idea of the load testing is simulating real application usage with 100% accuracy. Not knowing the requirements of your product it is impossible to come up with suggestions, however JMeter can be configured to behave pretty much like real browser does so it is a viable option.

See Load Testing Video Streaming with JMeter: Learn How article for more information if needed.


推荐阅读