{"action":"created","issue":{"url":"https://api.github.com/repos/openlayers/ol3/issues/3470","labels_url":"https://api.github.com/repos/openlayers/ol3/issues/3470/labels{/name}","comments_url":"https://api.github.com/repos/openlayers/ol3/issues/3470/comments","events_url":"https://api.github.com/repos/openlayers/ol3/issues/3470/events","html_url":"https://github.com/openlayers/ol3/pull/3470","id":65912977,"number":3470,"title":"Add rendering tests","user":{"login":"tsauerwein","id":266474,"avatar_url":"https://avatars.githubusercontent.com/u/266474?v=3","gravatar_id":"","url":"https://api.github.com/users/tsauerwein","html_url":"https://github.com/tsauerwein","followers_url":"https://api.github.com/users/tsauerwein/followers","following_url":"https://api.github.com/users/tsauerwein/following{/other_user}","gists_url":"https://api.github.com/users/tsauerwein/gists{/gist_id}","starred_url":"https://api.github.com/users/tsauerwein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsauerwein/subscriptions","organizations_url":"https://api.github.com/users/tsauerwein/orgs","repos_url":"https://api.github.com/users/tsauerwein/repos","events_url":"https://api.github.com/users/tsauerwein/events{/privacy}","received_events_url":"https://api.github.com/users/tsauerwein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-04-02T12:08:01Z","updated_at":"2015-04-07T16:26:59Z","closed_at":"2015-04-06T11:49:51Z","pull_request":{"url":"https://api.github.com/repos/openlayers/ol3/pulls/3470","html_url":"https://github.com/openlayers/ol3/pull/3470","diff_url":"https://github.com/openlayers/ol3/pull/3470.diff","patch_url":"https://github.com/openlayers/ol3/pull/3470.patch"},"body":"Currently large parts of our rendering code lack tests. This PR aims to close these gaps by providing an infrastructure for rendering tests. The idea is that the canvas of a rendered map is compared with a reference image using [Resemble.js](http://huddle.github.io/Resemble.js/).\r\n\r\nFor being able to run the tests for the canvas and WebGL renderer on Travis, [SlimerJS](http://slimerjs.org/) is used instead of [PhantomJS](http://phantomjs.org/), that is used for the current unit tests.\r\n\r\nLike with the current unit tests, the rendering tests can be run in a browser or from the command-line (`./build.py test-rendering`). If a test fails, that is a mismatch factor between the reference image and the rendered map exceeds a certain threshold, an image showing the difference can be displayed.\r\n\r\n![rendering-tests](https://cloud.githubusercontent.com/assets/266474/6963565/0e914768-d941-11e4-82a5-aa65179d471a.png)\r\n\r\nStill to do:\r\n\r\n- [x] Write more tests (for different layer types).\r\n- [ ] Make sure no window is opened when running the tests from the command line.\r\n\r\nCloses #2923"},"comment":{"url":"https://api.github.com/repos/openlayers/ol3/issues/comments/90632502","html_url":"https://github.com/openlayers/ol3/pull/3470#issuecomment-90632502","issue_url":"https://api.github.com/repos/openlayers/ol3/issues/3470","id":90632502,"user":{"login":"tsauerwein","id":266474,"avatar_url":"https://avatars.githubusercontent.com/u/266474?v=3","gravatar_id":"","url":"https://api.github.com/users/tsauerwein","html_url":"https://github.com/tsauerwein","followers_url":"https://api.github.com/users/tsauerwein/followers","following_url":"https://api.github.com/users/tsauerwein/following{/other_user}","gists_url":"https://api.github.com/users/tsauerwein/gists{/gist_id}","starred_url":"https://api.github.com/users/tsauerwein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsauerwein/subscriptions","organizations_url":"https://api.github.com/users/tsauerwein/orgs","repos_url":"https://api.github.com/users/tsauerwein/repos","events_url":"https://api.github.com/users/tsauerwein/events{/privacy}","received_events_url":"https://api.github.com/users/tsauerwein/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T16:26:59Z","updated_at":"2015-04-07T16:26:59Z","body":"Before, the loader server returned all src files. Now it only returns the src files that are actually referenced by a test. And it seems like Istanbul does not include the files, that were not loaded during the test run. Though they should be instrumented?!"}}