private function _createTableForRun($run) { $fvMedian = $this->firstViewMedianRun; $out = "<table id=\"table{$run}\" class=\"pretty result\" align=\"center\" border=\"1\" cellpadding=\"20\" cellspacing=\"0\">\n"; $columns = $this->_countTableColumns(); $out .= $this->_createTableHead(); $firstViewResults = $this->testResults->getRunResult($run, false); $hasRepeatView = !$this->testInfo->isFirstViewOnly() || $this->testResults->getRunResult($run, true); if ($this->isMultistep && $hasRepeatView) { $out .= $this->_createSeparationRow("First View", $columns); } $out .= $this->_createRunResultRows($run, false, $columns); if ($hasRepeatView) { if ($this->isMultistep) { $out .= $this->_createSeparationRow("Repeat View", $columns); } $out .= $this->_createRunResultRows($run, true, $columns); } if ($this->testComplete && $run == $fvMedian && $firstViewResults && $firstViewResults->isValid() && !$this->isMultistep) { $out .= $this->_createBreakdownRow($firstViewResults->getStepResult(1), $columns); } $out .= "</table>\n<br>\n"; return $out; }
/** * Constructs a TestResults object by loading the information from result files * @param TestInfo $testInfo Test information used to load the data * @param FileHandler $fileHandler FileHandler to use * @param array $options Options to load the TestRunResults * @return TestResults The new instance */ public static function fromFiles($testInfo, $fileHandler = null, $options = null) { $runResults = array(); $numRuns = $testInfo->getRuns(); $firstViewOnly = $testInfo->isFirstViewOnly(); $testComplete = $testInfo->isComplete(); for ($runNumber = 1; $runNumber <= $numRuns; $runNumber++) { if (!$testComplete && !$testInfo->isRunComplete($runNumber)) { continue; } $firstView = TestRunResults::fromFiles($testInfo, $runNumber, false, $fileHandler, $options); $repeatView = $firstViewOnly ? null : TestRunResults::fromFiles($testInfo, $runNumber, true, $fileHandler, $options); $runResults[] = array($firstView, $repeatView); } return new self($testInfo, $runResults, $fileHandler); }