[LON-CAPA-cvs] cvs: modules /goltermann/internalTest Makefile runInternalTest.pl
goltermann
goltermann at source.lon-capa.org
Tue May 7 06:28:46 EDT 2013
goltermann Tue May 7 10:28:46 2013 EDT
Added files:
/modules/goltermann/internalTest runInternalTest.pl Makefile
Log:
initial commit
stable version
Index: modules/goltermann/internalTest/runInternalTest.pl
+++ modules/goltermann/internalTest/runInternalTest.pl
#!perl
use strict;
use warnings;
use Test::More 0.98;
# plan tests
use Smart::Comments;
use lib('/home/httpd/lib/perl','.','./t');
# -- LONCAPA Testsuite for lonnet --
# This will run several automated tests for the lonnet module.
#
# You need to run this script with the following parameters:
# - domain : the domain of your LC server zou are going to test
# - user : the username of your test user
# - pw : the password used by your test user
#
#
# If you want to write your own test module you have to give your module an explicit package name.
# Also the module needs a run() function which contains all the tests included in your module.
# It is recommended to start with the Template.pm to create a your own testmodule! Dont forget to add it to the module list below.
my ($domain, $user, $pw) = @ARGV;
unless ($domain || $user || $pw) {
print "No arguments given. Use 'make' or give mandatory parameters manually.\n";
exit;
}
my @modules = ('UserRelated'); # add more here
my %config = ( # TODO read config from file
domain => $domain,
user => $user,
pw => $pw
);
print "LON-CAPA testing script for lonnet v0.2\nPlease read documentation.\n";
use_ok('Apache::lonnet');
foreach my $module (@modules){
subtest "module $module" => sub {
use_ok($module);
$module->run(%config);
};
}# end of foreach modules
END{
done_testing();
}
More information about the LON-CAPA-cvs
mailing list