/** * 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"; }
/** * 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)); }
public function testGetDefaultDomain() { $this->assertEquals("http://www.example.com/", $this->object->getDefaultDomain()->toString()); }