Пример #1
0
$start = new timer();
$Svn = `svnversion`;
$date = date('Y-m-d');
$time = date('h:i:s-a');
print "\nStarting Site Tests on: " . $date . " at " . $time . "\n";
print "Using Svn Version:{$Svn}\n";
$test =& new TestSuite('Fossology Repo Site UI tests');
$test->addTestFile('AboutMenuTest.php');
$test->addTestFile('login.php');
$test->addTestFile('SearchMenuTest.php');
$test->addTestFile('OrgFoldersMenuTest-Create.php');
$test->addTestFile('OrgFoldersMenuTest-Delete.php');
$test->addTestFile('OrgFoldersMenuTest-Edit.php');
$test->addTestFile('OrgFoldersMenuTest-Move.php');
$test->addTestFile('OrgUploadsMenuTest-Delete.php');
$test->addTestFile('OrgUploadsMenuTest-Move.php');
$test->addTestFile('UploadInstructMenuTest.php');
$test->addTestFile('UploadFileMenuTest.php');
$test->addTestFile('UploadServerMenuTest.php');
$test->addTestFile('UploadUrlMenuTest.php');
$test->addTestFile('UploadOne-ShotMenuTest.php');
if (TextReporter::inCli()) {
    $results = $test->run(new TextReporter()) ? 0 : 1;
    print "Ending Site Tests at: " . date('r') . "\n";
    $elapseTime = $start->TimeAgo($start->getStartTime());
    print "The Site Tests took {$elapseTime}to run\n\n";
    exit($results);
}
$test->run(new HtmlReporter());
$elapseTime = $start->TimeAgo($start->getStartTime());
print "<pre>The Site Tests took {$elapseTime}to run</pre>\n\n";