Commit Graph
2410 Commits
Author SHA1 Message Date
John Chilton 521a585a23 Two lint fixes for #3291. 2016-12-14 14:13:43 -05:00
John Chilton 334dfe1b11 Allow (and test) using expressions in job re-submission delays.
So you can backoff re-submission with ``delay="attempt * 30"`` for instance - which will cause a re-submission delay to increase by 30 seconds for each resubmission of a job.
2016-12-14 13:41:30 -05:00
John Chilton 18eb1c8d0e Add seconds_running and seconds_since_queued to condition expression langauge. 2016-12-14 13:41:29 -05:00
John Chilton 325b035475 Add a self re-submission test. 2016-12-14 13:41:29 -05:00
John Chilton 7e338d7909 Add attempt to resubmission expression language. 2016-12-14 13:41:29 -05:00
John Chilton 7d52b28ab2 Allow expressions in job_conf resubmission conditions.
Since we allow dynamic job runners clearly job_conf.xml must be considered a trusted document. Still I know that some are uneasy with eval generally so I only allow a very safe subset of Python expressions in this job_conf document.
2016-12-14 13:41:29 -05:00
John Chilton 0559cff6e9 Implement resubmit on unknown failures. 2016-12-14 13:41:29 -05:00
John Chilton b78287f150 Integration test for advanced job runner stuff.
Set of test cases that cover job resource handlers and resubmit job destinations.
2016-12-14 13:41:28 -05:00
John Chilton ac581a5453 Improved documentation and design of integration tests.
- Allow running through ``run_tests.sh``.
- Enable more verbose test errors for Conda tests.
- Refactor how integration tests depend on API testing (use a Mixin instead of subclassing conceptually conflicting TestCase classes).
2016-12-14 13:41:28 -05:00
John Chilton 767c0400ae Fix SLURM job re-submission.
Approach from @Takadonet - fixes #3289.
2016-12-11 22:46:59 -05:00
Björn Grüning 982a35df08 Merge pull request #3217 from interactomix/dev
Per user total walltime limit.
2016-12-03 14:11:39 +01:00
John Chilton 45edf1bb41 Add bed datatype to framework tests because Filter1 now a framework test tool. 2016-12-01 14:03:41 -05:00
John Chilton 53b6413df9 Attempt fix of logic for GALAXY_TEST_SELENIUM_HEADLESS == "auto".
Pointed out by @dannon.
2016-12-01 09:49:04 -05:00
John Chilton bf896d621d Move CasperJS history API tests in api/test_histories.py. 2016-11-30 17:44:12 -05:00
John Chilton 5cd2c55104 Remove CasperJS API user and history tests...
... more complete testing for both is available in API tests.
2016-11-30 17:44:12 -05:00
John Chilton 9b0390defb Remove CasperJS api-batch-tests.js - already available in API test framework. 2016-11-30 17:44:12 -05:00
John Chilton 82728df155 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
2016-11-30 17:44:11 -05:00
John Chilton b6ee471f35 Allow test data resolver to work with GALAXY_TEST_EXTERNAL. 2016-11-30 17:24:43 -05:00
John Chilton 16b027e125 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).
2016-11-30 17:24:43 -05:00
Nicola Soranzo 2d510fae98 Merge branch 'release_16.10' into dev
Conflicts:
	static/maps/mvc/form/form-section.js.map
	static/scripts/bundled/analysis.bundled.js
	static/scripts/bundled/analysis.bundled.js.map
	static/scripts/bundled/libs.bundled.js
	static/scripts/bundled/libs.bundled.js.map
	static/scripts/bundled/login.bundled.js.map
	static/scripts/mvc/form/form-section.js
