Merge branch 'sprint/231_tianshujie_case' into 'master'

Sprint/231 tianshujie case

See merge request easycorp/zentaopms!5091
This commit is contained in:
胡方舟
2022-08-24 07:11:24 +00:00
13 changed files with 66 additions and 69 deletions
+9 -11
View File
@@ -1604,33 +1604,31 @@ class executionTest
}
/**
* function getBurnDataFlot test by execution
* Function getBurnDataFlot test by execution.
*
* @param int $executionID
* @param string $count
* @param int $executionID
* @access public
* @return array
* @return int
*/
public function getBurnDataFlotTest($executionID = 0, $count)
public function getBurnDataFlotTest($executionID = 0)
{
$date = date("Y-m-d");
$object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left');
$todayData = array();
foreach ($object[$date] as $key => $value) $todayData[$key] = $value;
if(isset($object[$date]))
{
foreach($object[$date] as $key => $value) $todayData[$key] = $value;
}
if(dao::isError())
{
$error = dao::getError();
return $error;
}
elseif($count == "1")
{
return sizeof($todayData);
}
else
{
return $object;
return sizeof($todayData);
}
}
+3 -3
View File
@@ -12,7 +12,7 @@ pid=1
敏捷执行燃尽图数据 >> 7/1
瀑布执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,0,0]
看板执行燃尽图数据 >> [20,18,16,14,12,10,8,6,4,2,0]
看板执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,0,0]
结果统计 >> 3
*/
@@ -23,5 +23,5 @@ $count = array('0', '1');
$execution = new executionTest();
r($execution->buildBurnDataTest($executionIDList[0], $count[0])) && p('labels:0') && e('7/1'); // 敏捷执行燃尽图数据
r($execution->buildBurnDataTest($executionIDList[1], $count[0])) && p('burnLine') && e('[0,0,0,0,0,0,0,0,0,0,0]'); // 瀑布执行燃尽图数据
r($execution->buildBurnDataTest($executionIDList[2], $count[0])) && p('baseLine') && e('[20,18,16,14,12,10,8,6,4,2,0]'); // 看板执行燃尽图数据
r($execution->buildBurnDataTest($executionIDList[0], $count[1])) && p() && e('3'); // 结果统计
r($execution->buildBurnDataTest($executionIDList[2], $count[0])) && p('baseLine') && e('[0,0,0,0,0,0,0,0,0,0,0]'); // 看板执行燃尽图数据
r($execution->buildBurnDataTest($executionIDList[0], $count[1])) && p() && e('3'); // 结果统计
+2 -2
View File
@@ -11,7 +11,7 @@ cid=1
pid=1
正常初始化 >> project600
初始化后数据统计 >> 516
初始化后数据统计 >> 361
*/
@@ -19,4 +19,4 @@ $count = array('0','1');
$execution = new executionTest();
r($execution->computeBurnTest($count[0])) && p('700:executionName') && e('project600'); // 正常初始化
r($execution->computeBurnTest($count[1])) && p() && e('516'); // 初始化后数据统计
r($execution->computeBurnTest($count[1])) && p() && e('361'); // 初始化后数据统计
+5 -5
View File
@@ -10,8 +10,8 @@ title=executionModel->getBranchByProduct();
cid=1
pid=1
正常产品分支统计 >> 0
分支产品分支查看 >> 分支2
正常产品分支统计 >> 1
分支产品分支查看 >> 分支1
分支产品分支统计 >> 1
*/
@@ -20,6 +20,6 @@ $productIDList = array('1', '41');
$count = array('0', '1');
$execution = new executionTest();
r($execution->getBranchByProductTest($productIDList[0],$count[1])) && p() && e('0'); //正常产品分支统计
r($execution->getBranchByProductTest($productIDList[1],$count[0])) && p('41:2') && e('分支2'); //分支产品分支查看
r($execution->getBranchByProductTest($productIDList[1],$count[1])) && p() && e('1'); //分支产品分支统计
r($execution->getBranchByProductTest($productIDList[0], $count[1])) && p() && e('1'); //正常产品分支统计
r($execution->getBranchByProductTest($productIDList[1], $count[0])) && p('41:1') && e('分支1'); //分支产品分支查看
r($execution->getBranchByProductTest($productIDList[1], $count[1])) && p() && e('1'); //分支产品分支统计
+4 -5
View File
@@ -12,14 +12,13 @@ pid=1
敏捷执行查询统计 >> 3
瀑布执行查询统计 >> 3
看板执行查询统计 >> 3
看板执行查询统计 >> 0
*/
$executionIDList = array('101', '131', '161');
$count = array('0','1');
$execution = new executionTest();
r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('3'); // 敏捷执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('3'); // 瀑布执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('3'); // 看板执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[0])) && p() && e('3'); // 敏捷执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[1])) && p() && e('3'); // 瀑布执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[2])) && p() && e('0'); // 看板执行查询统计
+2 -2
View File
@@ -19,5 +19,5 @@ $executionID = '131';
$count = array('0','1');
$execution = new executionTest();
r($execution->getChildExecutionsTest($executionID,$count[0])) && p('701') && e('子阶段1'); // 查询子阶段
r($execution->getChildExecutionsTest($executionID,$count[1])) && p() && e('1'); // 查询子阶段数量
r($execution->getChildExecutionsTest($executionID, $count[0])) && p('701:name') && e('子阶段1'); // 查询子阶段
r($execution->getChildExecutionsTest($executionID, $count[1])) && p() && e('1'); // 查询子阶段数量
@@ -11,12 +11,12 @@ cid=1
pid=1
查询当前用户访问的产品相关项目集 >> 项目集10
查询当前用户访问的产品相关数量 >> 101
查询当前用户访问的产品相关数量 >> 121
*/
$count = array('0','1');
$execution = new executionTest();
r($execution->getProductGroupListTest($count[0])) && p('9:name') && e('项目集10'); // 查询当前用户访问的产品相关项目集
r($execution->getProductGroupListTest($count[1])) && p() && e('101'); // 查询当前用户访问的产品相关数量
r($execution->getProductGroupListTest($count[0])) && p('9:name') && e('项目集10'); // 查询当前用户访问的产品相关项目集
r($execution->getProductGroupListTest($count[1])) && p() && e('121'); // 查询当前用户访问的产品相关数量
+5 -5
View File
@@ -27,13 +27,13 @@ suspended状态执行close按钮检查 >> 检查通过
suspended状态执行suspend按钮检查 >> 检查不通过
suspended状态执行putoff按钮检查 >> 检查不通过
suspended状态执行activate按钮检查 >> 检查通过
suspended状态执行delete按钮检查 >> 检查通过
suspended状态执行delete按钮检查 >> 检查通过
closed状态执行start按钮检查 >> 检查不通过
closed状态执行close按钮检查 >> 检查不通过
closed状态执行suspend按钮检查 >> 检查不通过
closed状态执行putoff按钮检查 >> 检查不通过
closed状态执行activate按钮检查 >> 检查通过
closed状态执行delete按钮检查 >> 检查通过
closed状态执行delete按钮检查 >> 检查通过
*/
@@ -67,10 +67,10 @@ r($execution->isClickableTest($suspendedExecution, $actionList[1])) && p() && e(
r($execution->isClickableTest($suspendedExecution, $actionList[2])) && p() && e('检查不通过'); // suspended状态执行suspend按钮检查
r($execution->isClickableTest($suspendedExecution, $actionList[3])) && p() && e('检查不通过'); // suspended状态执行putoff按钮检查
r($execution->isClickableTest($suspendedExecution, $actionList[4])) && p() && e('检查通过'); // suspended状态执行activate按钮检查
r($execution->isClickableTest($suspendedExecution, $actionList[5])) && p() && e('检查通过'); // suspended状态执行delete按钮检查
r($execution->isClickableTest($suspendedExecution, $actionList[5])) && p() && e('检查通过'); // suspended状态执行delete按钮检查
r($execution->isClickableTest($closedExecution, $actionList[0])) && p() && e('检查不通过'); // closed状态执行start按钮检查
r($execution->isClickableTest($closedExecution, $actionList[1])) && p() && e('检查不通过'); // closed状态执行close按钮检查
r($execution->isClickableTest($closedExecution, $actionList[2])) && p() && e('检查不通过'); // closed状态执行suspend按钮检查
r($execution->isClickableTest($closedExecution, $actionList[3])) && p() && e('检查通过'); // closed状态执行putoff按钮检查
r($execution->isClickableTest($closedExecution, $actionList[3])) && p() && e('检查通过'); // closed状态执行putoff按钮检查
r($execution->isClickableTest($closedExecution, $actionList[4])) && p() && e('检查通过'); // closed状态执行activate按钮检查
r($execution->isClickableTest($closedExecution, $actionList[5])) && p() && e('检查不通过'); // closed状态执行delete按钮检查
r($execution->isClickableTest($closedExecution, $actionList[5])) && p() && e('检查不通过'); // closed状态执行delete按钮检查
+3 -3
View File
@@ -14,7 +14,7 @@ pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
敏捷执行关联用例统计 >> 8
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
@@ -29,8 +29,8 @@ $execution = new executionTest();
r($execution->linkCasesTest($executionIDList[0], $count[0], $products[0], $stories[0])) && p('0:project,product,case') && e('101,1,1'); // 敏捷执行关联用例
r($execution->linkCasesTest($executionIDList[1], $count[0], $products[1], $stories[1])) && p('0:project,product,case') && e('131,43,169'); // 瀑布执行关联用例
r($execution->linkCasesTest($executionIDList[2], $count[0], $products[2], $stories[2])) && p('0:project,product,case') && e('161,68,269'); // 看板执行关联用例
r($execution->linkCasesTest($executionIDList[0], $count[1], $products[0], $stories[0])) && p() && e('4'); // 敏捷执行关联用例统计
r($execution->linkCasesTest($executionIDList[0], $count[1], $products[0], $stories[0])) && p() && e('8'); // 敏捷执行关联用例统计
r($execution->linkCasesTest($executionIDList[1], $count[1], $products[1], $stories[1])) && p() && e('4'); // 瀑布执行关联用例统计
r($execution->linkCasesTest($executionIDList[2], $count[1], $products[2], $stories[2])) && p() && e('4'); // 看板执行关联用例统计
$db->restoreDB();
$db->restoreDB();
+7 -7
View File
@@ -14,9 +14,9 @@ pid=1
敏捷执行关联需求 >> 101,1,4
瀑布执行关联需求 >> 131,1,4
看板执行关联需求 >> 161,1,4
敏捷执行关联需求统计 >> 3
瀑布执行关联需求统计 >> 3
看板执行关联需求统计 >> 3
敏捷执行关联需求统计 >> 1
瀑布执行关联需求统计 >> 1
看板执行关联需求统计 >> 1
*/
@@ -31,8 +31,8 @@ $execution = new executionTest();
r($execution->linkStoryTest($executionIDList[0], $count[0], $story)) && p('0:project,product,story') && e('101,1,4'); // 敏捷执行关联需求
r($execution->linkStoryTest($executionIDList[1], $count[0], $story)) && p('0:project,product,story') && e('131,1,4'); // 瀑布执行关联需求
r($execution->linkStoryTest($executionIDList[2], $count[0], $story)) && p('0:project,product,story') && e('161,1,4'); // 看板执行关联需求
r($execution->linkStoryTest($executionIDList[0], $count[1], $story)) && p() && e('3'); // 敏捷执行关联需求统计
r($execution->linkStoryTest($executionIDList[1], $count[1], $story)) && p() && e('3'); // 瀑布执行关联需求统计
r($execution->linkStoryTest($executionIDList[2], $count[1], $story)) && p() && e('3'); // 看板执行关联需求统计
r($execution->linkStoryTest($executionIDList[0], $count[1], $story)) && p() && e('1'); // 敏捷执行关联需求统计
r($execution->linkStoryTest($executionIDList[1], $count[1], $story)) && p() && e('1'); // 瀑布执行关联需求统计
r($execution->linkStoryTest($executionIDList[2], $count[1], $story)) && p() && e('1'); // 看板执行关联需求统计
$db->restoreDB();
$db->restoreDB();
+7 -7
View File
@@ -10,9 +10,9 @@ title=测试executionModel->processBurnDataTest();
cid=1
pid=1
敏捷执行查询统计 >> 29
瀑布执行查询统计 >> 59
看板执行查询统计 >> 62
敏捷执行查询统计 >> 30
瀑布执行查询统计 >> 60
看板执行查询统计 >> 67
错误时间查询统计 >> 0
*/
@@ -24,7 +24,7 @@ $end = array('2022-03-22','2022-01-15');
$count = array('0','1');
$execution = new executionTest();
r($execution->processBurnDataTest($executionIDList[0], $itemCounts[0], $begin[0], $end[0], $count[1])) && p() && e('29'); // 敏捷执行查询统计
r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('59'); // 瀑布执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('62'); // 看板执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计
r($execution->processBurnDataTest($executionIDList[0], $itemCounts[0], $begin[0], $end[0], $count[1])) && p() && e('30'); // 敏捷执行查询统计
r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('60'); // 瀑布执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('67'); // 看板执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计
+5 -5
View File
@@ -14,8 +14,8 @@ pid=1
敏捷执行解除团队成员 >> po82,研发
敏捷执行解除团队成员后统计 >> 1
瀑布执行解除团队成员 >> 0
看板执行解除团队成员 >> test52,测试
看板执行解除团队成员后统计 >> 1
看板执行解除团队成员 >> 0
看板执行解除团队成员后统计 >> 0
*/
@@ -27,6 +27,6 @@ $execution = new executionTest();
r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷执行解除团队成员
r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[1])) && p() && e('1'); // 敏捷执行解除团队成员后统计
r($execution->unlinkMemberTest($executionIDList[1], $accountList[1], $count[0])) && p() && e('0'); // 瀑布执行解除团队成员
r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板执行解除团队成员
r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('1'); // 看板执行解除团队成员后统计
$db->restoreDB();
r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[0])) && p('0:account,role') && e('0'); // 看板执行解除团队成员
r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('0'); // 看板执行解除团队成员后统计
$db->restoreDB();
+11 -11
View File
@@ -11,12 +11,12 @@ title=测试executionModel->unlinkStoryTest();
cid=1
pid=1
敏捷执行解除关联需求 >> 101,81,324
敏捷执行解除关联需求 >> 0
瀑布执行解除关联需求 >> 131,1,4
看板执行解除关联需求 >> 161,1,4
敏捷执行关联需求统计 >> 2
瀑布执行关联需求统计 >> 2
看板执行关联需求统计 >> 2
敏捷执行关联需求统计 >> 0
瀑布执行关联需求统计 >> 1
看板执行关联需求统计 >> 1
*/
@@ -28,11 +28,11 @@ $count = array('0', '1');
$story = array('stories' => $stories, 'products' => $products);
$execution = new executionTest();
r($execution->unlinkStoryTest($executionIDList[0], $count[0], $stories[0], $story)) && p('0:project,product,story') && e('101,81,324'); // 敏捷执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[1], $count[0], $stories[1], $story)) && p('0:project,product,story') && e('131,1,4'); // 瀑布执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[2], $count[0], $stories[2], $story)) && p('0:project,product,story') && e('161,1,4'); // 看板执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[0], $count[1], $stories[0], $story)) && p() && e('2'); // 敏捷执行关联需求统计
r($execution->unlinkStoryTest($executionIDList[1], $count[1], $stories[1], $story)) && p() && e('2'); // 瀑布执行关联需求统计
r($execution->unlinkStoryTest($executionIDList[2], $count[1], $stories[2], $story)) && p() && e('2'); // 看板执行关联需求统计
r($execution->unlinkStoryTest($executionIDList[0], $count[0], $stories[0], $story)) && p('0:project,product,story') && e('0'); // 敏捷执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[1], $count[0], $stories[1], $story)) && p('0:project,product,story') && e('131,1,4'); // 瀑布执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[2], $count[0], $stories[2], $story)) && p('0:project,product,story') && e('161,1,4'); // 看板执行解除关联需求
r($execution->unlinkStoryTest($executionIDList[0], $count[1], $stories[0], $story)) && p() && e('0'); // 敏捷执行关联需求统计
r($execution->unlinkStoryTest($executionIDList[1], $count[1], $stories[1], $story)) && p() && e('1'); // 瀑布执行关联需求统计
r($execution->unlinkStoryTest($executionIDList[2], $count[1], $stories[2], $story)) && p() && e('1'); // 看板执行关联需求统计
$db->restoreDB();
$db->restoreDB();