Merge branch 'autotest_ly'
This commit is contained in:
+156
-14
@@ -224,63 +224,205 @@ class buildTest
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function updateLinkedBugTest($build)
|
||||
/**
|
||||
* Function updateLinkedBug test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function updateLinkedBugTest($buildID, $param = array())
|
||||
{
|
||||
$objects = $this->objectModel->updateLinkedBug($build);
|
||||
global $tester;
|
||||
|
||||
$build = $this->objectModel->getByID($buildID);
|
||||
$bugs = array();
|
||||
|
||||
$createFields = array('bugs' => $bugs);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$build->bugs .= ',' . join(',', $_POST['bugs']);
|
||||
|
||||
$this->objectModel->updateLinkedBug($build);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUG)->where('id')->in(join(',', $_POST['bugs']))->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function linkStoryTest($buildID)
|
||||
/**
|
||||
* Function linkStory test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function linkStoryTest($buildID, $param = array())
|
||||
{
|
||||
$objects = $this->objectModel->linkStory($buildID);
|
||||
global $tester;
|
||||
|
||||
$stories = array();
|
||||
|
||||
$createFields = array('stories' => $stories);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$this->objectModel->linkStory($buildID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function unlinkStoryTest($buildID, $storyID)
|
||||
/**
|
||||
* Function unlinkStory test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $stories
|
||||
* @param innt $storyID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function unlinkStoryTest($buildID, $stories = array(), $storyID)
|
||||
{
|
||||
$objects = $this->objectModel->unlinkStory($buildID, $storyID);
|
||||
global $tester;
|
||||
|
||||
$createFields = array('stories' => $stories);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
|
||||
$this->objectModel->linkStory($buildID);
|
||||
$this->objectModel->unlinkStory($buildID, $storyID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function batchUnlinkStoryTest($buildID)
|
||||
/**
|
||||
* Functtion batchUnlinkStory test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $stories
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function batchUnlinkStoryTest($buildID, $stories = array())
|
||||
{
|
||||
$objects = $this->objectModel->batchUnlinkStory($buildID);
|
||||
global $tester;
|
||||
|
||||
$createFields = array('stories' => $stories);
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
$this->objectModel->linkStory($buildID);
|
||||
|
||||
unset($_POST);
|
||||
|
||||
$newFields = array('unlinkStories' => $stories);
|
||||
foreach($newFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
$this->objectModel->batchUnlinkStory($buildID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function linkBugTest($buildID)
|
||||
/**
|
||||
* Function linkBug test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function linkBugTest($buildID, $param = array())
|
||||
{
|
||||
$objects = $this->objectModel->linkBug($buildID);
|
||||
global $tester;
|
||||
|
||||
$bugs = array();
|
||||
|
||||
$createFields = array('bugs' => $bugs);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$this->objectModel->linkBug($buildID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function unlinkBugTest($buildID, $bugID)
|
||||
/**
|
||||
* Function unlinkBug test by build
|
||||
*
|
||||
* @param int $buildID
|
||||
* @param array $bugs
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function unlinkBugTest($buildID, $bugs, $bugID)
|
||||
{
|
||||
$objects = $this->objectModel->unlinkBug($buildID, $bugID);
|
||||
global $tester;
|
||||
|
||||
$createFields = array('bugs' => $bugs);
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
|
||||
$this->objectModel->linkBug($buildID);
|
||||
$this->objectModel->unlinkBug($buildID, $bugID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $objects;
|
||||
}
|
||||
|
||||
public function batchUnlinkBugTest($buildID)
|
||||
public function batchUnlinkBugTest($buildID, $bugs)
|
||||
{
|
||||
$objects = $this->objectModel->batchUnlinkBug($buildID);
|
||||
global $tester;
|
||||
|
||||
$createFields = array('bugs' => $bugs);
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
$this->objectModel->linkBug($buildID);
|
||||
|
||||
unset($_POST);
|
||||
|
||||
$newFields = array('unlinkBugs' => $bugs);
|
||||
foreach($newFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
$this->objectModel->batchUnlinkBug($buildID);
|
||||
|
||||
$objects = $tester->dao->select('*')->from(TABLE_BUILD)->where('id')->in($buildID)->fetchAll('id');
|
||||
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
|
||||
Regular → Executable
+10
-1
@@ -10,8 +10,17 @@ title=测试 buildModel->batchUnlinkBug();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
批量解除项目版本bug >> ,11
|
||||
批量解除执行版本bug >> ,101
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('1', '11');
|
||||
$bugs = array('301', '311');
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->batchUnlinkBugTest()) && p() && e();
|
||||
r($build->batchUnlinkBugTest($buildIDList[0],$bugs)) && p('1:bugs,project') && e(',11');//批量解除项目版本bug
|
||||
r($build->batchUnlinkBugTest($buildIDList[1],$bugs)) && p('11:bugs,execution') && e(',101');//批量解除执行版本bug
|
||||
|
||||
system("./ztest init");
|
||||
Regular → Executable
+9
-1
@@ -10,8 +10,16 @@ title=测试 buildModel->batchUnlinkStory();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
批量解除项目版本需求 >> ,11
|
||||
批量解除执行版本需求 >> ,101
|
||||
|
||||
*/
|
||||
$buildIDList = array('1', '11');
|
||||
$stories = array('2', '4');
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->batchUnlinkStoryTest()) && p() && e();
|
||||
r($build->batchUnlinkStoryTest($buildIDList[0],$stories)) && p('1:stories,project') && e(',11'); //批量解除项目版本需求
|
||||
r($build->batchUnlinkStoryTest($buildIDList[1],$stories)) && p('11:stories,execution') && e(',101'); //批量解除执行版本需求
|
||||
|
||||
system("./ztest init");
|
||||
Regular → Executable
+10
-1
@@ -10,6 +10,15 @@ title=测试 buildModel->create();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行新增版本 >> 新增版本一
|
||||
瀑布执行新增版本 >> 2
|
||||
看板执行新增版本 >> dev10
|
||||
执行新增路径版本 >> http://www.baidu.com
|
||||
重复名称测试 >> 『名称编号』已经有『新增版本一』这条记录了。如果您确定该记录已删除,请到后台-系统-数据-回收站还原。
|
||||
名称为空测试 >> 『名称编号』不能为空。
|
||||
产品为空测试 >> 『产品』不能为空。
|
||||
构建者为空测试 >> 『构建者』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
@@ -33,4 +42,4 @@ r($build->createTest($executionIDList[0], $noName)) && p('name:0') &
|
||||
r($build->createTest($executionIDList[0], $noProduct)) && p('product:0') && e('『产品』不能为空。'); //产品为空测试
|
||||
r($build->createTest($executionIDList[0], $noBuilder)) && p('builder:0') && e('『构建者』不能为空。'); //构建者为空测试
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
Regular → Executable
+8
-1
@@ -10,6 +10,13 @@ title=测试 buildModel->getBuildPairs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
数组产品执行版本查询 >> 执行版本版本17
|
||||
单长产品执行版本查询 >> 执行版本版本11
|
||||
项目执行版本查询 >> 主干
|
||||
数组产品执行版本查询统计 >> 6
|
||||
单长产品执行版本查询统计 >> 5
|
||||
项目执行版本查询统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$products = array('0', '1', '7');
|
||||
@@ -28,4 +35,4 @@ r($build->getBuildPairsTest($count[0], $products[1], $branch, $params[1], $objec
|
||||
r($build->getBuildPairsTest($count[0], $products, $branch, $params[2], $objectID[1], $objectType[1], $buildIdList,$replace[0])) && p('trunk') && e('主干'); //项目执行版本查询
|
||||
r($build->getBuildPairsTest($count[1], $products, $branch, $params[0], $objectID[0], $objectType[0], '',$replace[0])) && p() && e('6'); //数组产品执行版本查询统计
|
||||
r($build->getBuildPairsTest($count[1], $products[1], $branch, $params[1], $objectID[0], $objectType[0], $buildIdList,$replace[0])) && p() && e('5'); //单长产品执行版本查询统计
|
||||
r($build->getBuildPairsTest($count[1], $products, $branch, $params[2], $objectID[1], $objectType[1], $buildIdList,$replace[0])) && p() && e('4'); //项目执行版本查询统计
|
||||
r($build->getBuildPairsTest($count[1], $products, $branch, $params[2], $objectID[1], $objectType[1], $buildIdList,$replace[0])) && p() && e('4'); //项目执行版本查询统计
|
||||
Regular → Executable
+6
-1
@@ -10,6 +10,11 @@ title=测试 buildModel->getByID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
项目版本查询 >> 项目版本版本7
|
||||
执行版本查询 >> 执行版本版本17
|
||||
无id查询 >> 0
|
||||
图片字段传字符串测试 >> 17
|
||||
|
||||
*/
|
||||
|
||||
$buildID = array('7', '17');
|
||||
@@ -19,4 +24,4 @@ $build = new buildTest();
|
||||
r($build->getByIDTest($buildID[0], true)) && p('name') && e('项目版本版本7'); //项目版本查询
|
||||
r($build->getByIDTest($buildID[1], false)) && p('name') && e('执行版本版本17'); //执行版本查询
|
||||
r($build->getByIDTest('', true)) && p() && e('0'); //无id查询
|
||||
r($build->getByIDTest($buildID[0], 'test')) && p('project') && e('17'); //图片字段传字符串测试
|
||||
r($build->getByIDTest($buildID[0], 'test')) && p('project') && e('17'); //图片字段传字符串测试
|
||||
Regular → Executable
+8
-2
@@ -10,6 +10,12 @@ title=测试 buildModel->getByList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
buildid列表查询 >> 17,项目版本版本7
|
||||
单独id查询 >> 107,执行版本版本17
|
||||
buildid列表查询统计 >> 2
|
||||
单独id查询统计 >> 1
|
||||
不输入id列表查询 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('7', '17');
|
||||
@@ -18,7 +24,7 @@ $count = array('0', '1');
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->getByListTest($buildIDList, $count[0])) && p('7:project,name') && e('17,项目版本版本7'); //buildid列表查询
|
||||
r($build->getByListTest($buildIDList[1], $count[0])) && p('17:execution,name') && e('107,项目版本版本7'); //单独id查询
|
||||
r($build->getByListTest($buildIDList[1], $count[0])) && p('17:execution,name') && e('107,执行版本版本17'); //单独id查询
|
||||
r($build->getByListTest($buildIDList, $count[1])) && p() && e('2'); //buildid列表查询统计
|
||||
r($build->getByListTest($buildIDList[1], $count[1])) && p() && e('1'); //单独id查询统计
|
||||
r($build->getByListTest('', $count[0])) && p() && e('0'); //不输入id列表查询
|
||||
r($build->getByListTest('', $count[0])) && p() && e('0'); //不输入id列表查询
|
||||
Regular → Executable
+11
-1
@@ -10,6 +10,16 @@ title=测试 buildModel->getExecutionBuilds();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
全部执行版本查询 >> 107,执行版本版本17
|
||||
单独执行版本查询 >> 107,执行版本版本17
|
||||
不存在执行版本查询 >> 0
|
||||
根据产品查询版本 >> 107,执行版本版本17
|
||||
根据查询条件查询版本 >> 107,执行版本版本17
|
||||
无查询条件查询版本 >> 107,执行版本版本17
|
||||
全部执行版本查询统计 >> 20
|
||||
单独执行版本查询统计 >> 1
|
||||
无查询条件查询版本统计 >> 20
|
||||
|
||||
*/
|
||||
|
||||
$count = array('0', '1');
|
||||
@@ -27,4 +37,4 @@ r($build->getExecutionBuildsTest($count[0], $executionIDList[1], $type[2], $parm
|
||||
r($build->getExecutionBuildsTest($count[0], $executionIDList[0], $type[3], $parm[2])) && p('17:execution,name') && e('107,执行版本版本17'); //无查询条件查询版本
|
||||
r($build->getExecutionBuildsTest($count[1], $executionIDList[0], $type[0])) && p() && e('20'); //全部执行版本查询统计
|
||||
r($build->getExecutionBuildsTest($count[1], $executionIDList[1], $type[0])) && p() && e('1'); //单独执行版本查询统计
|
||||
r($build->getExecutionBuildsTest($count[1], $executionIDList[0], $type[3], $parm[2])) && p() && e('20'); //无查询条件查询版本统计
|
||||
r($build->getExecutionBuildsTest($count[1], $executionIDList[0], $type[3], $parm[2])) && p() && e('20'); //无查询条件查询版本统计
|
||||
Regular → Executable
+17
-6
@@ -10,6 +10,17 @@ title=测试 buildModel->getExecutionBuildsBySearch();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
执行id为0查询 >> 108,执行版本版本18
|
||||
正常执行查询 >> 107,执行版本版本17
|
||||
执行id为空查询 >> 109,执行版本版本19
|
||||
搜索条件id为空查询 >> 106,执行版本版本16
|
||||
执行id为0查询统计 >> 20
|
||||
正常执行查询统计 >> 1
|
||||
执行id为空查询统计 >> 20
|
||||
搜索条件id为空查询统计 >> 20
|
||||
查询条件查询 >> 107,执行版本版本17
|
||||
查询条件查询统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('0', '107', '');
|
||||
@@ -22,9 +33,9 @@ r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[0], $queryI
|
||||
r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[1], $queryIDList[0])) && p('17:execution,name') && e('107,执行版本版本17');//正常执行查询
|
||||
r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[2], $queryIDList[0])) && p('19:execution,name') && e('109,执行版本版本19');//执行id为空查询
|
||||
r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[0], $queryIDList[2])) && p('16:execution,name') && e('106,执行版本版本16');//搜索条件id为空查询
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[0])) && p() && e('20'); //执行id为0查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[1], $queryIDList[0])) && p() && e('1'); //正常执行查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[2], $queryIDList[0])) && p() && e('20'); //执行id为空查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[2])) && p() && e('20'); //搜索条件id为空查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[0], $queryIDList[1])) && p('17:execution,name') && e('17,执行版本版本17');//查询条件查询
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[1])) && p() && e('1'); //查询条件查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[0])) && p() && e('20'); //执行id为0查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[1], $queryIDList[0])) && p() && e('1'); //正常执行查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[2], $queryIDList[0])) && p() && e('20'); //执行id为空查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[2])) && p() && e('20'); //搜索条件id为空查询统计
|
||||
r($build->getExecutionBuildsBySearchTest($count[0], $executionIDList[0], $queryIDList[1])) && p('17:execution,name') && e('107,执行版本版本17');//查询条件查询
|
||||
r($build->getExecutionBuildsBySearchTest($count[1], $executionIDList[0], $queryIDList[1])) && p() && e('1'); //查询条件查询统计
|
||||
Regular → Executable
+6
-2
@@ -10,7 +10,11 @@ title=测试 buildModel->getLast();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
执行id为空 >> 10
|
||||
执行id不存在 >> 0
|
||||
执行id正常存在 >> 执行版本版本17
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('', '7', '107');
|
||||
|
||||
@@ -18,4 +22,4 @@ $build = new buildTest();
|
||||
|
||||
r($build->getLastTest($executionIDList[0])) && p('id') && e('10'); //执行id为空
|
||||
r($build->getLastTest($executionIDList[1])) && p() && e('0'); //执行id不存在
|
||||
r($build->getLastTest($executionIDList[2])) && p('name') && e('执行版本版本17');//执行id正常存在
|
||||
r($build->getLastTest($executionIDList[2])) && p('name') && e('执行版本版本17');//执行id正常存在
|
||||
Regular → Executable
+11
-1
@@ -10,6 +10,16 @@ title=测试 buildModel->getProjectBuilds();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
全部项目版本查询 >> 11,项目版本版本1
|
||||
单独项目版本查询 >> 17,项目版本版本7
|
||||
不存在项目版本查询 >> 0
|
||||
根据产品查询版本 >> 17,项目版本版本7
|
||||
根据查询条件查询版本 >> 17,项目版本版本7
|
||||
无查询条件查询版本 >> 17,项目版本版本7
|
||||
全部项目版本查询统计 >> 10
|
||||
单独项目版本查询统计 >> 1
|
||||
无查询条件查询版本统计 >> 10
|
||||
|
||||
*/
|
||||
|
||||
$count = array('0', '1');
|
||||
@@ -27,4 +37,4 @@ r($build->getProjectBuildsTest($count[0], $projectIDList[1], $type[2], $parm[1])
|
||||
r($build->getProjectBuildsTest($count[0], $projectIDList[0], $type[3], $parm[2])) && p('7:project,name') && e('17,项目版本版本7'); //无查询条件查询版本
|
||||
r($build->getProjectBuildsTest($count[1], $projectIDList[0], $type[0])) && p() && e('10'); //全部项目版本查询统计
|
||||
r($build->getProjectBuildsTest($count[1], $projectIDList[1], $type[0])) && p() && e('1'); //单独项目版本查询统计
|
||||
r($build->getProjectBuildsTest($count[1], $projectIDList[0], $type[3], $parm[2])) && p() && e('10'); //无查询条件查询版本统计
|
||||
r($build->getProjectBuildsTest($count[1], $projectIDList[0], $type[3], $parm[2])) && p() && e('10'); //无查询条件查询版本统计
|
||||
Regular → Executable
+12
-1
@@ -10,6 +10,17 @@ title=测试 buildModel->getProjectBuildsBySearch();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
项目id为0查询 >> 18,项目版本版本8
|
||||
正常项目查询 >> 17,项目版本版本7
|
||||
项目id为空查询 >> 19,项目版本版本9
|
||||
搜索条件id为空查询 >> 16,项目版本版本6
|
||||
项目id为0查询统计 >> 10
|
||||
正常项目查询统计 >> 1
|
||||
项目id为空查询统计 >> 10
|
||||
搜索条件id为空查询统计 >> 10
|
||||
查询条件查询 >> 17,项目版本版本7
|
||||
查询条件查询统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('0', '17', '');
|
||||
@@ -27,4 +38,4 @@ r($build->getProjectBuildsBySearchTest($count[1], $projectIDList[1], $queryIDLis
|
||||
r($build->getProjectBuildsBySearchTest($count[1], $projectIDList[2], $queryIDList[0])) && p() && e('10'); //项目id为空查询统计
|
||||
r($build->getProjectBuildsBySearchTest($count[1], $projectIDList[0], $queryIDList[2])) && p() && e('10'); //搜索条件id为空查询统计
|
||||
r($build->getProjectBuildsBySearchTest($count[0], $projectIDList[0], $queryIDList[1])) && p('7:project,name') && e('17,项目版本版本7');//查询条件查询
|
||||
r($build->getProjectBuildsBySearchTest($count[1], $projectIDList[0], $queryIDList[1])) && p() && e('1'); //查询条件查询统计
|
||||
r($build->getProjectBuildsBySearchTest($count[1], $projectIDList[0], $queryIDList[1])) && p() && e('1'); //查询条件查询统计
|
||||
Regular → Executable
+16
-1
@@ -10,8 +10,23 @@ title=测试 buildModel->linkBug();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
项目版本链接bug >> ,311,301,11
|
||||
执行版本链接bug >> ,311,301,101
|
||||
不传bugID >> ,311,301,
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('1', '11');
|
||||
$bugs = array('311', '301');
|
||||
$resolvedBy = array($bugs[0] => 'admin', $bugs[1] => 'dev10');
|
||||
|
||||
$nomalBuglink = array('bugs' => $bugs, 'resolvedBy' => $resolvedBy);
|
||||
$noBuglink = array('bugs' => array());
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->linkBugTest()) && p() && e();
|
||||
r($build->linkBugTest($buildIDList[0], $nomalBuglink)) && p('1:bugs,project') && e(',311,301,11'); //项目版本链接bug
|
||||
r($build->linkBugTest($buildIDList[1], $nomalBuglink)) && p('11:bugs,execution') && e(',311,301,101');//执行版本链接bug
|
||||
r($build->linkBugTest($buildIDList[0], $noBuglink)) && p('1:bugs') && e(',311,301,'); //不传bugID
|
||||
//
|
||||
system("./ztest init");
|
||||
Regular → Executable
+14
-1
@@ -10,8 +10,21 @@ title=测试 buildModel->linkStory();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
>> ,2,4,11
|
||||
>> ,2,4,101
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('1', '11');
|
||||
$stories = array('2', '4');
|
||||
|
||||
$nomalStorylink = array('stories' => $stories);
|
||||
$noStorylink = array('stories' => array());
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->linkStoryTest()) && p() && e();
|
||||
r($build->linkStoryTest($buildIDList[0], $nomalStorylink)) && p('1:stories,project') && e(',2,4,11');
|
||||
r($build->linkStoryTest($buildIDList[1], $nomalStorylink)) && p('11:stories,execution') && e(',2,4,101');
|
||||
r($build->linkStoryTest($buildIDList[0], $noStorylink)) && p('1:stories') && e('');
|
||||
|
||||
system("./ztest init");
|
||||
Regular → Executable
+12
-1
@@ -10,8 +10,19 @@ title=测试 buildModel->unlinkBug();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
项目版本解除bug >> ,311,11
|
||||
执行版本解除bug >> ,301,101
|
||||
不传入BugID >> 『对象ID』应当是数字。
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('1', '11');
|
||||
$bugs = array('301', '311');
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->unlinkBugTest()) && p() && e();
|
||||
r($build->unlinkBugTest($buildIDList[0],$bugs,$bugs[0])) && p('1:bugs,project') && e(',311,11'); //项目版本解除bug
|
||||
r($build->unlinkBugTest($buildIDList[1],$bugs,$bugs[1])) && p('11:bugs,execution') && e(',301,101'); //执行版本解除bug
|
||||
r($build->unlinkBugTest($buildIDList[1],$bugs,'')) && p('objectID:0') && e('『对象ID』应当是数字。');//不传入BugID
|
||||
|
||||
system("./ztest init");
|
||||
Regular → Executable
+11
-1
@@ -10,8 +10,18 @@ title=测试 buildModel->unlinkStory();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
解除项目版本需求 >> ,4,11
|
||||
解除执行版本需求 >> ,2,101
|
||||
需求id为空 >> 『对象ID』应当是数字。
|
||||
|
||||
*/
|
||||
$buildIDList = array('1', '11');
|
||||
$stories = array('2', '4');
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->unlinkStoryTest()) && p() && e();
|
||||
r($build->unlinkStoryTest($buildIDList[0],$stories,$stories[0])) && p('1:stories,project') && e(',4,11'); //解除项目版本需求
|
||||
r($build->unlinkStoryTest($buildIDList[1],$stories,$stories[1])) && p('11:stories,execution') && e(',2,101'); //解除执行版本需求
|
||||
r($build->unlinkStoryTest($buildIDList[0],$stories,'')) && p('objectID:0') && e('『对象ID』应当是数字。');//需求id为空
|
||||
|
||||
system("./ztest init");
|
||||
Regular → Executable
+7
-1
@@ -10,6 +10,12 @@ title=测试 buildModel->update();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
修改项目版本 >> name,项目版本版本1,修改版本一
|
||||
修改执行版本 >> name,执行版本版本11,修改执行版本一
|
||||
修改版本路径 >> scmPath,,http://www.baidu.com
|
||||
名称为空测试 >> 『名称编号』不能为空。
|
||||
构建者为空测试 >> 『构建者』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$buildIDList = array('1', '11');
|
||||
@@ -28,4 +34,4 @@ r($build->updateTest($buildIDList[0], $pathBuild)) && p('1:field,old,new')
|
||||
r($build->updateTest($buildIDList[0], $noName)) && p('name:0') && e('『名称编号』不能为空。'); //名称为空测试
|
||||
r($build->updateTest($buildIDList[0], $noBuilder)) && p('builder:0') && e('『构建者』不能为空。'); //构建者为空测试
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
Regular → Executable
+23
-1
@@ -10,8 +10,30 @@ title=测试 buildModel->updateLinkedBug();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
项目版本修改链接bug >> user10
|
||||
执行版本修改链接bug >> 1
|
||||
不设置bugID >> 0
|
||||
|
||||
*/
|
||||
$buildID = array('1', '11', '12');
|
||||
$bugs = array('311', '301');
|
||||
$moreBugs = array('312', '302');
|
||||
$resolvedBy = array($bugs[0] => 'admin', $bugs[1] => 'user10');
|
||||
|
||||
$normalLink = array('bugs' => $bugs, 'resolvedBy' => $resolvedBy);
|
||||
$noResolvedBy = array('bugs' => $moreBugs);
|
||||
$noBugs = array('resolvedBy' => $resolvedBy);
|
||||
|
||||
$build = new buildTest();
|
||||
|
||||
r($build->updateLinkedBugTest()) && p() && e();
|
||||
$projectLink = $build->updateLinkedBugTest($buildID[0],$normalLink);
|
||||
$executionLink = $build->updateLinkedBugTest($buildID[1],$normalLink);
|
||||
$noResolvedByLink = $build->updateLinkedBugTest($buildID[2],$noResolvedBy);
|
||||
$noBugs = $build->updateLinkedBugTest($buildID[0],$noBugs);
|
||||
//a($noBugs);die;
|
||||
r($projectLink) && p('301:resolvedBy') && e('user10'); //项目版本修改链接bug
|
||||
r($executionLink) && p('311:resolvedBuild') && e('1'); //执行版本修改链接bug
|
||||
r($noResolvedByLink) && p('302:resolvedBy') && e(''); //不设置解决人
|
||||
r($noBugs) && p() && e('0'); //不设置bugID
|
||||
|
||||
system("./ztest init");
|
||||
@@ -49,6 +49,9 @@ switch($argv[1])
|
||||
case 'dept':
|
||||
ztfRun('model/dept');
|
||||
break;
|
||||
case 'build':
|
||||
ztfRun('model/build');
|
||||
break;
|
||||
case 'kanban':
|
||||
ztfRun('model/kanban');
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user