Branch: refs/heads/dev Home: https://github.com/galaxyproject/galaxy Commit: 16b027e12509356a53a4fd1268855d913e5438f3 https://github.com/galaxyproject/galaxy/commit/16b027e12509356a53a4fd1268855... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: M test/base/driver_util.py M test/base/twilltestcase.py Log Message: ----------- Configure a test Galaxy as needed for functional test cases. ./run_tests.sh is still good for launching one Galaxy for a bunch of different test cases - but now you can do really simple things like: ``` $ nosetests test/api/test_tours.py ``` In this scenario, the test case class will check if run_tests.sh has created a test driver to use and if it hasn't - one will be made just for the test case (like the new integration tests). Commit: b6ee471f35fc3d821d07fe406aa759731704eda4 https://github.com/galaxyproject/galaxy/commit/b6ee471f35fc3d821d07fe406aa75... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: M test/base/driver_util.py Log Message: ----------- Allow test data resolver to work with GALAXY_TEST_EXTERNAL. Commit: 82728df1555141be4fa3e7be16e151124b1dfc89 https://github.com/galaxyproject/galaxy/commit/82728df1555141be4fa3e7be16e15... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: M lib/galaxy/dependencies/dev-requirements.txt M run_tests.sh A scripts/dump_tour.py M scripts/functional_tests.py M templates/webapps/galaxy/workflow/list.mako M test/base/driver_util.py R test/casperjs/anon-history-tests.js R test/casperjs/hda-state-tests.js R test/casperjs/history-options-tests.js R test/casperjs/history-panel-tests.js R test/casperjs/history-share-tests.js R test/casperjs/login-tests.js R test/casperjs/registration-tests.js R test/casperjs/upload-tests.js A test/functional/tools/for_tours/filtering.py A test/functional/tools/for_tours/filtering.xml M test/functional/tools/sample_datatypes_conf.xml M test/functional/tools/samples_tool_conf.xml A test/galaxy_selenium/__init__.py A test/galaxy_selenium/cli.py A test/galaxy_selenium/data.py A test/galaxy_selenium/driver_factory.py A test/galaxy_selenium/has_driver.py A test/galaxy_selenium/navigates_galaxy.py A test/galaxy_selenium/navigation-data.yml A test/galaxy_selenium/sizzle.py A test/selenium_tests/__init__.py A test/selenium_tests/framework.py A test/selenium_tests/test_anon_history.py A test/selenium_tests/test_history_dataset_state.py A test/selenium_tests/test_history_options.py A test/selenium_tests/test_history_panel.py A test/selenium_tests/test_history_sharing.py A test/selenium_tests/test_login.py A test/selenium_tests/test_registration.py A test/selenium_tests/test_stock_tours.py A test/selenium_tests/test_uploads.py A test/selenium_tests/test_workflow_editor.py Log Message: ----------- Replace CasperJS browser tests with Selenium tests. See documentation added to run_tests.sh. This can be configured to target local web browsers or Selenium remote services as detailed in that script. Individual tests can be executed with nosetests directly or groups of tests can share a common test Galaxy spin up when using ./run_tests.sh. If GALAXY_TEST_EXTERNAL=<url> is set - it will be respected and Galaxy will not be spun up (remember the URL needs to be reachable from the Selenium server inside the Docker container). Every test failure writes a current screenshot of Galaxy to database/test_errors. I will be honest that the desire to move toward selenium is based solely on failing to get the Casper tests to pass consistently due to bugs causing segfaults in the underlying tools (probably casperjs or phantomjs?). Over the past year I have tried multiple versions of dependencies, etc... and it never works out for me. Likewise Martin has never been able to get the tests to run consistently under Jenkins. I don't think Python or JavaScript is inherently better, this wasn't based on a personal preference about what kind of test I want to write. Despite this being the primary reason, there are clear benefits to Selenium. It tests the actual web browsers we support, generates screenshots, has better documented and more robust tooling, can scale across clusters. Less clear, but certainly still a benefit of being Python based is that it fits with the rest of the test framework more cleanly than CasperJS. Finally Carl's last words on CasperJS were "Ditch it". The following specific tests were added or replaced: - Implemented tour testing via Selenium (walk the two working stock tours and verify elements avaiable and clicks are valid). This is how I discovered #3206. - Added completely new workflow GUI test (basic creation from URL and in editor). - Replaced broken CasperJS registeration tests (text and expectations now wrong) with a Selenium variant that works against dev. - Replaced broken anonymous history CasperJS tests with working Selenium tests. - Replaced broken upload CasperJS tests with working Selenium tests. - Replaced history options CasperJS tests with Selenium tests. - Replaced login CasperJS tests with Selenium tests. - Replaced history-share-tests.js with test_history_options.py - Replaced history-panel-tests.js with test_history_panel.py - Replaced a big part of hda-state-tests.js with test_history_dataset_state.py I'm confident these utilities represent a sharable and higher-level abstraction around functional testing of Galaxy that can be used outside of Galaxy's testing framework. So a subset of the functional test stuff is in a separate module with minimal dependencies that I intend to make stand alone and pip installable like galaxy-lib. This module consists of: - Sizzle stuff in its own package. This code allows Selenium to reason with jQuery selectors instead of vanilla CSS selectors. - Functionality for creating a Selenium driver and virtual display. - The ``HasDriver`` mixin - this provides higher level navigation utilities not specifically tied to Galaxy. - A package with abstractions for navigating Galaxy. This provides a higher-level interfactor for things such as logging in and out, registering a user, navigating menus, fetching Galaxy style tooltips and error messages, and walking Galaxy tours. In order to demonstrate this new module is useful outside of Galaxy tests - I've included a CLI package to ease building argparse utilities around these abstractions and implemented a simple demonstration script that walks a Galaxy tour and dumps screenshots of Galaxy at each step to a folder. This is more of a demonstration of the utilities than an actual polished end user tool - though it might be helpful in linting and debugging tours. In the future I hope to extend this scripting to implement - Periodic deployment testing to ensure things like Jupyter work in production. - A best practice recipe for Galaxy QA testing by deployers. - An utility to generate dozens of screenshots of various aspects of Galaxy so we can quickly visually inspect ever part of the GUI before big releases. xref https://github.com/galaxyproject/starforge/pull/115 xref #1419 Commit: 9b0390defb6832cb6ce56899b6962cd92dac9aee https://github.com/galaxyproject/galaxy/commit/9b0390defb6832cb6ce56899b6962... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: M test/api/test_api_batch.py R test/casperjs/api-batch-tests.js Log Message: ----------- Remove CasperJS api-batch-tests.js - already available in API test framework. Commit: 5cd2c551043d383aa93452c8bd68bf1ded0def1e https://github.com/galaxyproject/galaxy/commit/5cd2c551043d383aa93452c8bd68b... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: R test/casperjs/api-tool-tests.js R test/casperjs/api-user-tests.js Log Message: ----------- Remove CasperJS API user and history tests... ... more complete testing for both is available in API tests. Commit: bf896d621d860f3c93d2276bc02350a2b92b6052 https://github.com/galaxyproject/galaxy/commit/bf896d621d860f3c93d2276bc0235... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: M test/api/test_histories.py R test/casperjs/api-history-tests.js Log Message: ----------- Move CasperJS history API tests in api/test_histories.py. Commit: 74c4ac3662257776a08bc724a2919547856da819 https://github.com/galaxyproject/galaxy/commit/74c4ac3662257776a08bc724a2919... Author: John Chilton <jmchilton@gmail.com> Date: 2016-11-30 (Wed, 30 Nov 2016) Changed paths: A .ci/jenkins/api/run_tests.sh A .ci/jenkins/framework/run_tests.sh A .ci/jenkins/integration/run_tests.sh A .ci/jenkins/selenium/Dockerfile A .ci/jenkins/selenium/docker-compose.yml A .ci/jenkins/selenium/galaxy.ini A .ci/jenkins/selenium/run_galaxy.bash A .ci/jenkins/selenium/run_tests.sh A .ci/jenkins/toolshed/run_tests.sh M run_tests.sh Log Message: ----------- Create simple scripts for all Jenkins tests. Makes it easier to run exact tests (or subset of tests) from Jenkins locally. Selenium script is particularily interesting because it represents a very simple entry point into selenium testing. Commit: 53b6413df9194da6845b8f4eece2464ef2b1100c https://github.com/galaxyproject/galaxy/commit/53b6413df9194da6845b8f4eece24... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M test/selenium_tests/framework.py Log Message: ----------- Attempt fix of logic for GALAXY_TEST_SELENIUM_HEADLESS == "auto". Pointed out by @dannon. Commit: fa3d2063c4df595e5d0bfd47d7bf30b8b3a567eb https://github.com/galaxyproject/galaxy/commit/fa3d2063c4df595e5d0bfd47d7bf3... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M .ci/jenkins/selenium/run_tests.sh Log Message: ----------- Update selenium test's use of docker-compose to prevent interference across builds. Commit: e731b6f5983a16fdfb1d6418ac5c89a61da77714 https://github.com/galaxyproject/galaxy/commit/e731b6f5983a16fdfb1d6418ac5c8... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M .ci/jenkins/selenium/run_tests.sh Log Message: ----------- Fix and enhance Jenkins test for Selenium. - If condition on fa3d2063c4df595e5d0bfd47d7bf30b8b3a567eb was exactly wrong. - Check for docker-compose services up before and during polling to wait for Galaxy - if Galaxy isn't going to work just die. - Improved logging. Commit: 495ab5992701a64e5cef9997180b75123cd74fd8 https://github.com/galaxyproject/galaxy/commit/495ab5992701a64e5cef9997180b7... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M .ci/jenkins/selenium/run_tests.sh Log Message: ----------- Another fix for Selenium Jenkins. docker-compose strips out dashes and underscores in the project name when creating containers. Commit: 45edf1bb41fd29abb7b4258942e77a4503c49d6f https://github.com/galaxyproject/galaxy/commit/45edf1bb41fd29abb7b4258942e77... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M test/functional/tools/sample_datatypes_conf.xml Log Message: ----------- Add bed datatype to framework tests because Filter1 now a framework test tool. Commit: 80e64b8cc0dd8f469a6807368339b9a245515006 https://github.com/galaxyproject/galaxy/commit/80e64b8cc0dd8f469a6807368339b... Author: John Chilton <jmchilton@gmail.com> Date: 2016-12-01 (Thu, 01 Dec 2016) Changed paths: M scripts/dump_tour.py Log Message: ----------- PEP-8 fix as pointed out by @nsoranzo. Commit: f52f44230d859e7f3b576710b7c0120e86b66934 https://github.com/galaxyproject/galaxy/commit/f52f44230d859e7f3b576710b7c01... Author: Martin Cech <cech.marten@gmail.com> Date: 2016-12-02 (Fri, 02 Dec 2016) Changed paths: A .ci/jenkins/api/run_tests.sh A .ci/jenkins/framework/run_tests.sh A .ci/jenkins/integration/run_tests.sh A .ci/jenkins/selenium/Dockerfile A .ci/jenkins/selenium/docker-compose.yml A .ci/jenkins/selenium/galaxy.ini A .ci/jenkins/selenium/run_galaxy.bash A .ci/jenkins/selenium/run_tests.sh A .ci/jenkins/toolshed/run_tests.sh M lib/galaxy/dependencies/dev-requirements.txt M run_tests.sh A scripts/dump_tour.py M scripts/functional_tests.py M templates/webapps/galaxy/workflow/list.mako M test/api/test_api_batch.py M test/api/test_histories.py M test/base/driver_util.py M test/base/twilltestcase.py R test/casperjs/anon-history-tests.js R test/casperjs/api-batch-tests.js R test/casperjs/api-history-tests.js R test/casperjs/api-tool-tests.js R test/casperjs/api-user-tests.js R test/casperjs/hda-state-tests.js R test/casperjs/history-options-tests.js R test/casperjs/history-panel-tests.js R test/casperjs/history-share-tests.js R test/casperjs/login-tests.js R test/casperjs/registration-tests.js R test/casperjs/upload-tests.js A test/functional/tools/for_tours/filtering.py A test/functional/tools/for_tours/filtering.xml M test/functional/tools/sample_datatypes_conf.xml M test/functional/tools/samples_tool_conf.xml A test/galaxy_selenium/__init__.py A test/galaxy_selenium/cli.py A test/galaxy_selenium/data.py A test/galaxy_selenium/driver_factory.py A test/galaxy_selenium/has_driver.py A test/galaxy_selenium/navigates_galaxy.py A test/galaxy_selenium/navigation-data.yml A test/galaxy_selenium/sizzle.py A test/selenium_tests/__init__.py A test/selenium_tests/framework.py A test/selenium_tests/test_anon_history.py A test/selenium_tests/test_history_dataset_state.py A test/selenium_tests/test_history_options.py A test/selenium_tests/test_history_panel.py A test/selenium_tests/test_history_sharing.py A test/selenium_tests/test_login.py A test/selenium_tests/test_registration.py A test/selenium_tests/test_stock_tours.py A test/selenium_tests/test_uploads.py A test/selenium_tests/test_workflow_editor.py Log Message: ----------- Merge pull request #3239 from jmchilton/more_selenium Replace CasperJS browser tests with Selenium tests. Compare: https://github.com/galaxyproject/galaxy/compare/3b84136d4f0a...f52f44230d85