test the simplest call: count (II)

This is a test of the MRS Text Search and Sequence Retrieval service.
Test filesDownload the files for this test
Test runRun test now
Support reference#94-100
Run the Count command which does a simple boolean search on a well known databank.
Show/hide recent test logs
view log 1 day agoPASSED

Test began: 2012-05-18 06:34:17 Test ended: 2012-05-18 06:34:17 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 2 weeks agoPASSED

Test began: 2012-05-07 14:54:36 Test ended: 2012-05-07 14:54:37 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 3 weeks agoPASSED

Test began: 2012-04-30 01:45:55 Test ended: 2012-04-30 01:45:57 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 3 weeks agoPASSED

Test began: 2012-04-26 05:37:24 Test ended: 2012-04-26 05:37:25 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 4 weeks agoPASSED

Test began: 2012-04-21 06:48:28 Test ended: 2012-04-21 06:48:29 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 4 weeks agoPASSED

Test began: 2012-04-20 08:00:28 Test ended: 2012-04-20 08:00:28 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 1 month agoPASSED

Test began: 2012-04-18 15:07:07 Test ended: 2012-04-18 15:07:08 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 2 months agoPASSED

Test began: 2012-04-01 07:32:48 Test ended: 2012-04-01 07:32:48 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 2 months agoPASSED

Test began: 2012-03-27 09:54:51 Test ended: 2012-03-27 09:54:52 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
view log 2 months agoPASSED

Test began: 2012-03-22 08:21:26 Test ended: 2012-03-22 08:21:27 Result : Test passed ------ stderr and stdout follow ------ PassedDownload this log...
This test consists of the following files:
test-search.pl
#!/usr/bin/perl
# the first line of the script must tell us which language interpreter to use,
# in this case its perl
use strict;
use warnings;
use Data::Dumper;
# import the modules we need for this test; XML::Compile is included on the server
# by default.
use XML::Compile::WSDL11;
use XML::Compile::Transport::SOAPHTTP;
eval
{
# Retrieving and processing the WSDL
my $wsdl = XML::LibXML->new->parse_file('http://mrs.cmbi.ru.nl/mrsws/search/wsdl');
my $proxy = XML::Compile::WSDL11->new($wsdl);
# Generating a request message based on the WSDL
my $count = $proxy->compileClient('Count');
# Calling the service and getting the response
my ($answer, $trace) = $count->( db => 'uniprot', booleanquery => 'os:human' );
# If the response arrived, look for a specific value that is supposed to be larger than 0
# If the value is larger than zero, return 0 because the test passed.
# If the value is something else, return 2 to indicate a warning.
# If no answer has arrived, return 1 to indicate the test failed.
if ( defined $answer ) {
if ($answer->{parameters}->{response}->is_int() and
$answer->{parameters}->{response}->is_pos() and
not $answer->{parameters}->{response}->is_zero()) {
print "Passed\n";
exit 0;
} else {
print "Unexpected data\n";
exit 2;
}
} else {
print "Failed\n";
exit 1;
}
};
if ($@)
{
print "Caught an exception: $@\n";
exit 1;
}
»
- Login to post comments