Commit Graph
394 Commits
Author SHA1 Message Date
Dannon Baker f22ef12467 Fix xml.etree relative import error happening in test/asserts/xml.py 2015-02-17 15:18:08 -05:00
John Chilton d8179ae64f Fix incorrect constant pointed out by Nicola.
https://bitbucket.org/galaxy/galaxy-central/pull-request/664/remove-test-data-only-used-by-remaining/diff#comment-5083073.
2015-02-11 13:15:21 -05:00
John Chilton 38679a0d32 Dynamically fetch and cache test-data from git repositories if needed...
... for tool tests. Longer term this functionality should be dropped (i.e. after all the tools are out of Galaxy) and the test-data always lives next to the tool - but for now it decreases the size of the repository ahead of a potential move to github.
2015-02-09 21:43:42 -05:00
John Chilton 7b5e5c6eec Refactor toward supporting multiple test data resolver types. 2015-02-09 21:43:42 -05:00
John Chilton da67d35e60 Allow GALAXY_TEST_FILE_DIR to a comma-separate list. 2015-02-09 21:43:42 -05:00
Dannon Baker dba89dff83 Convert everything from elementtree to stdlib xml module. 2015-01-29 16:10:56 -05:00
John Chilton 44f7317fa5 Allow tools to output collections with static or determinable structure.
By "static" I mean tools such as a FASTQ de-interlacer that would produce a "paired" collection with two datasets everytime. By "determinable" I mean tools that perform N->N operations within the same job - such as a tool that needs to normalize a bunch of datasets all at once and not in separate jobs. (For N->N collection operations that should or can be done in N separate jobs tool authors should just write tools that operate over a dataset and produce a dataset and let the end-user 'map over' that operation.)

There are still large classes of operations where the structure of the output collection cannot be pre-determined - such as splitting files (e.g. bam files by read group) - that are not implemented in this commit.

Model:

The models have been updated to do a more thorough job of tracking collection outputs. Jobs just producing HistoryDatasetCollectionAssociations works fine for simple jobs producing collections - but you don't want to map a list over a tool that produces a pair and produce a bunch of pairs HDCAs and a list:pair HDCA- you just want a bunch of pieces and the one list:pair at that the top.

Workflow:

Workflows containing such operations can be executed - but the workflow editor has not been updated to handle this complexity (and it will require a significant overhaul) so such tools are not available in the workflow editor.

Tool Testing:

This commit also introduces a new tool XML syntax for describing tests on output collections. See files test/functional/tools/collection_creates_list.xml and test/functional/tools/collection_creates_pair.xml for examples.

Tests:

Includes two tools to test this - one that uses explicit pair output names and one that iterates over the structure of input list to produce an output list.

Includes several new tools API tests that test the tools described above via the API and implicit mapping over such tools. Includes two new workflow API tests - one that verifies a simple workflow with output collections works and one that verifies mapping over workflow steps in collections works.
2015-01-15 09:30:00 -05:00
John Chilton 20519095b4 Remove unused load_cookies function in TwillTestCase. 2015-01-14 21:03:12 -05:00
John Chilton 65083bd97b Remove unused method tool_shed_util...
... it has a PEP-8 detected bug (undefined reference) so it would fail even if it was used.
2015-01-14 21:03:12 -05:00
John Chilton 6f115a7d5c PEP-8 fixes for install_and_test scripts. 2015-01-14 21:03:12 -05:00
John Chilton 285896dfe1 Increase consistency between job index and show.
Add tests for new date range and history filtering as well as to ensure only admins get to see external_id and command_line and that users cannot see each other's jobs.

Always allow admins to views all jobs on index (instead of only when user_details is specified) and show. Add user_email and external_id to show (for admins) to bring it inline with index and add command_line to index (for admins) to bring it in line with show.

