Exemplo n.º 1
0
 /**
  * This function echoes the default domian, start time, number of uri and number of tests.
  *
  * @Event("LiveTest.Run.PreRun")
  *
  * @param Properties $properties
  */
 public function preRun(Properties $properties)
 {
     $sessions = $properties->getTestSets();
     $uriCount = 0;
     foreach ($sessions as $testSets) {
         $uriCount += count($testSets);
     }
     echo "  Default Domain  : " . $properties->getDefaultDomain()->toString() . "\n";
     echo "  Start Time      : " . date('Y-m-d H:i:s') . "\n\n";
     echo "  Number of URIs  : " . $uriCount . "\n";
     echo "  Number of Tests : " . $this->getTotalTestCount($properties) . "\n\n";
 }
Exemplo n.º 2
0
 /**
  * This function runs all test sets defined in the properties file.
  *
  * @notify LiveTest.Run.PostRun
  * @notify LiveTest.Run.PreRun
  */
 public function run()
 {
     $this->eventDispatcher->simpleNotify('LiveTest.Run.PreRun', array('properties' => $this->properties));
     // @todo move timer to runner.php
     $timer = new Timer();
     foreach ($this->properties->getTestSets() as $sessionName => $testSets) {
         foreach ($testSets as $testSet) {
             $this->runTestSet($testSet, $sessionName);
         }
     }
     $information = new Information($timer->stop(), $this->properties->getDefaultDomain());
     $this->eventDispatcher->simpleNotify('LiveTest.Run.PostRun', array('information' => $information));
 }
Exemplo n.º 3
0
 public function testGetDefaultDomain()
 {
     $this->assertEquals("http://www.example.com/", $this->object->getDefaultDomain()->toString());
 }