[Bioperl-l] Tests involving remote databases

Chris Fields cjfields at uiuc.edu
Sun Oct 1 17:05:25 UTC 2006


On Sep 30, 2006, at 4:43 PM, Hilmar Lapp wrote:

>
> On Sep 30, 2006, at 10:57 AM, Chris Fields wrote:
>
>> There should be a failed test to let us know of the problem.  As
>> currently set up, the XEMBL server failure doesn't show up in
>> Test::Harness test summaries.  Biblio_biofetch.t had the similar
>> problems before Brian's fixes.
>
> Just keep in mind that you may not want somebody's CPAN installation
> to fail (or require a 'forced' install) just because some server
> happens to be down for maintenance.
>
> 	-hilmar

I don't think this would be a problem unless users specifically set  
BIOPERLDEBUG to 1, which is something most people don't bother with  
before installation (and probably not something we should promote for  
normal installation anyway).  So, for CPAN installation we would  
suggest that BIOPERLDEBUG be 0 or not set at all, and outline the  
reasons why.

The idea is to retain current behavior (remote DB access will not be  
run unless BIOPERLDEBUG is set to 1) and apply it to all tests  
requiring such access.  Otherwise, just those tests are skipped (and  
not the rest of the tests, which occurs currently).  If BIOPERLDEBUG  
is set, the next tests would check the URL, which passes/fails (based  
on the specific value of $@), and runs/skips tests based on the mere  
presence of $@, which indicates some URL issue.  You can do this with  
Test::More, but I'm not sure this can be done with Test.pm or  
Test::Simple.

The current behavior just skips all tests based on a single failed  
URL.  Then, Test::Harness, as currently set, shows skipped tests as  
passed.  The last run I posted previously where XEMBL_DB.t remote DB  
tests failed, I also ran all tests (make test) and get this, which  
doesn't tell us that the remote URL failed:

-----------------------------------------

...
t/WABA.......................ok
t/XEMBL_DB...................ok
t/ztr........................Bio::SeqIO::staden::read of bioperl-ext  
is not installed or is installed incorrectly - skipping ztr.t tests
ok
All tests successful, 5 subtests skipped.

-----------------------------------------


Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign






More information about the Bioperl-l mailing list