Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
2
extension/lite/project/ext/config/lite.php
Normal file
2
extension/lite/project/ext/config/lite.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
$config->project->datatable->fieldList['actions']['width'] = '120';
|
||||
@@ -22,7 +22,9 @@
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<?php
|
||||
printf($lang->admin->info->version, $config->version);
|
||||
$versionName = $config->version;
|
||||
if($config->vision == 'lite') $versionName = $lang->liteName . $config->liteVersion;
|
||||
printf($lang->admin->info->version, $versionName);
|
||||
if($bind) echo sprintf($lang->admin->info->account, '<span class="red">' . $account . '</span>');
|
||||
echo $lang->admin->info->links;
|
||||
?>
|
||||
|
||||
@@ -86,9 +86,9 @@ class my extends control
|
||||
*/
|
||||
public function work($mode = 'task', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showWorkCount($recTotal, $recPerPage, $pageID);
|
||||
|
||||
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
|
||||
$this->showWorkCount($recTotal, $recPerPage, $pageID);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1721,20 +1721,29 @@ class projectModel extends model
|
||||
$onlyBody = ($this->app->tab == 'program' or $project->model == 'kanban') ? true : '';
|
||||
$dataApp = $this->config->systemMode == 'classic' ? "data-app=execution" : "data-app=project";
|
||||
$attr = $project->model == 'kanban' ? " disabled='disabled'" : '';
|
||||
common::printIcon($moduleName, 'edit', "projectID=$project->id", $project, 'list', 'edit', '', $iframe, $onlyBody, $dataApp);
|
||||
common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp . $attr, $this->lang->execution->team);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', $dataApp . $attr);
|
||||
|
||||
if(common::hasPriv($moduleName, 'manageProducts') || common::hasPriv($moduleName, 'whitelist') || common::hasPriv($moduleName, 'delete'))
|
||||
common::printIcon($moduleName, 'edit', "projectID=$project->id", $project, 'list', 'edit', '', $iframe, $onlyBody, $dataApp);
|
||||
|
||||
if($this->config->vision != 'lite')
|
||||
{
|
||||
common::printIcon($moduleName, 'manageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', $dataApp . $attr, $this->lang->execution->team);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'group', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', $dataApp . $attr);
|
||||
|
||||
if(common::hasPriv($moduleName, 'manageProducts') || common::hasPriv($moduleName, 'whitelist') || common::hasPriv($moduleName, 'delete'))
|
||||
{
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
|
||||
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
common::printIcon($moduleName, 'manageProducts', "projectID=$project->id", $project, 'list', 'link', '', 'btn-action', '', $dataApp . $attr, $this->lang->project->manageProducts);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', $dataApp . $attr);
|
||||
if(common::hasPriv($moduleName, 'delete')) echo html::a(helper::createLink($moduleName, "delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
|
||||
echo "</ul>";
|
||||
echo "</div>";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
|
||||
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
common::printIcon($moduleName, 'manageProducts', "projectID=$project->id", $project, 'list', 'link', '', 'btn-action', '', $dataApp . $attr, $this->lang->project->manageProducts);
|
||||
if($this->config->systemMode == 'new') common::printIcon('project', 'whitelist', "projectID=$project->id&module=project&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', $dataApp . $attr);
|
||||
if(common::hasPriv($moduleName, 'delete')) echo html::a(helper::createLink($moduleName, "delete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->project->delete}'");
|
||||
echo "</ul>";
|
||||
echo "</div>";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -180,9 +180,6 @@
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and (empty($productID) or common::canModify('product', $product))):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
<?php else:?>
|
||||
<div class='btn-group dropdown-hover'>
|
||||
<?php
|
||||
@@ -201,6 +198,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if($this->app->rawMethod == 'browseunits' and (empty($productID) or common::canModify('product', $product))):?>
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -1346,7 +1346,7 @@ class bugTest
|
||||
* @param int $buildID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function getProductLeftBugsTest($buildID, $productID)
|
||||
{
|
||||
@@ -1372,7 +1372,7 @@ class bugTest
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function getProductBugPairsTest($productID)
|
||||
{
|
||||
@@ -1398,7 +1398,7 @@ class bugTest
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function getProductMemberPairsTest($productID)
|
||||
{
|
||||
@@ -1425,7 +1425,7 @@ class bugTest
|
||||
* @param int $buildID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return array
|
||||
* @return string
|
||||
*/
|
||||
public function getReleaseBugsTest($buildID, $productID)
|
||||
{
|
||||
@@ -1445,4 +1445,400 @@ class bugTest
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get bugs of a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getStoryBugsTest($storyID)
|
||||
{
|
||||
$array = $this->objectModel->getStoryBugs($storyID);
|
||||
|
||||
$title = '';
|
||||
foreach($array as $bug) $title .= ',' . $bug->title;
|
||||
$title = trim($title, ',');
|
||||
$title = str_replace("'", '', $title);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get case bugs.
|
||||
*
|
||||
* @param int $runID
|
||||
* @param int $caseID
|
||||
* @param int $version
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCaseBugsTest($runID, $caseID = 0, $version = 0)
|
||||
{
|
||||
$array = $this->objectModel->getCaseBugs($runID, $caseID, $version);
|
||||
|
||||
$title = '';
|
||||
foreach($array as $bug) $title .= ',' . $bug->title;
|
||||
$title = trim($title, ',');
|
||||
$title = str_replace("'", '', $title);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get counts of some stories' bugs.
|
||||
*
|
||||
* @param array $storyIDList
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getStoryBugCountsTest($storyIDList, $storyID)
|
||||
{
|
||||
$array = $this->objectModel->getStoryBugCounts($storyIDList);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return isset($array[$storyID]) ? $array[$storyID] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per execution.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerExecutionTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerExecution();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per build.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerBuildTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerBuild();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per module.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerModuleTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerModule();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of opened bugs per day.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfOpenedBugsPerDayTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfOpenedBugsPerDay();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of resolved bugs per day.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfResolvedBugsPerDayTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfResolvedBugsPerDay();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of closed bugs per day.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfClosedBugsPerDayTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfClosedBugsPerDay();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of openeded bugs per user.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfOpenedBugsPerUserTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfOpenedBugsPerUser();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of resolved bugs per user.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfResolvedBugsPerUserTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfResolvedBugsPerUser();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of closed bugs per user.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfClosedBugsPerUserTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfClosedBugsPerUser();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per severity.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerSeverityTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerSeverity();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per resolution.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerResolutionTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerResolution();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per status.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerStatusTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerStatus();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per pri.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerPriTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerPri();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per status.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerActivatedCountTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerActivatedCount();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per type.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerTypeTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerType();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per assignedTo.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getDataOfBugsPerAssignedToTest()
|
||||
{
|
||||
$array = $this->objectModel->getDataOfBugsPerAssignedTo();
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $array;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
test/model/bug/getbuginfofromresult.php
Executable file
33
test/model/bug/getbuginfofromresult.php
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getExecutionBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取执行ID为101的bug >> BUG3,BUG2,BUG1
|
||||
测试获取执行ID为102的bug >> BUG6,BUG5,BUG4
|
||||
测试获取执行ID为103的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7
|
||||
测试获取执行ID为104的bug >> BUG12,BUG11,BUG10
|
||||
测试获取执行ID为105的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13
|
||||
测试获取执行ID为106的bug >> BUG18,BUG17,bug16
|
||||
测试获取不存在的执行的bug >> 0
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$executionIDList = array('101', '102', '103', '104', '105', '106', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getExecutionBugsTest($executionIDList[0])) && p() && e('BUG3,BUG2,BUG1'); // 测试获取执行ID为101的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[1])) && p() && e('BUG6,BUG5,BUG4'); // 测试获取执行ID为102的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[2])) && p() && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 测试获取执行ID为103的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[3])) && p() && e('BUG12,BUG11,BUG10'); // 测试获取执行ID为104的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[4])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13'); // 测试获取执行ID为105的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[5])) && p() && e('BUG18,BUG17,bug16'); // 测试获取执行ID为106的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[6])) && p() && e('0'); // 测试获取不存在的执行的bug
|
||||
18
test/model/bug/getdataofbugsperactivatedcount.php
Executable file
18
test/model/bug/getdataofbugsperactivatedcount.php
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerActivatedCount();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取bug激活次数数据 >> 激活次数:0,300
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,300'); // 获取bug激活次数数据
|
||||
24
test/model/bug/getdataofbugsperassignedto.php
Executable file
24
test/model/bug/getdataofbugsperassignedto.php
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerAssignedTo();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取用户admin数据 >> admin,80
|
||||
获取用户dev1数据 >> 开发1,80
|
||||
获取用户test1数据 >> 测试1,80
|
||||
获取用户closed数据 >> Closed,20
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('admin:name,value') && e('admin,80'); // 获取用户admin数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('dev1,80'); // 获取用户dev1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('test1,80'); // 获取用户test1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('closed,20'); // 获取用户closed数据
|
||||
22
test/model/bug/getdataofbugsperbuild.php
Executable file
22
test/model/bug/getdataofbugsperbuild.php
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerBuild();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取主干bug数 >> 主干,291
|
||||
获取bug数 >> ,3
|
||||
获取迭代版本版本1bug数 >> 迭代版本版本1,6
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('trunk:name,value') && e('主干,291'); // 获取主干bug数
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('0:name,value') && e(',3'); // 获取bug数
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取迭代版本版本1bug数
|
||||
34
test/model/bug/getdataofbugsperexecution.php
Executable file
34
test/model/bug/getdataofbugsperexecution.php
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取执行101数据 >> 迭代1,3,迭代1
|
||||
获取执行102数据 >> 迭代2,3,迭代2
|
||||
获取执行103数据 >> 迭代3,3,迭代3
|
||||
获取执行131数据 >> 阶段31,3,阶段31
|
||||
获取执行132数据 >> 阶段32,3,阶段32
|
||||
获取执行133数据 >> 阶段33,3,阶段33
|
||||
获取执行161数据 >> 看板61,3,看板61
|
||||
获取执行162数据 >> 看板62,3,看板62
|
||||
获取执行163数据 >> 看板63,3,看板63
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,3,迭代1'); // 获取执行101数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,3,迭代2'); // 获取执行102数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('103:name,value,title') && e('迭代3,3,迭代3'); // 获取执行103数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('131:name,value,title') && e('阶段31,3,阶段31'); // 获取执行131数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('132:name,value,title') && e('阶段32,3,阶段32'); // 获取执行132数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('133:name,value,title') && e('阶段33,3,阶段33'); // 获取执行133数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('161:name,value,title') && e('看板61,3,看板61'); // 获取执行161数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('162:name,value,title') && e('看板62,3,看板62'); // 获取执行162数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('163:name,value,title') && e('看板63,3,看板63'); // 获取执行163数据
|
||||
37
test/model/bug/getdataofbugspermodule.php
Executable file
37
test/model/bug/getdataofbugspermodule.php
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerModule();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取module0数据 >> /,291
|
||||
获取module1821数据 >> /产品模块1,1
|
||||
获取module1822数据 >> /产品模块2,1
|
||||
获取module1823数据 >> /产品模块3,1
|
||||
获取module1825数据 >> /产品模块5,1
|
||||
获取module1826数据 >> /产品模块6,1
|
||||
获取module1827数据 >> /产品模块7,1
|
||||
获取module1831数据 >> /产品模块11,1
|
||||
获取module1832数据 >> /产品模块12,1
|
||||
获取module1833数据 >> /产品模块13,1
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,291'); // 获取module0数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1821,1'); // 获取module1821数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1822:name,value') && e('/产品模块1822,1'); // 获取module1822数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1823:name,value') && e('/产品模块1823,1'); // 获取module1823数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1825:name,value') && e('/产品模块1825,1'); // 获取module1825数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模块1826,1'); // 获取module1826数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块1827,1'); // 获取module1827数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块1831,1'); // 获取module1831数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块1832,1'); // 获取module1832数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块1833,1'); // 获取module1833数据
|
||||
24
test/model/bug/getdataofbugsperpri.php
Executable file
24
test/model/bug/getdataofbugsperpri.php
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerPri();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取pri为1的数据 >> 优先级:1,75
|
||||
获取pri为2的数据 >> 优先级:2,75
|
||||
获取pri为3的数据 >> 优先级:3,75
|
||||
获取pri为4的数据 >> 优先级:4,75
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,75'); // 获取pri为1的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,75'); // 获取pri为2的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,75'); // 获取pri为3的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,75'); // 获取pri为4的数据
|
||||
31
test/model/bug/getdataofbugsperresolution.php
Executable file
31
test/model/bug/getdataofbugsperresolution.php
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerResolution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取状态为fixed的数据 >> 已解决,45
|
||||
获取状态为duplicate的数据 >> 重复Bug,30
|
||||
获取状态为external的数据 >> 设计如此,18
|
||||
获取状态为external的数据 >> 外部原因,18
|
||||
获取状态为willnotfix的数 >> 不予解决,18
|
||||
获取状态为postponed的数据 >> 延期处理,12
|
||||
获取状态为notrepro的数据 >> 无法重现,9
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('fixed:name,value') && e('已解决,45'); // 获取状态为fixed的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('duplicate:name,value') && e('重复Bug,30'); // 获取状态为duplicate的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('bydesign:name,value') && e('设计如此,18'); // 获取状态为external的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('external:name,value') && e('外部原因,18'); // 获取状态为external的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('willnotfix:name,value') && e('不予解决,18'); // 获取状态为willnotfix的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('postponed:name,value') && e('延期处理,12'); // 获取状态为postponed的数据
|
||||
r($bug->getDataOfBugsPerResolutionTest()) && p('notrepro:name,value') && e('无法重现,9'); // 获取状态为notrepro的数据
|
||||
24
test/model/bug/getdataofbugsperseverity.php
Executable file
24
test/model/bug/getdataofbugsperseverity.php
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerSeverity();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取严重程度1数据 >> 1,75
|
||||
获取严重程度2数据 >> 2,75
|
||||
获取严重程度3数据 >> 3,75
|
||||
获取严重程度4数据 >> 4,75
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,75'); // 获取严重程度1数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,75'); // 获取严重程度2数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,75'); // 获取严重程度3数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,75'); // 获取严重程度4数据
|
||||
22
test/model/bug/getdataofbugsperstatus.php
Executable file
22
test/model/bug/getdataofbugsperstatus.php
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerStatus();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取状态为active的数据 >> 激活,150
|
||||
获取状态为resolved的数据 >> 已解决,90
|
||||
获取状态为closed的数据 >> 已关闭,60
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,150'); // 获取状态为active的数据
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('resolved:name,value') && e('已解决,90'); // 获取状态为resolved的数据
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('closed:name,value') && e('已关闭,60'); // 获取状态为closed的数据
|
||||
34
test/model/bug/getdataofbugspertype.php
Executable file
34
test/model/bug/getdataofbugspertype.php
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfBugsPerType();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取类型为codeerror的数据 >> 代码错误,34
|
||||
获取类型为config的数据 >> 配置相关,34
|
||||
获取类型为install的数据 >> 安装部署,34
|
||||
获取类型为security的数据 >> 安全相关,33
|
||||
获取类型为performance的数据 >> 性能问题,33
|
||||
获取类型为standard的数据 >> 标准规范,33
|
||||
获取类型为automation的数据 >> 测试脚本,33
|
||||
获取类型为designdefect的数据 >> 设计缺陷,33
|
||||
获取类型为others的数据 >> 其他,33
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,34'); // 获取类型为codeerror的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('config:name,value') && e('配置相关,34'); // 获取类型为config的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('install:name,value') && e('安装部署,34'); // 获取类型为install的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('security:name,value') && e('安全相关,33'); // 获取类型为security的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('performance:name,value') && e('性能问题,33'); // 获取类型为performance的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('standard:name,value') && e('标准规范,33'); // 获取类型为standard的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('automation:name,value') && e('测试脚本,33'); // 获取类型为automation的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('designdefect:name,value') && e('设计缺陷,33'); // 获取类型为designdefect的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('others:name,value') && e('其他,33'); // 获取类型为others的数据
|
||||
18
test/model/bug/getdataofclosedbugsperday.php
Executable file
18
test/model/bug/getdataofclosedbugsperday.php
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfClosedBugsPerDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取关闭bug的数据 >> 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfClosedBugsPerDayTest()) && p() && e('0'); // 获取关闭bug的数据
|
||||
18
test/model/bug/getdataofclosedbugsperuser.php
Executable file
18
test/model/bug/getdataofclosedbugsperuser.php
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfClosedBugsPerUser();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取admin关闭的数据 >> admin,100
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfClosedBugsPerUserTest()) && p('admin:name,value') && e('admin,100'); // 获取admin关闭的数据
|
||||
18
test/model/bug/getdataofopenedbugsperday.php
Executable file
18
test/model/bug/getdataofopenedbugsperday.php
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfOpenedBugsPerDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取创建的数据 >> 300
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('300'); // 获取创建的数据
|
||||
18
test/model/bug/getdataofopenedbugsperuser.php
Executable file
18
test/model/bug/getdataofopenedbugsperuser.php
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfOpenedBugsPerUser();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取admin创建的数据 >> admin,300
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,300'); // 获取admin创建的数据
|
||||
37
test/model/bug/getdataofresolvedbugsperday.php
Executable file
37
test/model/bug/getdataofresolvedbugsperday.php
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfResolvedBugsPerDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取解决的bug0 >> 14
|
||||
获取解决的bug1 >> 14
|
||||
获取解决的bug2 >> 14
|
||||
获取解决的bug3 >> 14
|
||||
获取解决的bug4 >> 14
|
||||
获取解决的bug5 >> 14
|
||||
获取解决的bug6 >> 14
|
||||
获取解决的bug7 >> 14
|
||||
获取解决的bug8 >> 14
|
||||
获取解决的bug9 >> 14
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('0:value') && e('14'); // 获取解决的bug0
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('1:value') && e('14'); // 获取解决的bug1
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('2:value') && e('14'); // 获取解决的bug2
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('3:value') && e('14'); // 获取解决的bug3
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('4:value') && e('14'); // 获取解决的bug4
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('5:value') && e('14'); // 获取解决的bug5
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('6:value') && e('14'); // 获取解决的bug6
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('7:value') && e('14'); // 获取解决的bug7
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('8:value') && e('14'); // 获取解决的bug8
|
||||
r($bug->getDataOfResolvedBugsPerDayTest()) && p('9:value') && e('14'); // 获取解决的bug9
|
||||
20
test/model/bug/getdataofresolvedbugsperuser.php
Executable file
20
test/model/bug/getdataofresolvedbugsperuser.php
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getDataOfResolvedBugsPerUser();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取admin解决的bug数 >> admin,60
|
||||
获取$assignTo解决的bug数 >> $assignedTo,90
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfResolvedBugsPerUserTest()) && p('admin:name,value') && e('admin,60'); // 获取admin解决的bug数
|
||||
r($bug->getDataOfResolvedBugsPerUserTest()) && p('$assignedTo:name,value') && e('$assignedTo,90'); // 获取$assignTo解决的bug数
|
||||
32
test/model/bug/getstorybugcounts.php
Executable file
32
test/model/bug/getstorybugcounts.php
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getStoryBugCounts();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取关联storyID为2的bug数量 >> 3
|
||||
测试获取关联storyID为6的bug数量 >> 3
|
||||
测试获取关联storyID为10的bug数量 >> 3
|
||||
测试获取关联storyID为14的bug数量 >> 3
|
||||
测试获取关联storyID为18的bug数量 >> 3
|
||||
测试获取关联storyID为22的bug数量 >> 3
|
||||
测试获取关联storyID不存在的bug数量 >> 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$storyIDList = array('2', '6', '10', '14', '18', '22', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[0])) && p() && e('3'); // 测试获取关联storyID为2的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[1])) && p() && e('3'); // 测试获取关联storyID为6的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('3'); // 测试获取关联storyID为10的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('3'); // 测试获取关联storyID为14的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('3'); // 测试获取关联storyID为18的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('3'); // 测试获取关联storyID为22的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[6])) && p() && e('0'); // 测试获取关联storyID不存在的bug数量
|
||||
32
test/model/bug/getstorybugs.php
Executable file
32
test/model/bug/getstorybugs.php
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getStoryBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取关联需求ID为2的bug >> BUG1,BUG101,BUG201
|
||||
测试获取关联需求ID为6的bug >> BUG2,BUG102,BUG202
|
||||
测试获取关联需求ID为10的bug >> BUG3,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();103,BUG203
|
||||
测试获取关联需求ID为14的bug >> BUG4,bug104,BUG204
|
||||
测试获取关联需求ID为18的bug >> BUG5,BUG105,BUG205
|
||||
测试获取关联需求ID为22的bug >> BUG6,BUG106,BUG206
|
||||
测试获取不存在的关联需求的bug >> 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$storyIDList = array('2', '6', '10', '14', '18', '22', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getStoryBugsTest($storyIDList[0])) && p() && e('BUG1,BUG101,BUG201'); // 测试获取关联需求ID为2的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[1])) && p() && e('BUG2,BUG102,BUG202'); // 测试获取关联需求ID为6的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[2])) && p() && e('BUG3,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();103,BUG203'); // 测试获取关联需求ID为10的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[3])) && p() && e('BUG4,bug104,BUG204'); // 测试获取关联需求ID为14的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[4])) && p() && e('BUG5,BUG105,BUG205'); // 测试获取关联需求ID为18的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[5])) && p() && e('BUG6,BUG106,BUG206'); // 测试获取关联需求ID为22的bug
|
||||
r($bug->getStoryBugsTest($storyIDList[6])) && p() && e('0'); // 测试获取不存在的关联需求的bug
|
||||
Reference in New Issue
Block a user