use diagnostics;
use Carp;
use Test::Harness;
-
+
my %tests = ("all" => 't/selenium/TestAllTests.t',
"system" => 't/selenium/TestSystem.t',
"selling" => 't/selenium/TestSelling.t',
printf "\n\t\%s\n\t%s\n","Be ensure, that usage is promitted by login and db status!","\xAF" x 58;
}
unlink("/tmp/lxtest-temp.conf");
+
+
exit 1;
\ No newline at end of file
# plan tests => 200; # Need to be cutomized
# }
sub init_server {
- our $singlefileonly = 0;
+ my $singlefileonly = 0;
if ($_[0] eq "singlefileonly") {
$singlefileonly = 1;
shift;
foreach my $scriptdir (@_) {
opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir) or die "Can't open directory!" . $!;
foreach (sort readdir(SCRIPTS)) {
- require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_) if ( $_ =~ /^\w\d\d\d.*\.t$/);
+ if ( $_ =~ /^\w\d\d\d.*\.t$|^\d\d\d.*\.t$/ && !$sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_}) {
+ require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_);
+ $sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_} = 1;
+ }
}
closedir(SCRIPTS);
}
}
else {
- foreach (@_) { require_ok($_); }
+ foreach (@_) {
+ if ( $_ =~ /^.*\/\w\d\d\d.*\.t$|^.*\/\d\d\d.*\.t$/ && !$sel->{ran_tests}{$_}) {
+ require_ok($_);
+ $sel->{ran_tests}{$_} = 1;
+ }
+ }
}
if($!) {
@! = ("Test fehlgeschlagen!");
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("accounting/begin", "accounting/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("administration/begin", "administration/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("administration/begin", "system/begin", "masterdata/begin", "selling/begin", "purchase/begin",
+ "accounting/begin", "payments/begin", "reports/begin", "programm/begin",
+ "programm/end", "reports/end", "payments/end", "accounting/end", "purchase/end", "selling/end",
+ "masterdata/end", "system/end", "administration/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("administration/begin", "system/begin", "masterdata/begin");
+
+diag("\n\nUsername: " . $lxtest->{testuserlogin} . "\n" . "Password: " . $lxtest->{testuserpasswd} . "\n\n");
+
+1;
+
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("masterdata/begin", "masterdata/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("payments/begin", "payments/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("printing/begin", "printing/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("programm/begin", "programm/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("purchase/begin", "purchase/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("selling/begin", "selling/end");
+
+1;
\ No newline at end of file
--- /dev/null
+require "t/selenium/AllTests.t";
+
+init_server("system/begin", "system/end");
+
+1;
\ No newline at end of file
}
$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
-
+$sel->{ran_tests}{"t/selenium/testscripts/base/999Logout.t"} = 0;
1;
\ No newline at end of file
$sel->click_ok("link=abmelden");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->title_is("Lx-Office Version ".$lxtest->{version});
+$sel->{ran_tests}{"t/selenium/testscripts/base/000Login.t"} = 0;
1;
\ No newline at end of file