Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests - Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
..................... <tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
- Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote: Hi,
I found below resources: Running test Writing Functional tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote: Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Hi,
Thanks for reply. I composed a details email for better clarity.
when run grep command in galaxy home folder ( ./run_functional_tests.sh -list | grep barcode-parse), I got no results. What I did was:
- Implemented a custom tool (It has one python script and tool definition file. These files are located in ../tools/Mytools/customToolName/) - Then run the ToolShed in my local which is running on port 9009 (I have) - Created a new repository in the ToolShed (which is running on 9009) and uploaded .py and .xml files in to it - Now I run the galaxy (running on port 8080) and browse the my custom tool from my local galaxy and install the custom tool successfully - And "shed_tool_conf.xml" file updated with new section: - - <section id="mTools" name="MyTools" version=""> - <tool file="xxx.xx.x.xx/repos/janakiram-t1/barcode_parse_1/b6a60d02b1a2/barcode_parse_1/barcode- parse.xml" guid="xxx.xx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0"> - <tool_shed>xxx.xxx.x.xx:9009</tool_shed> - <repository_name>barcode_parse_1</repository_name> - <repository_owner>janakiram-t1</repository_owner> - <installed_changeset_revision>b6a60d02b1a2</installed_changeset_revision> - <id>xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0</id> - <version>1.0.0</version> - </tool> - </section>
- My tool definition file look likes below: - - <tool id="barcode-parse" name="Barcode parse"> - <description>some description</description> - <command interpreter="python">barcode-parse.py $input1 $input2 $output</command> - <inputs> - <param format="input" name="input1" type="text" size="50" label="barcode" help="Enter barcode"> - <validator type="empty_field" message="please enter barcode"/> - </param> - <param format="input" name="input2" type="text" size="50" label="Expected format" help="Enter format to parse barcode"> - <validator type="empty_field" message="please enter expected format barcode"/> - </param> - </inputs> - <outputs> - <data format="txt" name="output" /> - </outputs> - <tests> - <test> - <param name="input1" value="test-01-sample-test-02-sampl1-test-03-sample3"/> - <param name="input2" value="name-id"/> - <output name="output" file="barcode-parse.txt"/> - </test> - </tests> - <help> - Parse the barcode into expected format - </help> - </tool> -
As galaxy using tool_conf.xml.sample, this file has no section for my custom tool. I have added a section manually like below:
<section name="MyTools" id="mTools"> <tool file="myTools/barcode-parse/barcode-parse.xml" /> </section>
Then my tool id found when I run the grep command. After that Then I run the below command to run the test cases:
sh run_functional_tests.sh -id barcode-parse
But I got below out put (from the run_functional_tests.html)
AttributeError: 'module' object has no attribute 'test_toolbox:TestForTool_barcode-parse'
Am I doing anything wrong.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:16 PM, Greg Von Kuster greg@bx.psu.edu wrote:
As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
- Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Hello Janaki,
Thanks for clarifying that you have installed your tools from a Tool Shed. In this case, functional tests do not use Galaxy's tool_conf.xml.sample, so changing it will make no difference. For information about running functional tests on tools installed from the Tool Shed, see: https://wiki.galaxyproject.org/TestingInstalledTools
Basically, you'll be doing the following. The functional test framework is not currently set up to test a specific installed tool using a -id flag. You'll have to use just the -installed flagg which will end up testing all installed tools.
export GALAXY_TOOL_DEPENDENCY_DIR=tool_dependencies; sh run_functional_tests.sh -installed
Greg Von Kuster
On Mar 27, 2014, at 8:58 AM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote:
Hi,
Thanks for reply. I composed a details email for better clarity.
when run grep command in galaxy home folder ( ./run_functional_tests.sh -list | grep barcode-parse), I got no results. What I did was: Implemented a custom tool (It has one python script and tool definition file. These files are located in ../tools/Mytools/customToolName/) Then run the ToolShed in my local which is running on port 9009 (I have) Created a new repository in the ToolShed (which is running on 9009) and uploaded .py and .xml files in to it Now I run the galaxy (running on port 8080) and browse the my custom tool from my local galaxy and install the custom tool successfully And "shed_tool_conf.xml" file updated with new section:
<section id="mTools" name="MyTools" version=""> <tool file="xxx.xx.x.xx/repos/janakiram-t1/barcode_parse_1/b6a60d02b1a2/barcode_parse_1/barcode- parse.xml" guid="xxx.xx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0"> <tool_shed>xxx.xxx.x.xx:9009</tool_shed> <repository_name>barcode_parse_1</repository_name> <repository_owner>janakiram-t1</repository_owner> <installed_changeset_revision>b6a60d02b1a2</installed_changeset_revision> <id>xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0</id> <version>1.0.0</version> </tool> </section>
My tool definition file look likes below:
<tool id="barcode-parse" name="Barcode parse"> <description>some description</description> <command interpreter="python">barcode-parse.py $input1 $input2 $output</command> <inputs> <param format="input" name="input1" type="text" size="50" label="barcode" help="Enter barcode"> <validator type="empty_field" message="please enter barcode"/> </param> <param format="input" name="input2" type="text" size="50" label="Expected format" help="Enter format to parse barcode"> <validator type="empty_field" message="please enter expected format barcode"/> </param> </inputs> <outputs> <data format="txt" name="output" /> </outputs> <tests> <test> <param name="input1" value="test-01-sample-test-02-sampl1-test-03-sample3"/> <param name="input2" value="name-id"/> <output name="output" file="barcode-parse.txt"/> </test> </tests> <help> Parse the barcode into expected format </help> </tool> As galaxy using tool_conf.xml.sample, this file has no section for my custom tool. I have added a section manually like below:
<section name="MyTools" id="mTools"> <tool file="myTools/barcode-parse/barcode-parse.xml" /> </section>
Then my tool id found when I run the grep command. After that Then I run the below command to run the test cases:
sh run_functional_tests.sh -id barcode-parse
But I got below out put (from the run_functional_tests.html)
AttributeError: 'module' object has no attribute 'test_toolbox:TestForTool_barcode-parse'
Am I doing anything wrong.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:16 PM, Greg Von Kuster greg@bx.psu.edu wrote: As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote: Hi,
I found below resources: Running test Writing Functional tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi janakiram.gollapudi@india.semanticbits.com wrote: Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Thank you, I will go through the resources and will reply my results to this email chain.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:39 PM, Greg Von Kuster greg@bx.psu.edu wrote:
Hello Janaki,
Thanks for clarifying that you have installed your tools from a Tool Shed. In this case, functional tests do not use Galaxy's tool_conf.xml.sample, so changing it will make no difference. For information about running functional tests on tools installed from the Tool Shed, see: https://wiki.galaxyproject.org/TestingInstalledTools
Basically, you'll be doing the following. The functional test framework is not currently set up to test a specific installed tool using a -id flag. You'll have to use just the -installed flagg which will end up testing all installed tools.
export GALAXY_TOOL_DEPENDENCY_DIR=tool_dependencies; sh run_functional_tests.sh -installed
Greg Von Kuster
On Mar 27, 2014, at 8:58 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
Thanks for reply. I composed a details email for better clarity.
when run grep command in galaxy home folder ( ./run_functional_tests.sh -list | grep barcode-parse), I got no results. What I did was:
- Implemented a custom tool (It has one python script and tool
definition file. These files are located in ../tools/Mytools/customToolName/)
- Then run the ToolShed in my local which is running on port 9009 (I
have)
- Created a new repository in the ToolShed (which is running on 9009)
and uploaded .py and .xml files in to it
- Now I run the galaxy (running on port 8080) and browse the my custom
tool from my local galaxy and install the custom tool successfully
And "shed_tool_conf.xml" file updated with new section:
<section id="mTools" name="MyTools" version="">
- <tool
file="xxx.xx.x.xx/repos/janakiram-t1/barcode_parse_1/b6a60d02b1a2/barcode_parse_1/barcode- parse.xml" guid="xxx.xx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0">
<tool_shed>xxx.xxx.x.xx:9009</tool_shed>
<repository_name>barcode_parse_1</repository_name>
<repository_owner>janakiram-t1</repository_owner>
<installed_changeset_revision>b6a60d02b1a2</installed_changeset_revision>
<id>xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0</id>
<version>1.0.0</version>
</tool>
</section>
My tool definition file look likes below:
<tool id="barcode-parse" name="Barcode parse">
<description>some description</description>
<command interpreter="python">barcode-parse.py $input1
$input2 $output</command>
<inputs>
<param format="input" name="input1" type="text" size="50"
label="barcode" help="Enter barcode">
<validator type="empty_field" message="please enter barcode"/>
</param>
<param format="input" name="input2" type="text" size="50"
label="Expected format" help="Enter format to parse barcode">
- <validator type="empty_field" message="please enter expected
format barcode"/>
</param>
</inputs>
<outputs>
<data format="txt" name="output" />
</outputs>
<tests>
<test>
<param name="input1"
value="test-01-sample-test-02-sampl1-test-03-sample3"/>
<param name="input2" value="name-id"/>
<output name="output" file="barcode-parse.txt"/>
</test>
</tests>
<help>
Parse the barcode into expected format
</help>
</tool>
As galaxy using tool_conf.xml.sample, this file has no section for my custom tool. I have added a section manually like below:
<section name="MyTools" id="mTools"> <tool file="myTools/barcode-parse/barcode-parse.xml" /> </section>
Then my tool id found when I run the grep command. After that Then I run the below command to run the test cases:
sh run_functional_tests.sh -id barcode-parse
But I got below out put (from the run_functional_tests.html)
AttributeError: 'module' object has no attribute 'test_toolbox:TestForTool_barcode-parse'
Am I doing anything wrong.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:16 PM, Greg Von Kuster greg@bx.psu.edu wrote:
As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
- Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Hi,
I have gone through the resources and able to run the test cases, but some how my test cases are failing with below exception
File "/home/janakiram/Documents/Galaxy/galaxy-dist/test/base/twilltestcase.py", line 192, in get_filename return os.path.abspath( os.path.join( file_dir, filename ) )
File "/usr/lib/python2.7/posixpath.py", line 77, in join elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
My test cases are: ..............................
<tests>
<test>
<param name="input1" value="TEST-0001-01"/>
<param name="input2" value="TEST-Sample"/>
<output name="output" file="barcode-parse-ouput1.txt"/>
</test>
<test>
<param name="input1" value="TEST-0001-02"/>
<param name="input2" value="TEST-Sample-New"/>
<output name="output" file="barcode-parse-ouput2.txt"/>
</test>
<test>
<param name="input1" value="TEST-0001-01"/>
<param name="input2" value="MyTestSample"/>
<output name="output" file="barcode-parse-ouput3.txt"/>
</test>
</tests> ..............................
I put the barcode-parse-ouput1.txt, barcode-parse-ouput2.txt, barcode-parse-ouput3.txt files in the "test-data" folder (I also set the "tool_dependency_dir" in universe_wsgi.ini). Could you please help me on this.
Please find the attached function test case output.
Thanks & Regards, G.JanakiRam
On Thu, Mar 27, 2014 at 7:40 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Thank you, I will go through the resources and will reply my results to this email chain.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:39 PM, Greg Von Kuster greg@bx.psu.edu wrote:
Hello Janaki,
Thanks for clarifying that you have installed your tools from a Tool Shed. In this case, functional tests do not use Galaxy's tool_conf.xml.sample, so changing it will make no difference. For information about running functional tests on tools installed from the Tool Shed, see: https://wiki.galaxyproject.org/TestingInstalledTools
Basically, you'll be doing the following. The functional test framework is not currently set up to test a specific installed tool using a -id flag. You'll have to use just the -installed flagg which will end up testing all installed tools.
export GALAXY_TOOL_DEPENDENCY_DIR=tool_dependencies; sh run_functional_tests.sh -installed
Greg Von Kuster
On Mar 27, 2014, at 8:58 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
Thanks for reply. I composed a details email for better clarity.
when run grep command in galaxy home folder ( ./run_functional_tests.sh -list | grep barcode-parse), I got no results. What I did was:
- Implemented a custom tool (It has one python script and tool
definition file. These files are located in ../tools/Mytools/customToolName/)
- Then run the ToolShed in my local which is running on port 9009 (I
have)
- Created a new repository in the ToolShed (which is running on 9009)
and uploaded .py and .xml files in to it
- Now I run the galaxy (running on port 8080) and browse the my
custom tool from my local galaxy and install the custom tool successfully
And "shed_tool_conf.xml" file updated with new section:
<section id="mTools" name="MyTools" version="">
- <tool
file="xxx.xx.x.xx/repos/janakiram-t1/barcode_parse_1/b6a60d02b1a2/barcode_parse_1/barcode- parse.xml" guid="xxx.xx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0">
<tool_shed>xxx.xxx.x.xx:9009</tool_shed>
<repository_name>barcode_parse_1</repository_name>
<repository_owner>janakiram-t1</repository_owner>
<installed_changeset_revision>b6a60d02b1a2</installed_changeset_revision>
<id>xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0</id>
<version>1.0.0</version>
</tool>
</section>
My tool definition file look likes below:
<tool id="barcode-parse" name="Barcode parse">
<description>some description</description>
<command interpreter="python">barcode-parse.py $input1
$input2 $output</command>
<inputs>
<param format="input" name="input1" type="text"
size="50" label="barcode" help="Enter barcode">
<validator type="empty_field" message="please enter barcode"/>
</param>
<param format="input" name="input2" type="text" size="50"
label="Expected format" help="Enter format to parse barcode">
- <validator type="empty_field" message="please enter expected
format barcode"/>
</param>
</inputs>
<outputs>
<data format="txt" name="output" />
</outputs>
<tests>
<test>
<param name="input1"
value="test-01-sample-test-02-sampl1-test-03-sample3"/>
<param name="input2" value="name-id"/>
<output name="output" file="barcode-parse.txt"/>
</test>
</tests>
<help>
Parse the barcode into expected format
</help>
</tool>
As galaxy using tool_conf.xml.sample, this file has no section for my custom tool. I have added a section manually like below:
<section name="MyTools" id="mTools"> <tool file="myTools/barcode-parse/barcode-parse.xml" /> </section>
Then my tool id found when I run the grep command. After that Then I run the below command to run the test cases:
sh run_functional_tests.sh -id barcode-parse
But I got below out put (from the run_functional_tests.html)
AttributeError: 'module' object has no attribute 'test_toolbox:TestForTool_barcode-parse'
Am I doing anything wrong.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:16 PM, Greg Von Kuster greg@bx.psu.edu wrote:
As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
- Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
Hi,
I have modified the tool dependency xml file by adding Absolute path to output file, like below, then my test cases are *passing*:
<tests> <test> <param name="input1" value="TCGA-02-0001-01"/> <param name="input2" value="Project-TSS-Participant"/> <output name="output" file="path to test-data directory/barcode-parse-ouput1.txt"/> </test> <test> <param name="input1" value="TCGA-02-0001-01"/> <param name="input2" value="Project TSS: Participant"/> <output name="output" file="path to test-data directory/barcode-parse-ouput2.txt"/> </test> <test> <param name="input1" value="TCGA-02-0001-01"/> <param name="input2" value="MyBarcodeProjectisTSS"/> <output name="output" file="path to test-data directory/barcode-parse-ouput3.txt"/> </test> </tests>
Thanks for all your help.
Thanks, JanakiRam
On Fri, Mar 28, 2014 at 2:39 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have gone through the resources and able to run the test cases, but some how my test cases are failing with below exception
File "/home/janakiram/Documents/Galaxy/galaxy-dist/test/base/twilltestcase.py", line 192, in get_filename return os.path.abspath( os.path.join( file_dir, filename ) )
File "/usr/lib/python2.7/posixpath.py", line 77, in join elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'
My test cases are: ..............................
<tests>
<test>
<param name="input1" value="TEST-0001-01"/>
<param name="input2" value="TEST-Sample"/>
<output name="output" file="barcode-parse-ouput1.txt"/>
</test>
<test>
<param name="input1" value="TEST-0001-02"/>
<param name="input2" value="TEST-Sample-New"/>
<output name="output" file="barcode-parse-ouput2.txt"/>
</test>
<test>
<param name="input1" value="TEST-0001-01"/>
<param name="input2" value="MyTestSample"/>
<output name="output" file="barcode-parse-ouput3.txt"/>
</test>
</tests> ..............................
I put the barcode-parse-ouput1.txt, barcode-parse-ouput2.txt, barcode-parse-ouput3.txt files in the "test-data" folder (I also set the "tool_dependency_dir" in universe_wsgi.ini). Could you please help me on this.
Please find the attached function test case output.
Thanks & Regards, G.JanakiRam
On Thu, Mar 27, 2014 at 7:40 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Thank you, I will go through the resources and will reply my results to this email chain.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:39 PM, Greg Von Kuster greg@bx.psu.edu wrote:
Hello Janaki,
Thanks for clarifying that you have installed your tools from a Tool Shed. In this case, functional tests do not use Galaxy's tool_conf.xml.sample, so changing it will make no difference. For information about running functional tests on tools installed from the Tool Shed, see: https://wiki.galaxyproject.org/TestingInstalledTools
Basically, you'll be doing the following. The functional test framework is not currently set up to test a specific installed tool using a -id flag. You'll have to use just the -installed flagg which will end up testing all installed tools.
export GALAXY_TOOL_DEPENDENCY_DIR=tool_dependencies; sh run_functional_tests.sh -installed
Greg Von Kuster
On Mar 27, 2014, at 8:58 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
Thanks for reply. I composed a details email for better clarity.
when run grep command in galaxy home folder ( ./run_functional_tests.sh -list | grep barcode-parse), I got no results. What I did was:
- Implemented a custom tool (It has one python script and tool
definition file. These files are located in ../tools/Mytools/customToolName/)
- Then run the ToolShed in my local which is running on port 9009 (I
have)
- Created a new repository in the ToolShed (which is running on
- and uploaded .py and .xml files in to it
- Now I run the galaxy (running on port 8080) and browse the my
custom tool from my local galaxy and install the custom tool successfully
And "shed_tool_conf.xml" file updated with new section:
<section id="mTools" name="MyTools" version="">
- <tool
file="xxx.xx.x.xx/repos/janakiram-t1/barcode_parse_1/b6a60d02b1a2/barcode_parse_1/barcode- parse.xml" guid="xxx.xx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0">
<tool_shed>xxx.xxx.x.xx:9009</tool_shed>
<repository_name>barcode_parse_1</repository_name>
<repository_owner>janakiram-t1</repository_owner>
<installed_changeset_revision>b6a60d02b1a2</installed_changeset_revision>
<id>xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0</id>
<version>1.0.0</version>
</tool>
</section>
My tool definition file look likes below:
<tool id="barcode-parse" name="Barcode parse">
<description>some description</description>
<command interpreter="python">barcode-parse.py $input1
$input2 $output</command>
<inputs>
<param format="input" name="input1" type="text"
size="50" label="barcode" help="Enter barcode">
<validator type="empty_field" message="please enter barcode"/>
</param>
<param format="input" name="input2" type="text" size="50"
label="Expected format" help="Enter format to parse barcode">
- <validator type="empty_field" message="please enter expected
format barcode"/>
</param>
</inputs>
<outputs>
<data format="txt" name="output" />
</outputs>
<tests>
<test>
<param name="input1"
value="test-01-sample-test-02-sampl1-test-03-sample3"/>
<param name="input2" value="name-id"/>
<output name="output" file="barcode-parse.txt"/>
</test>
</tests>
<help>
Parse the barcode into expected format
</help>
</tool>
As galaxy using tool_conf.xml.sample, this file has no section for my custom tool. I have added a section manually like below:
<section name="MyTools" id="mTools"> <tool file="myTools/barcode-parse/barcode-parse.xml" /> </section>
Then my tool id found when I run the grep command. After that Then I run the below command to run the test cases:
sh run_functional_tests.sh -id barcode-parse
But I got below out put (from the run_functional_tests.html)
AttributeError: 'module' object has no attribute 'test_toolbox:TestForTool_barcode-parse'
Am I doing anything wrong.
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 6:16 PM, Greg Von Kuster greg@bx.psu.eduwrote:
As Janaki replied below, see: http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Ad...
On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have added tests to tool dependency xml, but how should I run these tests, can you please help me to run test cases.
.....................
<tests> <test> <param name="input1" value="some string"/> <param name="input2" value="expected format"/> <output name="output" file="output.txt"/> </test> </tests> ......................
Thanks, G.JanakiRam
On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I found below resources:
- Running testhttps://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
- Writing Functional testshttps://wiki.galaxyproject.org/Admin/Tools/Writing%20Tests
Thanks, JanakiRam
On Thu, Mar 27, 2014 at 2:53 PM, Janaki Rama Rao Gollapudi < janakiram.gollapudi@india.semanticbits.com> wrote:
Hi,
I have implemented a custom tool which will parse a given string in to expected format. Installed this custom tool into galaxy and was able to run successfully.
I would like to add test cases to this tool, can you please provide me resources to write test cases for this custom tool.
Is this tool need functional, unit, integration test cases ? I am not sure about which test cases needed for this tool.
Thanks, JanakiRam
Please keep all replies on the list by using "reply all" in your mail client. To manage your subscriptions to this and other Galaxy lists, please use the interface at: http://lists.bx.psu.edu/
To search Galaxy mailing lists use the unified search at: http://galaxyproject.org/search/mailinglists/
galaxy-dev@lists.galaxyproject.org