2014-01-17 26 views
0

我是新来的测试,做一些研究,当这些过去的几天,我发现2种工具,使测试Web应用程序,这里是迄今为止我了解:硒和/或TestSwarm?

  • 硒提供了一种方法来操纵浏览器,所以在其他方面,它能够在网页上模拟用户交互,我们可以写使用PHPUnit的,硒的扩展,例如测试,这将有可能测试我们的应用程序作为一个真正的用户那样,在那之后的测试需要在不同的运行浏览器...

  • 对于TestSwarm我需要使用工具如(Qunit,茉莉花......),它们主要集中在T单元写我的测试esting(没有用户交互等)和使用TestSwarm服务器这些测试推到可用浏览器中运行它们(我认为这是自动的,从而无需用户手动运行论文测试)

我的结论Selenium和TestSwarm有些互补,因为Selenium能够全面测试用户交互,而TestSwarm简化了JavaScript跨浏览器的测试。

我是否正确?

回答

1

我认为你是在正确的轨道上,这里是https://github.com/jquery/testswarm/issues/258

Okay, so you're using WebDriver and your test suite is a set of instructions (in what language do you have it stored now?) for the browser to execute (go to page X, click button Y, etc.). 
Those are not unit tests but integration tests. They require bindings with the browser and/or the ability to execute code on the target computer. They can't be executed from within the browser (in that if I visit the url of your test suite in my browser, nothing happens as the driver instructions need to be run from outside the browser or from a plugin). 
TestSwarm is not designed for these kind of integration tests, but for unit tests. A very different method that simply can't be performed by TestSwarm. Also, you wouldn't need any of TestSwarm's features for this and you'd miss things you need instead (like actual browsers and the ability to control them and extract the results). Where those browsers come from there usually is something like TestSwarm close by. 
I'd recommend looking into SauceLabs and Jenkins (either self-hosted or perhaps a cloud based solution like CloudBees). 
Check out: 

摘录•http://sauceio.com/index.php/2012/12/getting-the-most-out-of-selenium-with-cloudbees-and-sauce-labs/

https://saucelabs.com/jenkins/1

http://www.cloudbees.com/platform-service-saucelabsondemand.cb