Example #1
0
 switch ($doc_info->type) {
     case DOC_REQ_SPEC:
         $docText .= renderReqSpecTreeForPrinting($db, $tree2work, $printingOptions, null, 0, 1, $args->user_id, 0, $args->tproject_id);
         break;
     case DOC_TEST_SPEC:
         $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->tproject_scope);
         $env = new stdClass();
         $env->base_href = $_SESSION['basehref'];
         $env->item_type = $doc_info->content_range;
         $env->tocPrefix = null;
         $env->tocCounter = 0;
         $env->user_id = $args->user_id;
         $env->reportType = $doc_info->type;
         $actionContext['level'] = 0;
         $indentLevelStart = 1;
         $docText .= renderTestSpecTreeForPrinting($db, $tree2work, $printingOptions, $env, $actionContext, $env->tocPrefix, $indentLevelStart);
         /*
         $docText .= renderTestSpecTreeForPrinting($db, $_SESSION['basehref'], $tree2work, $doc_info->content_range,
                                                   $printingOptions, null, 0, 1, $args->user_id,0,null,
                                                   $args->tproject_id,$platform_id);
         */
         break;
     case DOC_TEST_PLAN_DESIGN:
     case DOC_TEST_PLAN_EXECUTION:
     case DOC_TEST_PLAN_EXECUTION_ON_BUILD:
         $tocPrefix++;
         $env = new stdClass();
         $env->base_href = $_SESSION['basehref'];
         $env->item_type = $doc_info->content_range;
         $env->tocPrefix = $tocPrefix;
         $env->user_id = $args->user_id;
Example #2
0
function renderTestPlanForPrinting(&$db, &$node, $item_type, &$options, $tocPrefix, $tcCnt, $level, $user_id, $tplan_id, $tprojectID, $platform_id)
{
    $tProjectMgr = new testproject($db);
    $tcPrefix = $tProjectMgr->getTestCasePrefix($tprojectID);
    $code = renderTestSpecTreeForPrinting($db, $node, $item_type, $options, $tocPrefix, $tcCnt, $level, $user_id, $tplan_id, $tcPrefix, $tprojectID, $platform_id);
    return $code;
}
function renderTestPlanForPrinting(&$db, &$node, &$options, $env, $context)
{
    $tProjectMgr = new testproject($db);
    $context['prefix'] = $tProjectMgr->getTestCasePrefix($context['tproject_id']);
    $code = renderTestSpecTreeForPrinting($db, $node, $options, $env, $context, $env->tocPrefix, $context['level']);
    return $code;
}
Example #4
0
if ($treeForPlatform) {
    foreach ($treeForPlatform as $platform_id => $tree) {
        if ($tree) {
            $tree['name'] = $args->tproject_name;
            $tree['id'] = $args->tproject_id;
            $tree['node_type_id'] = $hash_descr_id['testproject'];
            switch ($doc_info->type) {
                case DOC_REQ_SPEC:
                    $docText .= renderSimpleChapter(lang_get('testproject') . " " . lang_get('scope'), $doc_info->tproject_scope);
                    $docText .= renderSimpleChapter(lang_get('requirement_specification_report'), " ");
                    $docText .= renderReqSpecTreeForPrinting($db, $tree, $printingOptions, null, 0, 1, $args->user_id, 0, $args->tproject_id);
                    break;
                case DOC_TEST_SPEC:
                    $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->tproject_scope);
                    // 3459 - added platform ID
                    $docText .= renderTestSpecTreeForPrinting($db, $tree, $doc_info->content_range, $printingOptions, null, 0, 1, $args->user_id, 0, null, $args->tproject_id, $platform_id);
                    break;
                case DOC_TEST_PLAN:
                    if ($printingOptions['testplan']) {
                        $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->testplan_scope);
                    }
                case DOC_TEST_REPORT:
                    $tocPrefix++;
                    if ($showPlatforms) {
                        $docText .= renderPlatformHeading($tocPrefix, $platform_id, $platforms[$platform_id], $printingOptions);
                    }
                    // 3459 - added platform ID
                    $docText .= renderTestPlanForPrinting($db, $tree, $doc_info->content_range, $printingOptions, $tocPrefix, 0, 1, $args->user_id, $args->tplan_id, $args->tproject_id, $platform_id);
                    if ($doc_info->type == DOC_TEST_REPORT && $printingOptions['metrics']) {
                        $docText .= buildTestPlanMetrics($doc_data->statistics);
                    }
Example #5
0
 $tree2work['node_type_id'] = $decode['node_descr_id']['testproject'];
 switch ($doc_info->type) {
     case DOC_REQ_SPEC:
         $docText .= renderReqSpecTreeForPrinting($db, $tree2work, $printingOptions, null, 0, 1, $args->user_id, 0, $args->tproject_id);
         break;
     case DOC_TEST_SPEC:
         $docText .= renderSimpleChapter(lang_get('scope'), $doc_info->tproject_scope);
         $env = new stdClass();
         $env->base_href = $_SESSION['basehref'];
         $env->item_type = $doc_info->content_range;
         $env->tocPrefix = 0;
         $env->testCounter = 1;
         $env->user_id = $args->user_id;
         $env->reportType = $doc_info->type;
         $actionContext['level'] = 0;
         $docText .= renderTestSpecTreeForPrinting($db, $tree2work, $printingOptions, $env, $actionContext);
         /*
         $docText .= renderTestSpecTreeForPrinting($db, $_SESSION['basehref'], $tree2work, $doc_info->content_range,
                                                   $printingOptions, null, 0, 1, $args->user_id,0,null,
                                                   $args->tproject_id,$platform_id);
         */
         break;
     case DOC_TEST_PLAN_DESIGN:
     case DOC_TEST_PLAN_EXECUTION:
     case DOC_TEST_PLAN_EXECUTION_ON_BUILD:
         $tocPrefix++;
         $env = new stdClass();
         $env->base_href = $_SESSION['basehref'];
         $env->item_type = $doc_info->content_range;
         $env->tocPrefix = $tocPrefix;
         $env->user_id = $args->user_id;