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.
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.
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.
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>
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.
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.
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.
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).
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.