Ejemplo n.º 1
0
        }
        // switch($doc_info->content_range)
        // Create list of execution id, that will be used to compute execution time if
        // CF_EXEC_TIME custom field exists and is linked to current testproject
        $doc_data->statistics = null;
        if ($printingOptions['metrics']) {
            $executed_qty = 0;
            if ($tp_tcs) {
                foreach ($tp_tcs as $tcase_id => $info) {
                    if ($info['exec_status'] != $status_descr_code['not_run']) {
                        $execid_filter[] = $info['exec_id'];
                        $executed_qty++;
                    }
                }
            }
            $timeEstimatedDuration = $tplan_mgr->get_estimated_execution_time($args->tplan_id, $tcase_filter);
            if ($timeEstimatedDuration != "0") {
                $doc_data->statistics['estimated_execution']['minutes'] = $timeEstimatedDuration;
                $doc_data->statistics['estimated_execution']['tcase_qty'] = count($tp_tcs);
            }
            if ($executed_qty > 0) {
                $doc_data->statistics['real_execution']['minutes'] = $tplan_mgr->get_execution_time($args->tplan_id, $execid_filter);
                $doc_data->statistics['real_execution']['tcase_qty'] = $executed_qty;
            }
        }
        // if ($printingOptions['metrics'])
        break;
}
// ----- rendering logic -----
$topText = renderHTMLHeader($doc_info->type . ' ' . $doc_info->title, $_SESSION['basehref']);
$topText .= renderFirstPage($doc_info);