7 my @dirs = File::Spec->splitdir(File::Spec->rel2abs(__FILE__));
8 splice @dirs, -2; # bin/freeside-test-run
9 push @INC, File::Spec->catdir( @dirs, 'lib' );
15 my $username = 'test';
16 my $password = 'test';
18 getopts('d:U:', \%opt);
19 die usage() unless $opt{d};
20 my $test = FS::Test->new( dir => $opt{d} );
21 $test->fsurl($opt{U}) if $opt{U};
23 my $testfile = $test->share_dir . '/ui_tests';
24 open my $fh, '<', $testfile
25 or die "Couldn't read tests from '$testfile': $!\n";
26 $test->fetch( <$fh> );
29 "Usage: $0 -d directory [ -U base_URI ]\n\n";
34 freeside-test-fetch - download a list of UI pages for testing
38 freeside-test-fetch -d /tmp/outputdir [ -U http://myserver/freeside ]
42 -d: the directory to put the files in. Required.
44 -U: the URL prefix for the Freeside server. Defaults to
45 "http://localhost/freeside".
47 The list of tests is in the 'ui_tests' file included with FS::Test.