問題描述
我可以使用我的 WatiN 測試來進行壓力測試嗎? (Can i use my WatiN tests to stresstest?)
在我當前的項目中,我們正在使用 WatiN 和 Mbunit.
當我編寫測試時,我意識到如果我們也可以使用所有這些用於壓力測試。目前我們正在使用 Grinder 進行壓力測試,但是我們必須重新編寫腳本,這有很多原因太好了。
我一直在嘗試找到一種工具,可以使用我現有的測試來在網站上創建負載並記錄統計信息,但到目前為止我發現了一些注意事項。
參考解法
方法 1:
We have issues on our build server when running WatiN tests as it often throws timeouts trying to access the Internet Explorer COM component. It seems to hang randomly while waiting for the total page to load.
Given this, I would not recommend it for stress testing as the results will be inaccurate and the tests are likely to be slow.
I would recommend JMeter for making threaded calls to the HTTP requests that your GUI is making
方法 2:
For load testing there is a tool which looks promising ‑ LoadStorm. Free for 25 users. It has zero deployment needs as this is a cloud based service.
方法 3:
You could build a load controller for your stress testing. It could take your watin tests and run them in a multithreaded/multiprocessed way.
方法 4:
If you are comfortable using Selenium instead of WatiN, check out BrowserMob for browser‑based load testing. I'm one of the Selenium RC authors and started BrowserMob to provide a new way to load test. By using real browsers, rather than simulated traffic, tests end up being much easier to script and maintain.
(by Andreas R、Paul Shannon、Rahul Kumar、Corey Goldberg、Patrick Lightbody)