3 ## Bioperl Test Harness Script for Modules
10 # The EMBL-EBI Soaplab server has been decommissioned on 1st February 2013
11 # (https://www.ebi.ac.uk/Tools/webservices/about/news).
12 # Website "http://www.ebi.ac.uk/soaplab/services" dont exists anymore,
13 # so tests will fail with "404 Not Found" if executed
14 test_begin(-tests => 0,
15 -requires_networking => 1);
16 use_ok('Bio::Tools::Run::Analysis');
21 test_skip(-tests => 15, -requires_module => 'SOAP::Lite');
24 my $seqret = Bio::Tools::Run::Analysis->new(-name=>'edit.seqret');
28 # condition used to skip this block of tests
29 #skip($why, $how_many_in_block);
30 skip("Failed to create the analysis object", 1)
31 unless isa_ok( $seqret, 'Bio::Tools::Run::Analysis::soap');
33 # test seqret service with some testing data
34 # TODO: use BIOPERLDEBUG to skip these tests
36 'sequence_direct_data' => $seq,
39 is( $seqret->analysis_name, 'seqret', 'analysis_name returned seqret' );
40 isa_ok( $seqret->analysis_spec, 'HASH');
42 my $input_spec = $seqret->input_spec;
43 isa_ok( $input_spec, 'ARRAY' );
44 ok( @$input_spec > 0, 'input_spec returned an array with something in it' );
45 isa_ok( $input_spec->[0], 'HASH' );
46 my $result_spec = $seqret->result_spec;
47 isa_ok( $result_spec, 'ARRAY' );
48 ok( @$result_spec > 0, 'result_spec returned an array with something in it' );
49 like( $seqret->describe, '/^<\?xml /', 'describe seems to have returned the correct thing' );
50 my $job = $seqret->create_job (\%input);
52 skip("Object not created correctly", 6) unless isa_ok( $job, 'Bio::Tools::Run::Analysis::Job' );
54 is( $job->status, 'CREATED', 'Job status correct' );
55 # TODO: not goot to use private methods
56 my $cloned_job = $seqret->create_job ($job->{'_id'});
59 skip( "Couldn't clone the job", 2 )
60 unless isa_ok( $cloned_job, 'Bio::Tools::Run::Analysis::Job',
61 'Job cloned successfully' );
63 like( $cloned_job->last_event, '/^<\?xml /',
64 'last_event seems to have returned the correct thing' );
66 # TODO: not good to use private methods
67 is( $cloned_job->{'_destroy_on_exit'}, 1,
68 'Cloned job removed successfully' );