Revision d4d655d8
Von Thomas Kasulke vor mehr als 17 Jahren hinzugefügt
t/lx-office.t | ||
---|---|---|
34 | 34 |
use diagnostics; |
35 | 35 |
use Carp; |
36 | 36 |
use Test::Harness; |
37 |
|
|
37 |
|
|
38 | 38 |
my %tests = ("all" => 't/selenium/TestAllTests.t', |
39 | 39 |
"system" => 't/selenium/TestSystem.t', |
40 | 40 |
"selling" => 't/selenium/TestSelling.t', |
... | ... | |
176 | 176 |
printf "\n\t\%s\n\t%s\n","Be ensure, that usage is promitted by login and db status!","\xAF" x 58; |
177 | 177 |
} |
178 | 178 |
unlink("/tmp/lxtest-temp.conf"); |
179 |
|
|
180 |
|
|
179 | 181 |
exit 1; |
t/selenium/AllTests.t | ||
---|---|---|
61 | 61 |
# plan tests => 200; # Need to be cutomized |
62 | 62 |
# } |
63 | 63 |
sub init_server { |
64 |
our $singlefileonly = 0;
|
|
64 |
my $singlefileonly = 0;
|
|
65 | 65 |
if ($_[0] eq "singlefileonly") { |
66 | 66 |
$singlefileonly = 1; |
67 | 67 |
shift; |
... | ... | |
117 | 117 |
foreach my $scriptdir (@_) { |
118 | 118 |
opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir) or die "Can't open directory!" . $!; |
119 | 119 |
foreach (sort readdir(SCRIPTS)) { |
120 |
require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_) if ( $_ =~ /^\w\d\d\d.*\.t$/); |
|
120 |
if ( $_ =~ /^\w\d\d\d.*\.t$|^\d\d\d.*\.t$/ && !$sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_}) { |
|
121 |
require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_); |
|
122 |
$sel->{ran_tests}{"t/selenium/testscripts/". $scriptdir . "/" . $_} = 1; |
|
123 |
} |
|
121 | 124 |
} |
122 | 125 |
closedir(SCRIPTS); |
123 | 126 |
} |
124 | 127 |
} |
125 | 128 |
else { |
126 |
foreach (@_) { require_ok($_); } |
|
129 |
foreach (@_) { |
|
130 |
if ( $_ =~ /^.*\/\w\d\d\d.*\.t$|^.*\/\d\d\d.*\.t$/ && !$sel->{ran_tests}{$_}) { |
|
131 |
require_ok($_); |
|
132 |
$sel->{ran_tests}{$_} = 1; |
|
133 |
} |
|
134 |
} |
|
127 | 135 |
} |
128 | 136 |
if($!) { |
129 | 137 |
@! = ("Test fehlgeschlagen!"); |
t/selenium/TestAccounting.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("accounting/begin", "accounting/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestAdmin.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("administration/begin", "administration/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestAllTests.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("administration/begin", "system/begin", "masterdata/begin", "selling/begin", "purchase/begin", |
|
4 |
"accounting/begin", "payments/begin", "reports/begin", "programm/begin", |
|
5 |
"programm/end", "reports/end", "payments/end", "accounting/end", "purchase/end", "selling/end", |
|
6 |
"masterdata/end", "system/end", "administration/end"); |
|
7 |
|
|
8 |
1; |
t/selenium/TestCreateTestbed.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("administration/begin", "system/begin", "masterdata/begin"); |
|
4 |
|
|
5 |
diag("\n\nUsername: " . $lxtest->{testuserlogin} . "\n" . "Password: " . $lxtest->{testuserpasswd} . "\n\n"); |
|
6 |
|
|
7 |
1; |
|
8 |
|
t/selenium/TestMasterData.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("masterdata/begin", "masterdata/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestPayments.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("payments/begin", "payments/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestPrinting.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("printing/begin", "printing/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestProgramm.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("programm/begin", "programm/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestPurchase.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("purchase/begin", "purchase/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestSelling.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("selling/begin", "selling/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/TestSystem.t | ||
---|---|---|
1 |
require "t/selenium/AllTests.t"; |
|
2 |
|
|
3 |
init_server("system/begin", "system/end"); |
|
4 |
|
|
5 |
1; |
t/selenium/testscripts/base/000Login.t | ||
---|---|---|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}); |
35 |
|
|
35 |
$sel->{ran_tests}{"t/selenium/testscripts/base/999Logout.t"} = 0; |
|
36 | 36 |
1; |
t/selenium/testscripts/base/999Logout.t | ||
---|---|---|
11 | 11 |
$sel->click_ok("link=abmelden"); |
12 | 12 |
$sel->wait_for_page_to_load_ok($lxtest->{timeout}); |
13 | 13 |
$sel->title_is("Lx-Office Version ".$lxtest->{version}); |
14 |
$sel->{ran_tests}{"t/selenium/testscripts/base/000Login.t"} = 0; |
|
14 | 15 |
1; |
Auch abrufbar als: Unified diff
Hinzufügen der globalen Testscripte, welche die einzelnene Test koordienieren und aufrufen.