Re: [galaxy-dev] How to write test cases for custom tool

2014-03-28 Thread Janaki Rama Rao Gollapudi
Hi,

I have modified the tool dependency xml file by adding Absolute path to
output file, like below, then my test cases are *passing*:



 
 
 


 
 
 


 
 
 



Thanks for all your help.


Thanks,
JanakiRam


On Fri, Mar 28, 2014 at 2:39 PM, Janaki Rama Rao Gollapudi <
janakiram.gollap...@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:
>..
>
> 
>
> 
>
>   
>
>  
>
>  
>
> 
>
> 
>
>  
>
>  
>
>  
>
> 
>
> 
>
>  
>
>  
>
>  
>
> 
>
> 
> ..
>
>
> 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.gollap...@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  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.gollap...@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:
>>>   -
>>>   - 
>>>   -   >>   
>>> 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">
>>>   -   xxx.xxx.x.xx:9009
>>>   - barcode_parse_1
>>>   - janakiram-t1
>>>   -
>>>   
>>> b6a60d02b1a2
>>>   -
>>>   
>>> xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0
>>>   - 1.0.0
>>>   - 
>>>   - 
>>>
>>>   - My tool definition  file look likes below:
>>>   -
>>>   - 
>>>   - some description
>>>   - barcode-parse.py $input1
>>>   $input2 $output
>>>   - 
>>>   - >>   size="50" label="barcode" help="Enter barcode">
>>>   -  
>>>   - 
>>>   - >>   label="Expected format" help="Enter format to parse barcode">
>>>   - 
>>>   - 
>>>   - 
>>>   - 
>>>   - 
>>>   - 
>>>   - 
>>>   -
>>>   -  >>   value="test-01-sample-test-02-sampl1-test-03-sample3"/>
>>>   -  
>>>   -  
>>>   -
>>>   - 
>>>   - 
>>>   -Parse the barcode into expected format
>>>   - 
>>>   - 
>>>   -
>>>
>>> As galaxy using  tool_conf.xml.sample, this file has no section for my
>>> custom tool. I have added a section manually like below:
>>>
>>>  
>>>
>>>   
>>>
>>> Then my tool id found when I run the grep command. After that Then I run
>

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Janaki Rama Rao Gollapudi
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  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.gollap...@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:
>   -
>   - 
>   -  
> 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">
>   -   xxx.xxx.x.xx:9009
>   - barcode_parse_1
>   - janakiram-t1
>   -
>   
> b6a60d02b1a2
>   -
>   
> xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0
>   - 1.0.0
>   - 
>   - 
>
>   - My tool definition  file look likes below:
>   -
>   - 
>   - some description
>   - barcode-parse.py $input1
>   $input2 $output
>   - 
>   -label="barcode" help="Enter barcode">
>   -  
>   - 
>   -label="Expected format" help="Enter format to parse barcode">
>   - 
>   - 
>   - 
>   - 
>   - 
>   - 
>   - 
>   -
>   - value="test-01-sample-test-02-sampl1-test-03-sample3"/>
>   -  
>   -  
>   -
>   - 
>   - 
>   -Parse the barcode into expected format
>   - 
>   - 
>   -
>
> As galaxy using  tool_conf.xml.sample, this file has no section for my
> custom tool. I have added a section manually like below:
>
>  
>
>   
>
> 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  wrote:
>
>> As Janaki replied below, see:
>> http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
>>
>> On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi <
>> janakiram.gollap...@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.
>>
>> .
>>  
>>
>>  
>>  
>>  
>>
>> 
>> ..
>>
>>
>> Thanks,
>> G.JanakiRam
>>
>>
>>
>>
>> On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi <
>> janakiram.gollap...@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.gollap...@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 

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Greg Von Kuster
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 
 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: 
> 
>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">
>   xxx.xxx.x.xx:9009
> barcode_parse_1
> janakiram-t1
> 
> b6a60d02b1a2
> 
> xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0
> 1.0.0
> 
> 
> 
> My tool definition  file look likes below:
> 
> some description
> barcode-parse.py $input1 $input2 
> $output
> 
>  label="barcode" help="Enter barcode">
>
>   
>label="Expected format" help="Enter format to parse barcode">
>
>   
> 
> 
>   
> 
> 
>
>   value="test-01-sample-test-02-sampl1-test-03-sample3"/>
>  
>  
>
> 
> 
>Parse the barcode into expected format
> 
> 
> As galaxy using  tool_conf.xml.sample, this file has no section for my custom 
> tool. I have added a section manually like below:
> 
>  
>  
>   
> 
> 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  wrote:
> As Janaki replied below, see: 
> http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
> 
> On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi 
>  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. 
>> 
>> .
>>  
>>
>>  
>>  
>>  
>>
>> 
>> ..
>> 
>> 
>> Thanks,
>> G.JanakiRam
>> 
>> 
>> 
>> 
>> On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi 
>>  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 
>>  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/
> 
> 

___
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and othe

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Janaki Rama Rao Gollapudi
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:
  -
  - 
  -   
  -   xxx.xxx.x.xx:9009
  - barcode_parse_1
  - janakiram-t1
  -
  b6a60d02b1a2
  -
  
xxx.xxx.x.xx:9009/repos/janakiram-t1/barcode_parse_1/barcode-parse/1.0.0
  - 1.0.0
  - 
  - 

  - My tool definition  file look likes below:
  -
  - 
  - some description
  - barcode-parse.py $input1 $input2
  $output
  - 
  - 
  -  
  - 
  - 
  - 
  - 
  - 
  - 
  - 
  - 
  - 
  -
  -  
  -  
  -  
  -
  - 
  - 
  -Parse the barcode into expected format
  - 
  - 
  -

As galaxy using  tool_conf.xml.sample, this file has no section for my
custom tool. I have added a section manually like below:

 
   
  

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  wrote:

> As Janaki replied below, see:
> http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests
>
> On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi <
> janakiram.gollap...@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.
>
> .
>  
>
>  
>  
>  
>
> 
> ..
>
>
> Thanks,
> G.JanakiRam
>
>
>
>
> On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi <
> janakiram.gollap...@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.gollap...@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/
>
>
>
___
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/

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Greg Von Kuster
As Janaki replied below, see: 
http://wiki.galaxyproject.org/Admin/RunningTests?action=show&redirect=Admin%2FRunning+Tests

On Mar 27, 2014, at 7:15 AM, Janaki Rama Rao Gollapudi 
 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. 
> 
> .
>  
>
>  
>  
>  
>
> 
> ..
> 
> 
> Thanks,
> G.JanakiRam
> 
> 
> 
> 
> On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi 
>  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 
>  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/

___
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/

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Janaki Rama Rao Gollapudi
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.

.
 
   
 
 
 
   

..


Thanks,
G.JanakiRam




On Thu, Mar 27, 2014 at 3:27 PM, Janaki Rama Rao Gollapudi <
janakiram.gollap...@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.gollap...@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/

Re: [galaxy-dev] How to write test cases for custom tool

2014-03-27 Thread Janaki Rama Rao Gollapudi
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.gollap...@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/