0

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

  • Selenium 提供了一种操作浏览器的方法,因此换句话说,它可以模拟网页上的用户交互,例如,我们可以使用 PhpUnit-Selenium 扩展编写测试,这样就可以像真实用户一样测试我们的应用程序,之后这些测试需要在不同的浏览器上运行......

  • 对于 TestSwarm,我需要使用诸如(Qunit,Jasmine ...)之类的工具编写测试,这些工具主要专注于单元测试(而不是用户交互 ...),并使用 TestSwarm 服务器将这些测试推送到可用的浏览器以运行它们(我认为这是自动的,因此用户无需手动运行这些测试)

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

我做对了吗?

4

1 回答 1

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

于 2014-01-27T19:13:51.380 回答