本文整理汇总了PHP中testplan::getStatusTotals方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::getStatusTotals方法的具体用法?PHP testplan::getStatusTotals怎么用?PHP testplan::getStatusTotals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testplan
的用法示例。
在下文中一共展示了testplan::getStatusTotals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: templateConfiguration
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();
示例2: foreach
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);
}
}
// ----------------------------------------------------------------------------
示例3: testplan
* @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();