Example #1
0
 $gui->map_last_exec = getLastExecution($db, $tcase_id, $tcversion_id, $gui, $args, $tcase_mgr);
 // --------------------------------------------------------------------------------------------
 // Results to DB
 if ($args->save_results || $args->do_bulk_save || $args->save_and_next) {
     // this has to be done to do not break logic present on write_execution()
     $args->save_results = $args->save_and_next ? $args->save_and_next : $args->save_results;
     $_REQUEST['save_results'] = $args->save_results;
     $submitResult = write_execution($db, $args, $_REQUEST, $gui->map_last_exec);
     // Need to re-read to update test case status
     if ($args->save_and_next) {
         $nextItem = $tplan_mgr->getTestCaseNextSibling($args->tplan_id, $tcversion_id, $args->platform_id);
         if (!is_null($nextItem)) {
             $tcase_id = $nextItem['tcase_id'];
             $tcversion_id = $nextItem['tcversion_id'];
             // BUGID 3478
             processTestCase($nextItem, $gui, $args, $cfg, $linked_tcversions, $tree_mgr, $tcase_mgr, $attachmentRepository);
         }
     }
     $gui->map_last_exec = getLastExecution($db, $tcase_id, $tcversion_id, $gui, $args, $tcase_mgr);
 }
 if ($args->doDelete) {
     delete_execution($db, $args->exec_to_delete);
 }
 // --------------------------------------------------------------------------------------------
 $gui->map_last_exec_any_build = null;
 $gui->other_execs = null;
 $testerid = null;
 if ($args->level == 'testcase') {
     // @TODO 20090815 - franciscom check what to do with platform
     if ($cfg->exec_cfg->show_last_exec_any_build) {
         // 20090716 - franciscom - get_last_execution() interface changes
Example #2
0
    $gui = doSingleTestCaseOperation($db, $args, $gui, $pfn);
}
switch ($args->edit) {
    case 'testproject':
        show_instructions('assignReqs');
        exit;
        break;
    case 'testsuite':
        $gui = processTestSuite($db, $args, $gui);
        $templateCfg->default_template = 'reqTcBulkAssignment.tpl';
        if ($bulkDone) {
            $gui->user_feedback = sprintf(lang_get('bulk_assigment_done'), $bulkCounter);
        }
        break;
    case 'testcase':
        $gui = processTestCase($db, $args, $gui);
        break;
    default:
        tlog("Wrong GET/POST arguments.", 'ERROR');
        exit;
        break;
}
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->assign('modify_req_rights', has_rights($db, "mgt_modify_req"));
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
/**
 *
 */
function init_args()
{
function processSaveAndNext(&$mgrPool, $argsObj, $guiObj, $tcversionID)
{
    $identity = null;
    $nextItem = $mgrPool->tplan->getTestCaseNextSibling($argsObj->tplan_id, $tcversionID, $argsObj->platform_id);
    while (!is_null($nextItem) && !in_array($nextItem['tcase_id'], $argsObj->testcases_to_show)) {
        $nextItem = $mgrPool->tplan->getTestCaseNextSibling($argsObj->tplan_id, $nextItem['tcversion_id'], $argsObj->platform_id);
    }
    if (!is_null($nextItem)) {
        // Save and Next - Issues with display CF for test plan design - always EMPTY
        // need info about this test case => need to update linked_tcversions info
        $identity = array('id' => $nextItem['tcase_id'], 'version_id' => $nextItem['tcversion_id']);
        list($lt, $xdm) = getLinkedItems($argsObj, $guiObj->history_on, $cfg, $tcase_mgr, $tplan_mgr, $identity);
        processTestCase($nextItem, $guiObj, $argsObj, $cfg, $lt, $mgr);
    }
    return $identity;
}
Example #4
0
    case 'testproject':
    case 'testsuite':
        $item_mgr = new $args->feature($db);
        $gui->id = $args->id;
        if ($args->feature == 'testproject') {
            $gui->id = $args->id = $args->tproject_id;
            $item_mgr->show($smarty, $gui, $templateCfg->template_dir, $args->id);
        } else {
            $gui->direct_link = $item_mgr->buildDirectWebLink($_SESSION['basehref'], $args->id, $args->tproject_id);
            $gui->attachments = getAttachmentInfosFrom($item_mgr, $args->id);
            $item_mgr->show($smarty, $gui, $templateCfg->template_dir, $args->id, array('show_mode' => $args->show_mode));
        }
        break;
    case 'testcase':
        try {
            processTestCase($db, $smarty, $args, $gui, $grants, $cfg);
        } catch (Exception $e) {
            echo $e->getMessage();
        }
        break;
    default:
        tLog('Argument "edit" has invalid value: ' . $args->feature, 'ERROR');
        trigger_error($_SESSION['currentUser']->login . '> Argument "edit" has invalid value.', E_USER_ERROR);
        break;
}
/**
 * 
 *
 */
function init_args(&$dbHandler)
{
Example #5
0
                 break;
         }
         $nextItem = $tplan_mgr->getTestCaseNextSibling($args->tplan_id, $tcversion_id, $args->platform_id, $opt4sibling);
         if (!$doSingleStep) {
             while (!is_null($nextItem) && !in_array($nextItem['tcase_id'], $args->testcases_to_show)) {
                 $nextItem = $tplan_mgr->getTestCaseNextSibling($args->tplan_id, $nextItem['tcversion_id'], $args->platform_id, $opt4sibling);
             }
         }
         if (!is_null($nextItem)) {
             $tcase_id = $nextItem['tcase_id'];
             $tcversion_id = $nextItem['tcversion_id'];
             // Save and Next - Issues with display CF for test plan design - always EMPTY
             // need info about this test case => need to update linked_tcversions info
             $identity = array('id' => $nextItem['tcase_id'], 'version_id' => $nextItem['tcversion_id']);
             list($lt, $xdm) = getLinkedItems($args, $gui->history_on, $cfg, $tcase_mgr, $tplan_mgr, $identity);
             processTestCase($nextItem, $gui, $args, $cfg, $lt, $tree_mgr, $tcase_mgr, $attachmentRepository);
         }
     } else {
         if ($args->save_and_exit) {
             $args->reload_caller = true;
         }
     }
 }
 if (!$args->reload_caller) {
     if ($args->doDelete) {
         delete_execution($db, $args->exec_to_delete);
     }
     // Important Notice: $tcase_id and $tcversions_id, can be ARRAYS when user enable bulk execution
     if (is_array($tcase_id)) {
         $tcase_id = array_intersect($tcase_id, $args->testcases_to_show);
     }
Example #6
0
}
switch ($args->doAction) {
    case "doUpdate":
    case "doBulkUpdateToLatest":
        $gui->user_feedback = doUpdate($db, $args);
        break;
    default:
        break;
}
$out = null;
$gui->show_details = 0;
$gui->operationType = 'standard';
$gui->hasItems = 0;
switch ($args->level) {
    case 'testcase':
        $out = processTestCase($db, $args, $keywordsFilter, $tplan_mgr);
        break;
    case 'testsuite':
        $out = processTestSuite($db, $args, $keywordsFilter, $tplan_mgr, $tcase_mgr);
        break;
    case 'testplan':
        $itemSet = processTestPlan($db, $args, $keywordsFilter, $tplan_mgr);
        $gui->testcases = $itemSet['items'];
        $gui->user_feedback = $itemSet['msg'];
        $gui->instructions = lang_get('update2latest');
        $gui->buttonAction = "doBulkUpdateToLatest";
        $gui->operationType = 'bulk';
        if (!is_null($gui->testcases)) {
            $gui->hasItems = 1;
            $gui->show_details = 1;
        }