From a914aa0ea86b6740cb7b9e7f37f950137d591285 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 10 Jan 2023 13:45:45 +0800 Subject: [PATCH] * Update uni test case. --- test/model/execution/linkcases.php | 59 +++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 14 deletions(-) diff --git a/test/model/execution/linkcases.php b/test/model/execution/linkcases.php index 740282cc36..22e9a62813 100755 --- a/test/model/execution/linkcases.php +++ b/test/model/execution/linkcases.php @@ -2,7 +2,40 @@ switchDB(); + +$execution = zdTable('project'); +$execution->id->range('1-5'); +$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3'); +$execution->type->range('project{2},sprint,waterfall,kanban'); +$execution->status->range('doing{3},closed,doing'); +$execution->parent->range('0,0,1,1,2'); +$execution->grade->range('2{2},1{3}'); +$execution->path->range('1,2,`1,3`,`1,4`,`2,5`')->prefix(',')->postfix(','); +$execution->begin->range('20230102 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->end->range('20230212 000000:0')->type('timestamp')->format('YY/MM/DD'); +$execution->gen(5); + +$projectstory = zdTable('projectcase'); +$projectstory->project->range('3-5'); +$projectstory->product->range('1,43,68'); +$projectstory->case->range('4,324,364'); +$projectstory->gen(3); + +$product = zdTable('product'); +$product->id->range('1,43,68'); +$product->name->range('1-3')->prefix('产品'); +$product->code->range('1-3')->prefix('product'); +$product->type->range('normal'); +$product->status->range('normal'); +$product->gen(3); + +$stroy = zdTable('story'); +$stroy->id->range('2,170,270'); +$stroy->title->range('1-3')->prefix('需求'); +$stroy->type->range('story'); +$stroy->status->range('active'); +$stroy->gen(3); + su('admin'); /** @@ -11,26 +44,24 @@ title=测试executionModel->linkCasesTest(); cid=1 pid=1 -敏捷执行关联用例 >> 101,1,1 -瀑布执行关联用例 >> 131,43,169 -看板执行关联用例 >> 161,68,269 +敏捷执行关联用例 >> 3,1,1 +瀑布执行关联用例 >> 4,43,169 +看板执行关联用例 >> 5,68,269 敏捷执行关联用例统计 >> 8 瀑布执行关联用例统计 >> 4 看板执行关联用例统计 >> 4 */ -$executionIDList = array('101', '131', '161'); -$stories = array('2', '170', '270'); +$executionIDList = array('3', '4', '5'); $products = array('1', '43', '68'); +$stories = array('2', '170', '270'); $count = array('0','1'); $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('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(); +r($execution->linkCasesTest($executionIDList[0], $count[0], $products[0], $stories[0])) && p('0:project,product,case') && e('3,1,1'); // 敏捷执行关联用例 +r($execution->linkCasesTest($executionIDList[1], $count[0], $products[1], $stories[1])) && p('0:project,product,case') && e('4,43,169'); // 瀑布执行关联用例 +r($execution->linkCasesTest($executionIDList[2], $count[0], $products[2], $stories[2])) && p('0:project,product,case') && e('5,68,269'); // 看板执行关联用例 +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'); // 看板执行关联用例统计