我是测试的新手,最近几天进行一些研究时,发现了2个工具可以测试Web应用程序,这是到目前为止我所了解的:


Selenium提供了一种操作浏览器的方法,因此换句话说,它可以模拟网页上的用户交互,例如,我们可以使用PhpUnit-Selenium扩展编写测试,并且可以像实际用户一样测试我们的应用程序,之后这些测试需要在不同的浏览器上运行...
对于TestSwarm,我需要使用(Qunit,Jasmine ...)之类的工具编写我的测试,这些工具主要侧重于单元测试(而非用户交互...),并使用TestSwarm服务器将这些测试推送到可用的浏览器上以运行它们(我认为这是自动的,因此无需用户手动运行这些测试)


我的结论是,Selenium和TestSwarm在某种程度上是互补的,因为Selenium可以全面测试用户交互,而TestSwarm可以简化跨浏览器的JavaScript测试。

我说对了吗?

最佳答案

我认为您步入正轨,这是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

关于testing - Selenium 和/或TestSwarm?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/21183806/

10-10 18:15