예제 #1
0
$req_mgr = new requirement_mgr($db);
$gui = initializeGui($db, $args, $cfg, $tplan_mgr, $tcase_mgr);
$_SESSION['history_on'] = $gui->history_on;
$attachmentInfos = null;
$do_show_instructions = $args->level == "" || $args->level == 'testproject' ? 1 : 0;
if ($do_show_instructions) {
    show_instructions('executeTest');
    exit;
}
// ---------------------------------------------------------
// Testplan executions and result archiving. Checks whether execute cases button was clicked
//
if ($args->doExec == 1) {
    /** @note get testcase ids in an array */
    if (!is_null($args->tc_versions) && count($args->tc_versions)) {
        $status_and_notes = do_remote_execution($db, $args->tc_versions);
        // Need to be added to $_REQUEST, because we are using $_REQUEST as input
        // for the function responsible of writing exec results. write_execution()
        $status_map = $status_and_notes['status'];
        $notes_map = $status_and_notes['notes'];
        if (count($status_map)) {
            foreach ($status_map as $key => $value) {
                $_REQUEST['status'][$key] = $value;
                $_REQUEST['notes'][$key] = $notes_map[$key];
            }
        }
    }
}
// -----------------------------------------------------------
// When nullify filter_status - 20080504 - DO NOT REMOVE -
//
예제 #2
0
function launchRemoteExec(&$dbHandler, &$argsObj, $tcasePrefix, &$mgrPool, &$tcaseMgr)
{
    // IMPORTANT NOTICE
    // Remote execution will NOT use ANY of data typed by user,
    // - notes
    // - custom fields
    //
    // IMPORTANT NOTICE
    // need to understand what to do with feedback provided
    // by do_remote_execution().
    // Right now no matter how things go, no feedback is given to user.
    // May be this need to be improved in future.
    //
    // Only drawback i see is when remote exec is done on a test suite
    // and amount of feedback can be high, then do not see what can be effect
    // on GUI
    $execContext = buildExecContext($argsObj, $tcasePrefix, $tplanMgr, $tcaseMgr);
    $feedback = do_remote_execution($dbHandler, $execContext);
    $feedback = current($feedback);
    return $feedback;
}