Merge branch 'sprint/tsj_uinttest' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/tsj_uinttest

This commit is contained in:
caoyanyi
2023-01-11 09:36:51 +08:00
4 changed files with 82 additions and 26 deletions
+2 -3
View File
@@ -2,6 +2,8 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
zdTable('user')->gen(5);
su('admin');
$execution = zdTable('project');
$execution->id->range('1-5');
@@ -14,9 +16,6 @@ $execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/
$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->gen(5);
zdTable('user')->gen(5);
su('admin');
/**
title=测试executionModel->activateTest();
+1 -1
View File
@@ -28,4 +28,4 @@ r($execution->getDateListTest($start[0], $end[0], $type[0] ,$count[0])) && p('0:
r($execution->getDateListTest($start[0], $end[0], $type[0] ,$count[1])) && p() && e('5'); // 去除工作日日期列表统计
r($execution->getDateListTest($start[0], $end[0], $type[1] ,$count[0])) && p('0:0') && e('01/01/2022'); // 未去除工作日日期列表
r($execution->getDateListTest($start[0], $end[0], $type[1] ,$count[1])) && p() && e('7'); // 未去除工作日日期列表统计
r($execution->getDateListTest($start[1], $end[0], $type[1] ,$count[0])) && p() && e('无数据'); // 日期输入错误查询
r($execution->getDateListTest($start[1], $end[0], $type[1] ,$count[0])) && p() && e('无数据'); // 日期输入错误查询
+37 -8
View File
@@ -2,23 +2,52 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
zdTable('user')->gen(5);
su('admin');
$execution = zdTable('project');
$execution->id->range('1-5');
$execution->name->range('项目集1,项目1,迭代1,阶段1,看板1');
$execution->type->range('program,project,sprint,stage,kanban');
$execution->parent->range('0,1,2{3}');
$execution->status->range('wait{3},suspended,closed,doing');
$execution->openedBy->range('admin,user1');
$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->gen(5);
$product = zdTable('product');
$product->id->range('1-3');
$product->name->range('1-3')->prefix('产品');
$product->code->range('1-3')->prefix('product');
$product->type->range('normal');
$product->status->range('normal');
$product->PO->range('admin');
$product->QD->range('user1');
$product->RD->range('user2');
$product->gen(3);
$projectProduct = zdTable('projectproduct');
$projectProduct->project->range('3{3}, 4{3}, 5{3}');
$projectProduct->product->range('1-3');
$projectProduct->branch->range('0');
$projectProduct->gen(9);
/**
title=executionModel->getDefaultManagers();
cid=1
pid=1
敏捷查找访问人员 >> po1
瀑布查找访问人员 >> test21
看板查找访问人员 >> dev51
敏捷查找访问人员 >> admin
瀑布查找访问人员 >> user1
看板查找访问人员 >> user2
*/
$executionID = array('101', '131', '161');
$executionID = array(3, 4, 5);
$execution = new executionTest();
r($execution->getDefaultManagersTest($executionID[0])) && p('PO') && e('po1'); //敏捷查找访问人员
r($execution->getDefaultManagersTest($executionID[1])) && p('QD') && e('test21'); //瀑布查找访问人员
r($execution->getDefaultManagersTest($executionID[2])) && p('RD') && e('dev51'); //看板查找访问人员
$executionTester = new executionTest();
r($executionTester->getDefaultManagersTest($executionID[0])) && p('PO') && e('admin'); //敏捷查找访问人员
r($executionTester->getDefaultManagersTest($executionID[1])) && p('QD') && e('user1'); //瀑布查找访问人员
r($executionTester->getDefaultManagersTest($executionID[2])) && p('RD') && e('user2'); //看板查找访问人员
+42 -14
View File
@@ -2,30 +2,58 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
$execution = zdTable('project');
$execution->id->range('1-10');
$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,迭代2,阶段1,阶段2,看板1,看板2');
$execution->type->range('program,project{3},sprint{2},stage{2},kanban{2}');
$execution->model->range('[],scrum,waterfall,kanban,[]{6}');
$execution->parent->range('0,1{3},2{2},3{2},4{2}');
$execution->project->range('0{4},2{2},3{2},4{2}');
$execution->status->range('doing');
$execution->vision->range('rnd');
$execution->openedBy->range('admin,user1');
$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->gen(10);
su('admin');
$execution = zdTable('project');
$execution->id->range('1-10');
$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,迭代2,阶段1,阶段2,看板1,看板2');
$execution->type->range('program,project{3},sprint{2},stage{2},kanban{2}');
$execution->model->range('[],scrum,waterfall,kanban,[]{6}');
$execution->parent->range('0,1{3},2{2},3{2},4{2}');
$execution->project->range('0{4},2{2},3{2},4{2}');
$execution->status->range('doing');
$execution->vision->range('rnd');
$execution->openedBy->range('admin,user1');
$execution->begin->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->end->range('20220212 000000:0')->type('timestamp')->format('YY/MM/DD');
$execution->gen(10);
/**
title=测试executionModel->getIdListTest();
cid=1
pid=1
敏捷项目下执行id查询 >> 101
瀑布项目下执行id查询 >> 131
看板项目下执行id查询 >> 161
敏捷项目下执行id数量统计 >> 7
敏捷项目下执行id数量统计 >> 8
敏捷项目下执行id数量统计 >> 6
敏捷项目下执行id查询 >> 5
瀑布项目下执行id查询 >> 7
看板项目下执行id查询 >> 9
敏捷项目下执行id数量统计 >> 2
敏捷项目下执行id数量统计 >> 2
敏捷项目下执行id数量统计 >> 2
*/
$projectIDList = array('11', '41', '71');
$projectIDList = array(2, 3, 4);
$count = array('0','1');
$execution = new executionTest();
r($execution->getIdListTest($projectIDList[0],$count[0])) && p('101') && e('101'); // 敏捷项目下执行id查询
r($execution->getIdListTest($projectIDList[1],$count[0])) && p('131') && e('131'); // 瀑布项目下执行id查询
r($execution->getIdListTest($projectIDList[2],$count[0])) && p('161') && e('161'); // 看板项目下执行id查询
r($execution->getIdListTest($projectIDList[0],$count[1])) && p() && e('7'); // 敏捷项目下执行id数量统计
r($execution->getIdListTest($projectIDList[1],$count[1])) && p() && e('8'); // 敏捷项目下执行id数量统计
r($execution->getIdListTest($projectIDList[2],$count[1])) && p() && e('6'); // 敏捷项目下执行id数量统计
$executionTester = new executionTest();
r($executionTester->getIdListTest($projectIDList[0],$count[0])) && p('5') && e('5'); // 敏捷项目下执行id查询
r($executionTester->getIdListTest($projectIDList[1],$count[0])) && p('7') && e('7'); // 瀑布项目下执行id查询
r($executionTester->getIdListTest($projectIDList[2],$count[0])) && p('9') && e('9'); // 看板项目下执行id查询
r($executionTester->getIdListTest($projectIDList[0],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计
r($executionTester->getIdListTest($projectIDList[1],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计
r($executionTester->getIdListTest($projectIDList[2],$count[1])) && p() && e('2'); // 敏捷项目下执行id数量统计