FOSSology  4.4.0
Open Source License Compliance by Open Source Software
runFunctionalTests.php
1 #!/usr/bin/php
2 <?php
3 /*
4  SPDX-FileCopyrightText: © 2011 Hewlett-Packard Development Company, L.P.
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
18 /* simpletest includes */
19 require_once '/usr/local/simpletest/unit_tester.php';
20 require_once '/usr/local/simpletest/collector.php';
21 require_once '/usr/local/simpletest/web_tester.php';
22 require_once '/usr/local/simpletest/reporter.php';
23 require_once '/usr/local/simpletest/extensions/junit_xml_reporter.php';
24 
25 class groupFuncTests extends TestSuite
26 {
27  function __construct($label=FALSE)
28  {
29  parent::__construct($label);
30  // run createUIUsers first
31  $this->addTestFile('createUIUsers.php');
32  if(chdir( '../ui/tests') === FALSE )
33  {
34  echo "FATAL! Cannot cd to the ui/tests directory\n";
35  }
36  $testPath = getcwd();
37  //echo "RFTCLASS: testPath is:$testPath\n";
38 
39  $this->collect($testPath . '/SiteTests',
40  new SimplePatternCollector('/Test.php/'));
41  // BasicSetup Must be run before any of the BasicTests, they depend on it.
42  $this->addTestFile('BasicTests/BasicSetup.php');
43  $this->collect($testPath . '/BasicTests',
44  new SimplePatternCollector('/Test.php/'));
45  $this->collect($testPath . '/Users',
46  new SimplePatternCollector('/Test.php/'));
47  $this->collect($testPath . '/EmailNotification',
48  new SimplePatternCollector('/Test.php/'));
49  if(chdir( '../../tests') === FALSE )
50  {
51  echo "FATAL! Cannot cd to the ../../tests directory\n";
52  }
53  }
54 }
55 
56 // collect the tests
57 $testRun = new groupFuncTests('Fossology UI Functional Tests');
58 
59 // run the collected tests
60 $testRun->run(new JUnitXMLReporter());
Run the simpletest FOSSology functional tests.