amazon-ec2 – PhantomJS CPU(核心)绑定了吗?

我开始做一些基于浏览器的并行测试,想要看看在EC2大盒子上可以并行运行多少个浏览器,然后再达到100%的CPU.

我正在使用JMeter webdriver插件来实际运行浏览器.

使用FireFox,每个CPU核心只有1个浏览器. 4核盒上的4个浏览器大约是80%的CPU.有5个浏览器,它是95%(这对性能测试不利).

在我走PhatomJS的道路之前,在并行运行时,是否存在将PhantomJS与FireFox(甚至Chrome)进行比较的基准测试?

知道有多少PhantomJS实例能够在达到85%CPU之前在EC2大盒子上并行运行吗?

谢谢
詹姆士.

最佳答案 按照
Web Driver Tutorial

it is important to note that this is mainly used to complement JMeter’s HTTP Sampler. The Web Driver Sampler is meant to be run in conjunction with a HTTP Sampler so that from the server’s perspective, the load is production like. At the same time, the web sampler will simulate the user experience of interacting with the website/webapp whilst the server is under load, hence measuring the real user’s experience at the same time.

所以你运行多个浏览器的想法,无论是完整的还是无头的,看起来都不好看. WebDriver JMeter插件的想法是让一个真正的浏览器实例抓取正在测试的Web应用程序,以查看负载是否对JMeter无法设计的区域(如执行JavaScript / AJAX调用等)的现实用户产生负面影响.

JMeter中有几个配置元素可以让它更像真正的浏览器.考虑使用:

> HTTP Cookie Manager – 代表浏览器cookie并处理基于cookie的身份验证挑战
> HTTP Cache Manager – 充当浏览器缓存(即仅下载嵌入资源一次)
> HTTP Header Manager – 表示像User-Agent这样的浏览器派生标题

有关更多提示和技巧,请参阅How to make JMeter behave more like a real browser指南.

如果您的用例仅假设基于浏览器的负载测试,我建议您查看Selenium Grid,它能够协调在不同主机上运行的多个WebDriver实例.

点赞