Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is a great question. I'm going to try to break this down into smaller packets of information so that it hopefully makes sense for old pros and newbies alike.</p> <h2><strong>Without Selenium Grid:</strong></h2> <p>For starters, it is possible to use individual drivers for all the different browser/OS combinations you wish to run the tests on. The drawback is you have to make some (though usually minimal) code adjustments for each browser's driver. This also means breaking the <a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow noreferrer">DRY principle</a>. To learn more about writing these kinds of tests check out <a href="http://www.seleniumhq.org/docs/03_webdriver.jsp#introducing-the-selenium-webdriver-api-by-example" rel="nofollow noreferrer">this documentation</a>. (Also note that if you wanted to run these tests on each build via CI on something like <a href="http://en.wikipedia.org/wiki/Jenkins_%28software%29" rel="nofollow noreferrer">Jenkins</a> you need to have the actual browsers running on a slave on your own hardware, but these are more the <a href="http://en.wikipedia.org/wiki/DevOps" rel="nofollow noreferrer">DevOps</a> concerns.) </p> <h2><strong>Using Selenium Grid:</strong></h2> <p>More commonly used for the sort of goals you mentioned (and referenced in the other post you linked to), Selenium Grid is a server that allows multiple instances of tests to run in different web browsers on remote machines. The more intro oriented docs for this are <a href="https://code.google.com/p/selenium/wiki/Grid2" rel="nofollow noreferrer">here</a> and more forward looking docs are <a href="https://github.com/SeleniumHQ/selenium-docs/blob/master/07_Selenium_Grid.md" rel="nofollow noreferrer">here</a>.</p> <p><strong>Running Local or in the Cloud:</strong> With Selenium Grid you are going to go one of two ways.</p> <ol> <li>Run <a href="https://github.com/SeleniumHQ/selenium-docs/blob/master/07_Selenium_Grid.md#quick-start" rel="nofollow noreferrer">on your own hardware</a> locally (or wherever your company has machines to remote into)</li> <li>Use an <a href="https://stackoverflow.com/questions/4645805/selenium-grid-service">online service</a> like <em>Sauce Labs</em> or <em>Testing Bot</em></li> </ol> <p>A nice "what this might look like in Java" for having an online service provide the browsers is shown in <a href="https://saucelabs.com/docs/ondemand/getting-started/env/java/se2/windows" rel="nofollow noreferrer">this Sauce Labs page</a> and for Testing Bot <a href="http://selenium.polteq.com/en/category/selenium-grid-2/" rel="nofollow noreferrer">here</a>.</p> <p><strong>Selenium Can be Written in a Ton of Languages:</strong> Selenium follows the <a href="http://www.w3.org/TR/2013/WD-webdriver-20130117/" rel="nofollow noreferrer">WebDriver API</a> and for C#, Java, Perl, PHP, Python, Ruby, JavaScript (Node) or other languages, you still can write test scripts in any of these (and they provide the “frameworks” for some of these <a href="http://www.seleniumhq.org/download/" rel="nofollow noreferrer">officially</a>, while others are community driven) and still have the run tests run solidly in all modern browsers. </p> <p><strong>Concerning Mobile Devices</strong> There is some good discussion over <a href="https://stackoverflow.com/questions/18727677/is-selenium-testing-worthwhile-on-mobile-devices">here</a> that discusses how "close to the real thing" you want your mobile browser tests to be, since the <a href="https://code.google.com/p/selenium/wiki/IPhoneDriver" rel="nofollow noreferrer">iPhoneDriver</a> and <a href="https://code.google.com/p/selenium/wiki/AndroidDriver" rel="nofollow noreferrer">AndroidDriver</a> are largely based on use through WebView, which is less close to the real thing. They are now finding themselves being replaced by <a href="http://ios-driver.github.io/ios-driver/" rel="nofollow noreferrer">ios-driver</a>, <a href="http://selendroid.io/" rel="nofollow noreferrer">Selendroid</a>, and <a href="http://appium.io/" rel="nofollow noreferrer">Appium</a>.</p> <h2><strong>To Sum It Up</strong></h2> <p>So to answer what I think you’re getting at with, </p> <blockquote> <p>... is possible to run tests and verify those on the different OS and Browsers just by using the libraries provided by the Selenium</p> </blockquote> <p>the answer is that you can <strong>use Selenium Grid and an online service</strong> or you will have to use base Selenium/Selenium Server <strong>along with a number of other libraries</strong> to test all modern browser and OS combinations, but I'm sure many shops do just that because they have the experience and expertise to pull it off. </p> <hr> <p><strong><em>Alternate (Non-Selenium) Option to Write Once and Test Across Browsers:</strong> If you have a team with JavaScript experience and you're looking to hit the same goal of testing across browsers without the overhead of Selenium, <a href="http://saucelabs.com/javascript/" rel="nofollow noreferrer"> <strong>Automates JavaScript Unit Testing with Sauce Labs</strong> </a> (formerly Browser Swarm) would be a good option.</em></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload