本文整理汇总了PHP中testcase::getKeywords方法的典型用法代码示例。如果您正苦于以下问题:PHP testcase::getKeywords方法的具体用法?PHP testcase::getKeywords怎么用?PHP testcase::getKeywords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testcase
的用法示例。
在下文中一共展示了testcase::getKeywords方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dBug
echo "<pre> get_last_version_info({$tcase_id})";
$last_version_info = $tcase_mgr->get_last_version_info($tcase_id);
new dBug($last_version_info);
echo "<pre> testcase - get_versions_status_quo(\$id,\$tcversion_id=null, \$testplan_id=null)";
echo "<pre> get_versions_status_quo({$tcase_id})";
$status_quo = $tcase_mgr->get_versions_status_quo($tcase_id);
new dBug($status_quo);
echo "<pre> testcase - get_exec_status(\$id)";
echo "<pre> get_exec_status({$tcase_id})";
$testcase_exec_status = $tcase_mgr->get_exec_status($tcase_id);
new dBug($testcase_exec_status);
echo "<pre> testcase - getKeywords(\$tcID,\$kwID = null)";
echo "</pre>";
echo "<pre> getKeywords({$tcase_id})";
echo "</pre>";
$keywords = $tcase_mgr->getKeywords($tcase_id);
new dBug($keywords);
echo "<pre> testcase - get_keywords_map(\$id,\$order_by_clause='')";
echo "</pre>";
$tcase_id = 4;
echo "<pre> get_keywords_map({$tcase_id})";
echo "</pre>";
$keywords_map = $tcase_mgr->get_keywords_map($tcase_id);
new dBug($keywords_map);
$tcase_id = 4;
$version_id = 5;
$tplan_id = 8;
$build_id = 1;
echo "<pre> testcase - get_executions(\$id,\$version_id,\$tplan_id,\$build_id,<br>\n \$exec_id_order='DESC',\$exec_to_exclude=null)";
echo "</pre>";
echo "<pre> get_executions({$tcase_id},{$version_id},{$tplan_id},{$build_id})";
示例2: array
/**
* get_children_testcases
* get only test cases with parent=testsuite without doing a deep search
*
*/
function get_children_testcases($id, $details = 'simple', $options = null)
{
$testcases = null;
$only_id = $details == 'only_id' ? true : false;
$subtree = $this->tree_manager->get_children($id, array('testsuite' => 'exclude_me'));
$doit = !is_null($subtree);
$opt = array('getKeywords' => false);
$opt = array_merge($opt, (array) $options);
if ($doit) {
$tsuite = $this->get_by_id($id);
$tsuiteName = $tsuite['name'];
$testcases = array();
foreach ($subtree as $the_key => $elem) {
if ($only_id) {
$testcases[] = $elem['id'];
} else {
$testcases[] = $elem;
}
}
$doit = count($testcases) > 0;
}
if ($doit && $details == 'full') {
$rs = array();
$tcase_mgr = new testcase($this->db);
foreach ($testcases as $idx => $value) {
$item = $tcase_mgr->get_last_version_info($value['id'], array('output' => full, 'get_steps' => true));
$item['tcversion_id'] = $item['id'];
$parent['tsuite_name'] = $tsuiteName;
if ($opt['getKeywords']) {
$kw = $tcase_mgr->getKeywords($value['id']);
if (!is_null($kw)) {
$item['keywords'] = $kw;
}
}
unset($item['id']);
$rs[] = $value + $item + $tsuite;
}
$testcases = $rs;
}
return $testcases;
}