質問

I am new to testing, when doing some research these last few days i found 2 tools that enable testing a web application, here is what i understand so far:

  • Selenium provides a way to manipulate the browser, so in other terms it enables simulating user interaction on a webPage, we can write tests using PhpUnit-Selenium extension for example and it will make it possible to test our application as a real user would, after that those tests need to run on different browsers...

  • For TestSwarm i need to write my tests using tools such as (Qunit, Jasmine...) that are mainly focused on unit testing (not user interaction ...) and use TestSwarm server to push those tests to available browsers to run them (i think this is automatic so no need for a user to manually run theses tests)

My conclusion is that Selenium and TestSwarm are somewhat complementary as Selenium enables testing user interaction overall, and TestSwarm simplifies testing javascript cross Browser.

Am i getting this right?

役に立ちましたか?

解決

I think you are on the right track, here is an excerpt from 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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top