Commit Graph
19 Commits
Author SHA1 Message Date
John Chilton c425907780 Merged in jmchilton/galaxy-central-fork-1 (pull request #347)
Check ftype attribute (if defined) on test output datasets.
2014-03-18 12:42:23 -05:00
John Chilton cb40e02a51 Add tool functional test for parallelism with optional inputs.
This functionality is broken without patch from pull request #334. To run this broken test:

% # First two exports are optional but speed up testing and force newest test framework.
% export GALAXY_TEST_DEFAULT_INTERACTOR=api;
% export GALAXY_TEST_DB_TEMPLATE=https://github.com/jmchilton/galaxy-bootstrap/raw/master/src/main/resources/com/github/jmchilton/galaxybootstrap/universe.sqlite
% ./run_functional_tests.sh -framework -id parallelism_optional
2014-03-16 20:41:42 -05:00
John Chilton 8d1b6a8c74 Check ftype attribute (if defined) on test output datasets.
Only works for newer API driven tests.
2014-03-14 10:12:41 -05:00
John Chilton d7a5f28121 Improve examples of newer tool functional test features. 2014-02-03 10:11:31 -06:00
John Chilton 17e935528d Add example tool with task splitting to tool functional framework tests.
Enable task splitting in functional tests to test this. Specify tool_dir in samples tool_conf.xml so it doesn't need to be explicitly set in scripts/functional_tests.py.
2014-01-28 14:34:26 -06:00
John Chilton 9e8a32c460 Extend tools API to allow use of data params with multiple='true' with multiple values.
Likewise extend API driven tool testing framework to support these, add sample test cases.

Also fixup english on a log warning.
2013-11-22 02:09:28 -06:00
John Chilton db014a8559 Add test case for data param with multiple=True even if just 1 file used.
Add fix to twill driver to fix this use case.
2013-11-22 01:27:47 -06:00
John Chilton 48b7a50eb2 Fixes related to implicit defaults of param values.
Logic errors related to them being contained in repeat blocks and to picking the top value in a select by default when no other value is marked as default.

Other small adjustments - add another sample tool demonstrating the problem and clean up error messages.
2013-11-21 23:37:22 -06:00
John Chilton c6d3679b92 Clean up tool framework test tools.
Add example of nested conditional disambiugation.
2013-11-21 21:17:04 -06:00
John Chilton 4c4189c558 Fix API handling of tools containing repeat statement with min set. 2013-11-21 20:18:47 -06:00
John Chilton bf75275a61 Tree-like input specification in tool XML file.
Allow nestable <repeat> and <conditional> statements in test tool definitions.

For instance, imagine a tool with a repeat statement like:

  <repeat name="rinst" title="Repeat Parameter">
    <param name="int_param" type="integer" value="1" />
    <param name="float_param" type="float" value="2.0" />
  </repeat>

3 test instances overidding int_param default in all three, but leaving the float_param default in place for the first and last can specified as follows:

  <repeat name="rinst">
    <param name="rinst|int_param" value="4" />
  </repeat>
  <repeat name="rinst">
    <param name="rinst|int_param" value="5" />
    <param name="rinst|float_param" value="4.0" />
  </repeat>
  <repeat name="rinst">
    <param name="rinst|int_param" value="6" />
  </repeat>

Likewise, <conditional name="cinst"> can be used analogously though this is for grouping and disambiguation - does not allow multiple instances to specified obviously.
2013-11-21 19:17:13 -06:00
John Chilton 1a6fbc5456 Allow robust disambiguation of repeat statements in tool tests.
Imagine a tool with a repeat statement like:

  <repeat name="rinst" title="Repeat Parameter">
    <param name="int_param" type="integer" value="1" />
    <param name="float_param" type="float" value="2.0" />
  </repeat>

3 test instances overidding int_param default in all three, but leaving the float_param default in place for the first and last can specified as follows:

  <param name="rinst_0|int_param" value="4" />
  <param name="rinst_1|int_param" value="5" />
  <param name="rtnst_2|int_param" value="6" />
  <param name="rinst_1|float_param" value="4.0" />

This syntax can be mixed and matched with specifing conditionals and nested repeats, etc....

One could imagine an alternative syntax like:

  <param name="rinst|int_param" value="4" />
  <param name="rinst|int_param" value="5" />
  <param name="rtnst|int_param" value="6" />
  <param name="rinst|float_param" value="4.0" />

Upon consideration, I have determined that this ambigious syntax is more difficult to reason about, leaves so much ambigiouity in place especially in the context of default and nested elements, and is harder to support. So the plan is to not support it at this time.

The following changeset will add "the right" way to do this anyway:

  <repeat name="rinst">
    <param name="rinst|int_param" value="4" />
  </repeat>
  <repeat name="rinst">
    <param name="rinst|int_param" value="5" />
    <param name="rinst|float_param" value="4.0" />
  </repeat>
  <repeat name="rinst">
    <param name="rinst|int_param" value="6" />
  </repeat>
2013-11-21 19:17:13 -06:00
John Chilton a5153ff420 Make disambiguate_cond more difficult. 2013-11-21 19:17:13 -06:00
John Chilton 8c54c91ab9 Allow outputs in tool functional tests to be specified in any order when using API interactor.
Outputs must specify name and must be specified in the same order with the Twill variant. This second restriction is entirely arbitrary using API so dropping it here.

Adding tool demonstrating this functionality (test/functional/tools/output_order.xml) which fails with twill interactor but works fine with API interactor.
2013-11-21 19:17:13 -06:00
John Chilton 1c40b4f359 Extend tool functional test framework to allow testing output dataset metadata.
Adding file test/functional/tools/metadata.xml demonstrating how to check output metadata - this file also demonstrates setting metadata on uploaded datasets and verifies both of these functionalities. Checking output metadata is only available for new API driven tool testing.
2013-11-21 19:17:13 -06:00
John Chilton a0d6d113ab Add more sample tools for tool testing framework.
Adding multi_select.xml, which demonstrates twill cannot deal with - at the beginning of select param values - this test works immediately with API interactor.

Also adding a multi_output.xml, this is a tool using variable number of outputs (force_refresh=True), both interactors pass this but it is a good test to verify that.

Also adding example to test multi-page tools (multi_page.xml) - both interactors pass this test. Though the API needed to be adjusted to allow its use (in a previous changeset).

Also adding example tool demonstrating extra_files output.

Finally, a tool simple_constructs.xml that just tests the basics, various parameter types, simple conditional, and simple repeat.
2013-11-21 19:17:12 -06:00
John Chilton 036fd68a44 Twill-less tool tests - handle composite inputs.
Add example tool test for composite data (worked with Twill based test framework prior to this commit, works with API based framework as a result of this commit).
2013-11-21 19:17:12 -06:00
John Chilton b001f73585 Tool functional tests - allow disambiguation of params in conditionals.
Disambiguate by add prefix for parent (or any number of direct ancestors) with pipe (|). See included test case for an example.

Should fix twill and API driven functional tests.
2013-11-21 19:17:12 -06:00
John Chilton 569c5db221 Add new option, tools, and data to functional test framework to test/demonstrate tool framework itself.
Add smaple repeat tool demonstrating some weaknesses of twill-based current framework.
2013-11-21 19:17:12 -06:00