{"action":"created","issue":{"url":"https://api.github.com/repos/getredash/redash/issues/2442","repository_url":"https://api.github.com/repos/getredash/redash","labels_url":"https://api.github.com/repos/getredash/redash/issues/2442/labels{/name}","comments_url":"https://api.github.com/repos/getredash/redash/issues/2442/comments","events_url":"https://api.github.com/repos/getredash/redash/issues/2442/events","html_url":"https://github.com/getredash/redash/pull/2442","id":312026625,"number":2442,"title":"Add Selenium & Firefox based UI tests","user":{"login":"hackebrot","id":6024445,"avatar_url":"https://avatars1.githubusercontent.com/u/6024445?v=4","gravatar_id":"","url":"https://api.github.com/users/hackebrot","html_url":"https://github.com/hackebrot","followers_url":"https://api.github.com/users/hackebrot/followers","following_url":"https://api.github.com/users/hackebrot/following{/other_user}","gists_url":"https://api.github.com/users/hackebrot/gists{/gist_id}","starred_url":"https://api.github.com/users/hackebrot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackebrot/subscriptions","organizations_url":"https://api.github.com/users/hackebrot/orgs","repos_url":"https://api.github.com/users/hackebrot/repos","events_url":"https://api.github.com/users/hackebrot/events{/privacy}","received_events_url":"https://api.github.com/users/hackebrot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-06T15:49:12Z","updated_at":"2018-04-16T15:50:59Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/getredash/redash/pulls/2442","html_url":"https://github.com/getredash/redash/pull/2442","diff_url":"https://github.com/getredash/redash/pull/2442.diff","patch_url":"https://github.com/getredash/redash/pull/2442.patch"},"body":"Hi there! 👋 \r\n\r\nThank you for making Redash! 📊\r\n\r\nMy team would love to have test coverage for screens that are most important to our users, so this PR aims at adding the foundation for developing automated UI tests to Redash. I checked the [trello board](https://trello.com/b/b2LUHU7A/redash-roadmap) and the GitHub issues for related proposals, but couldn't find any. Please feel free to point me to any previous conversations!\r\n\r\nThis PR adds a proof-of-concept implementation, that will hopefully provide a good basis for discussion. Here's a gist of what it does...\r\n\r\n* install Firefox and Geckodriver into the development server image and add [pytest-selenium](https://github.com/pytest-dev/pytest-selenium) to the Python dependencies\r\n* define a pytest fixture to create a Redash app, which handles setup and teardown code, such as app config and database clean up\r\n* add a live server implementation using multiprocessing to run the Redash app, which is required to open pages with Selenium\r\n* automatically add a [pytest marker](https://docs.pytest.org/en/latest/example/markers.html#marking-test-functions-and-selecting-them-for-a-run) to every test in the ``ui/`` subdirectory to easily select and deselect UI tests\r\n* add two UI tests for the login page: one for a successful attempt and one for a failed attempt\r\n\r\nI'd also suggest to integrate a library for working with page objects, such as [PyPOM](https://github.com/mozilla/PyPOM), to make it more convenient to interact with pages in tests. For the sake of only adding external dependencies which are strictly required, I did not PyPOM as part of this PR.\r\n\r\nFor context: I work on test automation on @jezdez's team and plan to gradually add more tests in the future, but would like to hear your thoughts on this first. Looking forward to your feedback! 🙇 "},"comment":{"url":"https://api.github.com/repos/getredash/redash/issues/comments/381653472","html_url":"https://github.com/getredash/redash/pull/2442#issuecomment-381653472","issue_url":"https://api.github.com/repos/getredash/redash/issues/2442","id":381653472,"user":{"login":"jrbenny35","id":5751892,"avatar_url":"https://avatars2.githubusercontent.com/u/5751892?v=4","gravatar_id":"","url":"https://api.github.com/users/jrbenny35","html_url":"https://github.com/jrbenny35","followers_url":"https://api.github.com/users/jrbenny35/followers","following_url":"https://api.github.com/users/jrbenny35/following{/other_user}","gists_url":"https://api.github.com/users/jrbenny35/gists{/gist_id}","starred_url":"https://api.github.com/users/jrbenny35/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrbenny35/subscriptions","organizations_url":"https://api.github.com/users/jrbenny35/orgs","repos_url":"https://api.github.com/users/jrbenny35/repos","events_url":"https://api.github.com/users/jrbenny35/events{/privacy}","received_events_url":"https://api.github.com/users/jrbenny35/received_events","type":"User","site_admin":false},"created_at":"2018-04-16T15:50:58Z","updated_at":"2018-04-16T15:50:58Z","author_association":"NONE","body":"@hackebrot You can use [mozdownload](https://pypi.org/project/mozdownload/) and [mozinstall](https://pypi.org/project/mozInstall/1.1/) to download and install firefox. See [this](https://github.com/mozilla/testpilot/blob/master/bin/circleci/install-test-dependencies.sh).\r\n\r\nAlso, I don't think you need to ```sudo``` your scripts. You can just change their permissions."}}
{"actor":{"display_login":"jrbenny35"}}