Show still allow more details including job standard error and output as well as job metrics.
2014-12-18 21:50:15 -05:00
John Chilton ec24396140 Refactoring: Start abstracting XML processing out of Tool and param classes.
Long term this could allow Galaxy to support - multiple tooling formats (Galaxy-like YAML, CWL http://bit.ly/cwltooldesc, etc...). But I think it is also important from a purely design perspective - this is a core logic class integrating different components - they should not also be doing XML parsing.

To verify the interface for parsing tools is expressive enough to allow multiple useful implementations, I built a test YAML tool description that implements many of the same features as Galaxy but smooths out rough edges (uses exit codes for job failure by default for instance). Loading these tools is disabled by default and it is not documented how to enable them because they are not intended to be part of Galaxy's public API.
2014-12-11 00:26:13 -05:00
Daniel Blankenberg 137ade3786 HTML escape user-settable values in Data Libraries. Update tests to reflect that e.g. quotes are now html escaped within pages. Eliminate the unnecessary use of Params() object for these controllers. 2014-12-08 12:27:48 -05:00
John Chilton 887bc44a41 Implement structured tool test data.
Rather than relying solely on exceptions back to nose/test framework - add option (--structured_data_report_file) to run_tests.sh that causes a bunch of detailed data to be dumped to the specified file in a very structured way. Includes full to_dict of the job from the API which in turn includes job metrics, command-line, job's standard error and outputs (instead of the test frameworks), as well as the tool inputs, and exceptions broken out for tool execution versus output checking.

Its all indexed in the file by the test id (without the actual test toolbox depending on knowing the test id) - so one could pair this information with the XUnit output to produce much more detailed breakdowns of the tests.
2014-12-08 00:21:47 -05:00
John Chilton 76b534f438 Slightly improved error message for tool tests if job submission fails. 2014-12-08 00:21:47 -05:00
John Chilton f3cd402d28 Remove unused method now that twill interactor is gone. 2014-12-08 00:21:47 -05:00
John Chilton b7ddf97561 Reduce some duplication related to nose running. 2014-12-08 00:21:47 -05:00
John Chilton 3d779623b7 Twill interactor for tests is broken - so I am deleting.
It wasn't long for this world with a JavaScript tool form anyway - would be nice to implement a casperjs driven interactor though so the UI could be exercised for tests.
2014-12-05 23:35:44 -05:00
John Chilton 02fb0bae3b Break up a couple test methods for reuse downstream.
Remove duplication related to verifying a single dataset in tests - allows reuse in downstream when verifying the content of explicitly defined tool output collections.

Refactor out waiting for jobs - seems wrong place to put that logic this should allow easier moving.
2014-12-01 21:18:56 -05:00
John Chilton 421ee93140 Rearrange verify method to make duplication more obvious. 2014-12-01 21:18:56 -05:00
John Chilton 4cdbd53a5a Rename variable for clarity.
This method does not just return datasets.
2014-12-01 21:18:56 -05:00
John Chilton 8814d94e60 PEP-8 fixes for test.base.asserts.
Some of the first Python code I ever wrote - and one can tell :).
2014-11-25 20:57:56 -05:00
John Chilton 8bdcab103e Remove unused code. 2014-11-19 12:46:56 -05:00
John Chilton c97fd47654 Bug fix for 21e3d69. 2014-11-19 12:42:17 -05:00
John Chilton 08a93fe039 Remove unused code. 2014-11-19 12:42:17 -05:00
Dave Bouvier 4e9850b3d2 Fix getting job streams in functional tests. 2014-10-24 16:23:18 -04:00
Dave Bouvier bb3c895e51 Add optional display of stdout/stderr to the jobs API return value, defaulting to not displayed. Rework the test API interactor to wait for jobs instead of histories and get the stdout and stderr from the API. 2014-10-23 10:34:17 -04:00
John Chilton d36ab8e22a Add ability to disable asynchronous data uploads in tool tests.
Honestly - need to find a way to make this the default if sqlite is the target.
2014-10-14 15:25:55 -04:00
John Chilton 278780b7e0 Less aggressive test polling. 2014-10-14 15:25:55 -04:00
John Chilton 9de09330db Revert old test polling behavior with respect to 'new' state.
So that upload failures don't cause test to hang indefinitely.
2014-10-14 13:21:12 -04:00
John Chilton f08fab477d Optimization of API polling during tool testing.
Not the kind of optimization where you take something reasonable and brilliantly streamline it - but the kind of optimization where you take something ridiculus and make it less so. Oh past @jmchilton there is just no hope for you...
2014-10-14 12:56:50 -04:00
John Chilton d071165c0f Update master API key handling in tests for d7dd1f9.
Now aware of anyone actually overriding this with GALAXY_TEST_MASTER_API_KEY so not maintaining backward compatibility with respect to that environment variable.
2014-10-06 21:25:30 -04:00
Dannon Baker 2327f0d946 Final to_json_string/from_json_string elimination in tests. 2014-09-09 10:12:40 -04:00
John Chilton e58d1d9c8a Remove abstraction around requests now that it is a required dependency. 2014-09-04 20:34:52 -04:00
John Chilton c1ee4c9b31 Add functional test tool demonstrating output filters.
Add new 'expect_num_outputs' attribute to 'test' element in tool XML to verify the produced number - needed to test output filtering.
2014-09-03 08:43:25 -04:00
John Chilton 22819d88ce API tests for authenticate and some of users endpoints. 2014-08-04 21:45:02 -04:00
John Chilton 0af30153ee Fix API test interactor to use unique usernames.
Should fixes API tests broken when validation of these changed recently.
2014-07-25 08:42:36 -05:00
Dave Bouvier 2e893a17eb Fix display of job stdio when using the twill interactor. 2014-07-15 16:30:35 -04:00
Dave Bouvier c31644a5b1 Fix test_history_functions test 80, copying history items. 2014-07-09 16:11:50 -04:00
Dave Bouvier 670d73bdea Revert change that ended up breaking display of job stdio in functional tests. 2014-06-12 13:40:04 -04:00
Dave Bouvier 8dbc18a56f Fix for retrieving job streams with the twill interactor. 2014-05-12 16:27:49 -04:00
Dave Bouvier 430f568989 Fix functional test dataset error reporting. 2014-05-09 12:35:23 -04:00
Dave Bouvier f4386d60ab Clean up twilltestcase.py, fix functional tests for tools with spaces in the tool ID. 2014-05-09 09:57:26 -04:00
John Chilton aafe817cbf Refactor API assertions for reuse outside explicit TestCase classes. 2014-05-08 16:12:07 -05:00
John Chilton f42d97fef3 Dataset collections - tool parameters - allow tool tests.
With example tool tests demonstrating some basic features available to cheetah for data_collection parameters.
2014-05-06 08:54:30 -05:00
John Chilton ddcad1582c Merged in jmchilton/galaxy-central-fork-1 (pull request #356)
Enhancements for Runtime Discovered (Collected Primary) Datasets
2014-05-06 08:13:29 -05:00
Dave Bouvier 424efdcf9a Moved API tests to live under test/ rather than test/functional/. Removed test for DNAse flanked genes. Added test for UCSC table browser. 2014-04-30 15:35:57 -04:00
Dave Bouvier 2835b84a4c Fix admin and library feature functional tests. Improve handling of checkbox parameters and multi-select inputs in functional tests. 2014-04-29 15:39:43 -04:00
Dave Bouvier d3987e9424 Fix sample tracking functional tests. 2014-04-29 13:21:28 -04:00
Dave Bouvier feefdf6444 Twill test framework cleanup. Update install and test methods to reflect changes in base twilltestcase.py. 2014-04-28 11:22:17 -04:00