2016-11-30 15:31:26 +00:00
Martin Cech 1bbab2d89d Merge pull request #3228 from jmchilton/configuration_test
Fix configuration API admin checking and tests.
2016-11-30 10:25:13 -05:00
Martin Cech b165757288 Merge pull request #3118 from bgruening/remove_mako_user_pref
New User Preferences User Interface
2016-11-30 08:58:25 -05:00
Martin Cech d6f0e6b37c Merge pull request #3227 from mvdbeek/cached_deps_16.10
[16.10] Backport #3106 and #3222: Cached conda environments and API to manage them
2016-11-29 16:21:49 -05:00
John Chilton b705579125 Fix configuration API admin checking and tests.
- Move CasperJS tests for configuration API into API test framework.
- Fix bug where configuration API wouldn't treat master API key as coming from an admin user.
2016-11-29 14:12:51 -05:00
mvdbeek 2a4ccac403 Connect clean endpoint properly and add -y to exec_clean 2016-11-29 17:42:09 +01:00
mvdbeek 16b49d9140 Add dependency_resolvers/clean endpoint 2016-11-29 17:42:09 +01:00
mvdbeek cc7cd47ef5 Add integration test-case for install tool dependency API endpoint 2016-11-29 17:42:09 +01:00
Martin Cech 73d010efa4 fix another test 2016-11-28 15:54:39 -05:00
Martin Cech 706bc3fbb1 fix test and hide shed_conf select udner details 2016-11-28 15:20:48 -05:00
Martin Cech 068ee6bd0c fix install repo test 2016-11-28 14:41:28 -05:00
mvdbeek 00ca0a600a Connect clean endpoint properly and add -y to exec_clean 2016-11-28 00:07:40 +01:00
mvdbeek 3ebbb37c4d Add dependency_resolvers/clean endpoint 2016-11-27 23:16:56 +01:00
mvdbeek e905b8baeb Add integration test-case for install tool dependency API endpoint 2016-11-27 17:52:38 +01:00
Maximilian Friedersdorff 2408502c2d Add total_walltime limit type
Add to sample config, config reader and unittest
2016-11-24 16:59:54 +00:00
Nicola Soranzo 3d57c22b63 Fix I201 errors from flake8-import-order
Also fix Python3 compatibility.
Remove unused method
galaxy.tools.parameters.sanitize.ToolParameterSanitizer.restore_param() .
2016-11-23 18:31:04 +00:00
guerler 2cf91d4b15 Add test case for communication server settings 2016-11-18 08:32:56 -05:00
guerler 998fd3036d Add test case to add address to user information 2016-11-18 08:15:17 -05:00
guerler b02eb9e7e0 Add basic information test case, fix validation 2016-11-17 23:12:01 -05:00
Martin Cech 33894ca744 Merge pull request #3190 from jmchilton/test_cleanup
Various Test Cleanups and Refactorings
2016-11-17 10:08:23 -05:00
John Chilton b83cfe434a Refactor generic FunctionalTestCase from TwillTestCase.
ApiTestCase uses this newer, smaller base class since these tests do not depend on Twill.
2016-11-17 08:41:52 -05:00
John Chilton 2bf1cf50a3 Reduce requirements for using get_filename in TwillTestCase.
Do not use a self.tool_shed_test_file and make self.shed_tools_dict optional.
2016-11-17 08:41:52 -05:00
John Chilton a209523639 Large cleanup of unused methods from twilltestcase.
In addition to deleting unused methods, this also moves ones only used by test_library_templates into that file.
2016-11-17 08:41:52 -05:00
mvdbeek 592f15c7b5 Add sam-to-bam conversion test tool 2016-11-16 22:01:47 +01:00
Nicola Soranzo a8746c4f52 Fix import order and Python3 compatibility for test/unit/ 2016-11-16 10:29:09 +00:00
Nicola Soranzo dd556090c1 Fix import broken in b4c77b7617 2016-11-16 10:29:09 +00:00
Nicola Soranzo 1d17a29c79 Fixes for pycodestyle 2.2.0 2016-11-15 16:56:50 +00:00
Björn Grüning 202f96c731 Merge pull request #3125 from mvdbeek/fix_invalid_section_key
Fix tools placed outside of panel section
2016-11-06 15:48:23 +01:00
Björn Grüning 58b7b6cf15 Merge pull request #2696 from peterjc/blast_datatypes
Returning Blast datatypes to Galaxy core (work-in-progress)
2016-11-05 11:20:53 +01:00
Marius van den Beek b1892b7e30 Merge pull request #3100 from nsoranzo/followup_on_3013
Add download_to_file function to galaxy.util
2016-11-04 18:19:12 +01:00
peterjc 17783cec36 Tweak testing installing BLAST datatypes from Tool Shed
This is a short term pragmatic solution for the planned return
of the BLAST datatypes to the main Galaxy distribution. Long
term an additional test using an alternative Tool Shed defined
datatype may be needed.
2016-11-04 17:00:16 +00:00