Hi all,

Have looked through the list archives regarding this without much luck.

I have a repeat parameter which contains a boolean based conditional. I wrote a simple test case for it but I think the test keeps failing at the boolean parameter..

input section looks like:

            <repeat name="inputs" title="Input read libraries">
                        <conditional name="is_separate">
<param name="separate" type="boolean" checked="false" truevalue="-separate" falsevalue="" label="Are the reads paired and in two different files?" />
<when value="">
<param name="forwards_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset"/>
</when>
<when value="-separate">
<param name="forwards_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset for direction 1"/>
<param name="reverse_file" type="data" format="fasta,fastq,raw,sam,bam" label="Read dataset for direction 2"/>
</when>
</conditional>

            .......
           </repeat>

test section looks like:

<tests>
    <test>
            <param name="start_kmer" value="21"/>
            <param name="end_kmer" value="29"/>
            <param name="inputs.is_separate.separate" value="false"/>
            <param name="inputs.is_separate.forwards_file" value="vopt_test_reads.dat" ftype="fasta"/>
            <output name="contigs" file="vopt_test_contigs.dat"/>
     </test>
</tests>

The output from run_functional tests is:

======================================================================
ERROR: test_tool_000000 (functional.test_toolbox.TestForTool_velvetoptimiser_vlsci)
Velvet Optimiser vlsci ( velvetoptimiser_vlsci ) > Test-1
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/simon/Galaxy/galaxy-dist/test/functional/test_toolbox.py", line 171, in test_tool
    self.do_it( td, shed_tool_id=shed_tool_id )
  File "/home/simon/Galaxy/galaxy-dist/test/functional/test_toolbox.py", line 76, in do_it
    page_inputs =  self.__expand_grouping(testdef.tool.inputs_by_page[0], all_inputs)
  File "/home/simon/Galaxy/galaxy-dist/test/functional/test_toolbox.py", line 131, in __expand_grouping
    expanded_inputs.update( self.__expand_grouping( { new_prefix : r_value }, declared_inputs, prefix = new_prefix ) )
  File "/home/simon/Galaxy/galaxy-dist/test/functional/test_toolbox.py", line 118, in __expand_grouping
    if declared_inputs[ value.test_param.name ] == case.value:
KeyError: 'separate'
-------------------- >> begin captured stdout << ---------------------
kmer_step not declared in tool test, will not change default value.
filetype not declared in tool test, will not change default value.

--------------------- >> end captured stdout << ----------------------
-------------------- >> begin captured logging << --------------------
galaxy.web.framework: DEBUG: Error: this request returned None from get_history(): http://localhost:8326/
galaxy.web.framework: DEBUG: Error: this request returned None from get_history(): http://localhost:8326/
galaxy.web.framework: DEBUG: Error: this request returned None from get_history(): http://localhost:8326/user/logout
galaxy.web.framework: DEBUG: Error: this request returned None from get_history(): http://localhost:8326/
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 0.675s

FAILED (errors=1)

My question: Can the testing framework handle the nesting of the boolean, conditional and repeat parameters or have I made a mistake in the test xml?


Cheers,

Simon Gladman
VBC/VLSCI
Monash University
Australia.