简体   繁体   English

如何使用SWF Flash文件加载测试网站?

[英]How to load test website with SWF Flash file?

I have a website that has a SWF embbeded on it with SWFObject. 我有一个网站,上面嵌入了带有SWFObject的SWF文件。 This SWF file has 1,5 MB. 该SWF文件有1,5 MB。 I would like to test if website (Lightppd) will be alive if 600 users per hour will try to open it. 我想测试一下,如果每小时有600个用户尝试打开该网站(Lightppd),该网站是否仍然存在。 It will be approx. 这将是大约。 900 MB / hour of transfer. 每小时900 MB的传输。

So I have 2 questions in one: 所以我有两个问题:

1) Does ab (Apache Bench) test handle SWFObject and gets SWF file while testing too? 1)ab(Apache Bench)测试是否也处理SWFObject并在测试时获取SWF文件? 2) If 1) is false how to load test my website with SWF file embedded properly? 2)如果1)为假,如何正确嵌入带有SWF文件的网站来测试我的网站?

I think it would. 我想会的。 I think it would just do one HTTP request for the page. 我认为它只会对该页面执行一个HTTP请求。 Here is what I would suggest: 这是我的建议:

  • Use firebug or Fiddler (or a similar tool - or your web server access logs) to find out all the HTTP requests. 使用firebug或Fiddler(或类似的工具-或您的Web服务器访问日志)查找所有HTTP请求。
  • Now I am not sure how you can do this with 'ab' but you need to be able to create several requests to mimic the browser. 现在,我不确定如何使用“ ab”来做到这一点,但是您需要能够创建多个模拟浏览器的请求。 There you may be needing another tool like jMeter or something. 在那里,您可能需要其他工具,例如jMeter或其他工具。

As for tuning after your first tests: 至于第一次测试后的调整:

  • Make sure your SWFObject is being served with an ETag to enable caching. 确保您的SWFObject带有ETag以启用缓存。
  • If possible; 如果可能的话; serve the object with a unique URL and set the expiry to a year or something. 使用唯一的网址为对象提供服务,并将有效期设置为一年左右。 This would make sure that browsers (or proxies on the way) won't hit the server until your object is updated hence having a new URL. 这样可以确保浏览器(或正在运行的代理)在您的对象更新后拥有新的URL之前不会访问服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM