Example #1
0
require_once "../../config.inc.php";
require_once "common.php";
require_once "web_editor.php";
$editorCfg = getWebEditorCfg('design');
require_once require_web_editor($editorCfg['type']);
testlinkInitPage($db);
$tree_mgr = new tree($db);
$tproject_mgr = new testproject($db);
$tsuite_mgr = new testsuite($db);
$tcase_mgr = new testcase($db);
$assign_gui = true;
$refreshTree = false;
list($args, $gui) = initializeEnv($db, $tree_mgr);
$keywordSet = array('testproject' => $tproject_mgr->get_keywords_map($args->tproject_id), 'testsuite' => null);
if ($args->action == 'edit_testsuite') {
    $keywordSet['testsuite'] = $tsuite_mgr->get_keywords_map($args->testsuiteID, " ORDER BY keyword ASC ");
}
$gui_cfg = config_get('gui');
$tpl = null;
$smarty = new TLSmarty();
$smarty->tlTemplateCfg = templateConfiguration();
$smarty->assign('editorType', $editorCfg['type']);
switch ($args->action) {
    case 'edit_testsuite':
    case 'new_testsuite':
        renderTestSuiteForManagement($smarty, $args, $gui, $tsuite_mgr, $keywordSet);
        exit;
        break;
    case 'add_testsuite':
        $messages = null;
        $op['status'] = 0;
echo "<pre>             get_testcases_deep(\$tsuite_id,\$details='full')";
echo "</pre>";
$testcases_deep = $tsuite_mgr->get_testcases_deep($tsuite_id, 'full');
new dBug($testcases_deep);
echo "<pre> testsuite - getKeywords(\$tcID,\$kwID = null)";
echo "</pre>";
echo "<pre>            getKeywords({$tsuite_id})";
echo "</pre>";
$keywords = $tsuite_mgr->getKeywords($tsuite_id);
new dBug($keywords);
echo "<pre> testsuite - get_keywords_map(\$id,\$order_by_clause='')";
echo "</pre>";
$tsuite_id = 4;
echo "<pre>               get_keywords_map({$tsuite_id})";
echo "</pre>";
$keywords_map = $tsuite_mgr->get_keywords_map($tsuite_id);
new dBug($keywords_map);
/*

$set_of_tsuite_id=array(4,6);
echo "<pre>            get_by_id($set_of_tsuite_id)";echo "</pre>";
$set_of_tcase_info=$tsuite_mgr->get_by_id($set_of_tsuite_id);
new dBug($set_of_tcase_info);

$tsuite_id=4;
echo "<pre> testsuite - check_link_and_exec_status(\$id)";echo "</pre>";
echo "<pre>            check_link_and_exec_status($tsuite_id)";echo "</pre>";
$link_and_exec_status=$tsuite_mgr->check_link_and_exec_status($tsuite_id);
new dBug($link_and_exec_status);