summaryrefslogtreecommitdiff
path: root/FS-Test/bin/freeside-test-fetch
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2015-08-04 11:15:52 -0700
committerMark Wells <mark@freeside.biz>2015-08-04 11:19:48 -0700
commit4b616a57791fd6fb324194a0eb96a8f95826c533 (patch)
treea00e4ab72bdbab0d8b6aca974eddba4716a4ceb8 /FS-Test/bin/freeside-test-fetch
parentd2c37c8081873993f108f46361a804abc8aa23d9 (diff)
UI testing tool, #37340
Diffstat (limited to 'FS-Test/bin/freeside-test-fetch')
-rwxr-xr-xFS-Test/bin/freeside-test-fetch43
1 files changed, 43 insertions, 0 deletions
diff --git a/FS-Test/bin/freeside-test-fetch b/FS-Test/bin/freeside-test-fetch
new file mode 100755
index 000000000..ccc8528ff
--- /dev/null
+++ b/FS-Test/bin/freeside-test-fetch
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+use strict;
+use FS::Test;
+use Getopt::Std;
+
+my %opt;
+
+my $username = 'test';
+my $password = 'test';
+
+getopts('d:U:', \%opt);
+die usage() unless $opt{d};
+my $test = FS::Test->new( dir => $opt{d} );
+$test->fsurl($opt{U}) if $opt{U};
+
+my $testfile = $test->share_dir . '/ui_tests';
+open my $fh, '<', $testfile
+ or die "Couldn't read tests from '$testfile': $!\n";
+$test->fetch( <$fh> );
+
+sub usage {
+ "Usage: $0 -d directory [ -U base_URI ]\n\n";
+}
+
+=head1 NAME
+
+freeside-test-fetch - download a list of UI pages for testing
+
+=head1 USAGE
+
+freeside-test-fetch -d /tmp/outputdir [ -U http://myserver/freeside ]
+
+=head1 ARGUMENTS
+
+-d: the directory to put the files in. Required.
+
+-U: the URL prefix for the Freeside server. Defaults to
+"http://localhost/freeside".
+
+The list of tests is in the 'ui_tests' file included with FS::Test.
+
+=cut