4 bulk.t - a website-level test of the bulk download
8 Tests all bulk download.
12 Lukas Mueller, Jonathan "Duke" Leto
17 use Test::More tests => 26;
18 use Test::WWW::Mechanize;
22 my $base_url = $ENV{SGN_TEST_SERVER};
25 my $mech = Test::WWW::Mechanize->new;
27 for my $input_type (qw/microarray clone_search bac bac_end ftp unigene_convert unigene/) {
28 $mech->get_ok("$base_url/bulk/input.pl?mode=$input_type");
31 $mech->content_contains("Download unigene information");
34 form_name => "bulkform",
41 $mech->submit_form_ok($params, "Submit to bulkform on input.pl");
42 $mech->content_contains("Bulk download summary", "Result page title check");
43 $mech->content_like(qr/The query you submitted contained .*2.*/, "input.pl returns correct data");
44 $mech->content_like(qr/Your query resulted in .*2.* lines/, "input.pl returns correct data");
47 my $mech = Test::WWW::Mechanize->new;
48 $mech->get_ok("$base_url/bulk/download.pl?idType=bac");
49 $mech->content_contains("Bulk download error");
52 my $mech = Test::WWW::Mechanize->new;
53 $mech->get("$base_url/bulk/input.pl?mode=unigene");
55 form_name => "bulkform",
57 ids => "SGN-U444444\nSGN-U555555\n",
58 seq_mode => "longest6frame_seq",
61 $mech->submit_form_ok($params, "Submit to Unigene bulkform from input.pl");
62 $mech->content_contains("download summary");
65 my $mech = Test::WWW::Mechanize->new;
66 $mech->get("$base_url/bulk/input.pl?mode=bac");
68 form_name => "bulkform",
70 ids => 'LE_HBa0033F11',
73 $mech->submit_form_ok($params, "Submit to BAC bulkform from input.pl");
74 $mech->content_contains("download summary");
77 my $mech = Test::WWW::Mechanize->new;
78 $mech->get("$base_url/bulk/input.pl?mode=clone_search");
80 form_name => "bulkform",
87 $mech->submit_form_ok($params, "Submit to clone_search bulkform from input.pl");
88 $mech->content_contains("download summary");
91 my $mech = Test::WWW::Mechanize->new;
92 $mech->get("$base_url/bulk/input.pl?mode=microarray");
94 form_name => "bulkform",
100 $mech->submit_form_ok($params, "Submit to microarray bulkform from input.pl");
101 $mech->content_contains("download summary");
104 my $mech = Test::WWW::Mechanize->new;
105 $mech->get("$base_url/bulk/input.pl?mode=bac_end");
107 form_name => "bulkform",
109 ids => 'LE_HBa0011C24_SP6_121022',
112 $mech->submit_form_ok($params, "Submit to bac_end bulkform from input.pl");
113 $mech->content_contains("download summary");
116 my $mech = Test::WWW::Mechanize->new;
117 $mech->get("$base_url/bulk/input.pl?mode=unigene_convert");
119 form_name => "bulkform",
121 ids => 'SGN-U268057',
124 $mech->submit_form_ok($params, "Submit to unigene_convert bulkform from input.pl");
125 $mech->content_contains("download summary");