OpenGeoscience/geojs — pull request #106 by jbeezley (2014-05-31 19:44:56+00:00)
Title: Selenium testing framework

There is a lot here that I will need to document once there is a place to actually do that, but I will summarize here.

* Selenium tests go in subdirectories of [testing/test-cases/selenium-tests](https://github.com/OpenGeoscience/geojs/tree/selenium-testing/testing/test-cases/selenium-tests)
* Each subdirectory should contain the following files:
- `include.css`
- `include.html`
- `include.js`
- `*.py` one or more unit test files.
* These are injected into the selenium test [template](https://github.com/OpenGeoscience/geojs/blob/selenium-testing/testing/test-runners/selenium-template.html.in).
* Python unit tests should be derived from a browser specific variant of [`BaseTest`](https://github.com/OpenGeoscience/geojs/blob/selenium-testing/testing/test-runners/selenium_test.py.in#L62) ([`FirefoxTest`](https://github.com/OpenGeoscience/geojs/blob/selenium-testing/testing/test-runners/selenium_test.py.in#L320) and [`ChromeTest`](https://github.com/OpenGeoscience/geojs/blob/selenium-testing/testing/test-runners/selenium_test.py.in#L327) only for now).
* Test images are stored on a secondary repository, [geojs-data](https://github.com/OpenGeoscience/geojs-data). This tests download the images automatically, so there is no need to clone it unless you are adding tests.
* The [osmLayer tests](https://github.com/OpenGeoscience/geojs/blob/selenium-testing/testing/test-cases/selenium-tests/osmLayer) is the only test so far, but it should give provide a reasonable example of what I have in mind.
* Coverage is aggregated automagically :wink:.

For now, travis will not do any of the selenium testing. The only means for running a headless browser with webgl support at the moment seems to be by compiling a special version of chrome against osmesa. And sadly, saucelabs doesn't support webgl yet either.