Ejemplo n.º 1
0
if (config_get('interface_bugs') != 'NO') {
    require_once TL_ABS_PATH . 'lib' . DIRECTORY_SEPARATOR . 'bugtracking' . DIRECTORY_SEPARATOR . 'int_bugtracking.php';
}
testlinkInitPage($db);
$templateCfg = templateConfiguration();
$gui = new stdClass();
$tplan_mgr = new testplan($db);
$tproject_mgr = new testproject($db);
$gui->tplan_id = intval($_REQUEST['tplan_id']);
$gui->tproject_id = intval($_REQUEST['tproject_id']);
$tplan_info = $tplan_mgr->get_by_id($gui->tplan_id);
$tproject_info = $tproject_mgr->get_by_id($gui->tproject_id);
// ??
// $tplan_mgr->getStatusTotalsByPlatform($gui->tplan_id);
$gui->can_use_charts = checkLibGd();
$totals = $tplan_mgr->getStatusTotals($gui->tplan_id);
if ($gui->can_use_charts == 'OK') {
    $gui->tplan_name = $tplan_info['name'];
    $gui->tproject_name = $tproject_info['name'];
    $resultsCfg = config_get('results');
    // Save in session to improve perfomance.
    // This data will be used in different *chart.php to generate on the fly image
    unset($_SESSION['statistics']);
    $re = new results($db, $tplan_mgr, $tproject_info, $tplan_info, ALL_TEST_SUITES, ALL_BUILDS, ALL_PLATFORMS);
    $_SESSION['statistics']['getTopLevelSuites'] = $re->getTopLevelSuites();
    $_SESSION['statistics']['getAggregateMap'] = $re->getAggregateMap();
    $_SESSION['statistics']['getAggregateOwnerResults'] = $re->getAggregateOwnerResults();
    $_SESSION['statistics']['getAggregateKeywordResults'] = $re->getAggregateKeywordResults();
    $pathToScripts = "lib/results/";
    $tprojectTplanInfo = "?tproject_id={$gui->tproject_id}&tplan_id={$gui->tplan_id}";
    $chartsUrl = new stdClass();
Ejemplo n.º 2
0
    if ($gui->do_report['status_ok']) {
        $results = $re->getAggregateBuildResults();
        if ($results != null) {
            // BUGID 0003123: General Test Plan Metrics - order of columns with test case exec results
            $code_verbose = $tplan_mgr->getStatusForReports();
            $resultsCfg = config_get('results');
            $labels = $resultsCfg['status_label'];
            foreach ($code_verbose as $status_verbose) {
                $l18n_label = isset($labels[$status_verbose]) ? lang_get($labels[$status_verbose]) : lang_get($status_verbose);
                $colDefinition[$status_verbose]['qty'] = $l18n_label;
                $colDefinition[$status_verbose]['percentage'] = '[%]';
            }
        }
    }
    /* MILESTONE & PRIORITY REPORT */
    $planMetrics = $tplan_mgr->getStatusTotals($args->tplan_id);
    $filters = null;
    $options = array('output' => 'map', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'mapOfArray', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'mapOfMap', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $options = array('output' => 'array', 'only_executed' => true, 'execution_details' => 'add_build');
    $execResults = $tplan_mgr->get_linked_tcversions($args->tplan_id, $filters, $options);
    $milestonesList = $tplan_mgr->get_milestones($args->tplan_id);
    if (!empty($milestonesList)) {
        $gui->statistics->milestones = $metricsMgr->getMilestonesMetrics($args->tplan_id, $milestonesList);
    }
}
// ----------------------------------------------------------------------------
Ejemplo n.º 3
0
 * @internal revisions
 *
 *
**/
require_once '../../config.inc.php';
require_once 'common.php';
define('PCHART_PATH', '../../third_party/pchart');
include PCHART_PATH . "/pChart/pData.class";
include PCHART_PATH . "/pChart/pChart.class";
testlinkInitPage($db);
$args = init_args();
checkRights($db, $_SESSION['currentUser'], $args);
$resultsCfg = config_get('results');
$chart_cfg = $resultsCfg['charts']['dimensions']['overallPieChart'];
$tplan_mgr = new testplan($db);
$totals = $tplan_mgr->getStatusTotals($args->tplan_id);
unset($totals['total']);
$values = array();
$labels = array();
foreach ($totals as $key => $value) {
    $values[] = $value;
    $labels[] = lang_get($resultsCfg['status_label'][$key]) . " ({$value})";
    if (isset($resultsCfg['charts']['status_colour'][$key])) {
        $series_color[] = $resultsCfg['charts']['status_colour'][$key];
    }
}
// Dataset definition
$DataSet = new pData();
$DataSet->AddPoint($values, "Serie1");
$DataSet->AddPoint($labels, "Serie8");
$DataSet->AddAllSeries();