当前位置: 首页>>代码示例>>PHP>>正文


PHP testplan::get_all_suites方法代码示例

本文整理汇总了PHP中testplan::get_all_suites方法的典型用法代码示例。如果您正苦于以下问题:PHP testplan::get_all_suites方法的具体用法?PHP testplan::get_all_suites怎么用?PHP testplan::get_all_suites使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在testplan的用法示例。


在下文中一共展示了testplan::get_all_suites方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init_args

$args = init_args();
$platform_mgr = new tlPlatform($db, $args->testproject_id);
$gui = new stdClass();
$gui->tplan_id = $_GET['id'];
$_SESSION["testplanID"] = $gui->tplan_id;
$gui->tplanDevices = $platform_mgr->getTplanDevices($gui->tplan_id);
$gui->totalDevices = count($gui->tplanDevices) - 1;
$gui->tplanCases = $platform_mgr->getTplanTestCases($gui->tplan_id);
$gui->tplanName = $_GET['name'];
$gui->username = $args->login_username;
$gui->divindex = 0;
if (isset($_GET['divindex'])) {
    $gui->divindex = $_GET['divindex'];
}
$tplan_mgr = new testplan($db);
$gui->suites = $tplan_mgr->get_all_suites();
$smarty = new TLSmarty();
$smarty->assign('gui', $gui);
$smarty->display($templateCfg->template_dir . $templateCfg->default_template);
function init_args()
{
    $args = new stdClass();
    $args->testproject_id = isset($_SESSION['testprojectID']) ? $_SESSION['testprojectID'] : 0;
    $args->currentUser = $_SESSION['currentUser'];
    $args->login_username = $_SESSION['currentUser']->getDisplayName();
    return $args;
}
function checkRights(&$db, &$user)
{
    return True;
}
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:tplanCaseView.php

示例2: testplan

<?php 
require '../../config.inc.php';
require_once 'common.php';
require '../../third_party/PHPExcel/PHPExcel.php';
$args = init_args($db);
$tplan_mgr = new testplan($db);
$allsuite = $tplan_mgr->get_all_suites();
$platformSet = $tplan_mgr->getPlatforms($args->tplan_id, array('outputFormat' => 'map'));
$testplan = $tplan_mgr->get_by_id($args->tplan_id);
if ($args->build_id == 1) {
    $testbuild = array('name' => '任意版本', 'notes' => '');
} else {
    $testbuild = $tplan_mgr->get_build_by_id($args->tplan_id, $args->build_id);
}
if ($args->device_id == '1') {
    $alldevice = $platformSet;
    foreach ($alldevice as $device_id => $device_name) {
        $results[$device_id] = $tplan_mgr->get_exec_device_group_by_suite($args->tplan_id, $args->build_id, $device_id, $args->stack);
    }
} else {
    $alldevice = array($args->device_id => $platformSet[$args->device_id]);
    $results[$args->device_id] = $tplan_mgr->get_exec_device_group_by_suite($args->tplan_id, $args->build_id, $args->device_id, $args->stack);
}
ob_clean();
$objPHPExcel = new PHPExcel();
$objPHPExcel->getProperties()->setCreator('DCN TestLink')->setLastModifiedBy('DCN TestLink')->setTitle('DCN Test Report');
$objPHPExcel->getDefaultStyle()->getAlignment()->setVertical(PHPExcel_Style_Alignment::VERTICAL_CENTER);
$objPHPExcel->getDefaultStyle()->getAlignment()->setWrapText(TRUE);
$allindex = 0;
$deviceindex = 0;
foreach ($alldevice as $deviceid => $devicename) {
开发者ID:mokal,项目名称:DCN_TestLink,代码行数:31,代码来源:dcnReportDownloadExcel.php


注:本文中的testplan::get_all_suites方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。