Merge branch 'sprint/tsj_uinttest' into 'master'
Sprint/tsj uinttest See merge request easycorp/zentaopms!6741
This commit is contained in:
@@ -300,7 +300,7 @@ class yaml
|
||||
{
|
||||
$tableSqlDir = "{$_SERVER['PWD']}/data/sql";
|
||||
|
||||
if(!is_dir($tableSqlDir)) mkdir($tableSqlDir, 0700);
|
||||
if(!is_dir($tableSqlDir)) mkdir($tableSqlDir, 0777, true);
|
||||
$dumpCommand = "mysqldump -u%s -p%s -h%s -P%s %s %s > {$tableSqlDir}/{$tableName}.sql";
|
||||
|
||||
$runtimeRoot = dirname(dirname(__FILE__)) . '/runtime/';
|
||||
@@ -314,10 +314,13 @@ class yaml
|
||||
$dbUser = $this->config->db->user;
|
||||
$dbPWD = $this->config->db->password;
|
||||
|
||||
$command = "$zdPath -c %s -d %s -n %d -t %s -dns mysql://%s:%s@%s:%s/%s#utf8";
|
||||
$setModeSql = "mysql -u%s -p%s -h%s -P%s %s -e \"SET global sql_mode = '';\"";
|
||||
$command = "$zdPath -c %s -d %s -n %d -t %s -dns mysql://%s:%s@%s:%s/%s#utf8";
|
||||
if($isClear === true) $command .= ' --clear';
|
||||
$execYaml = sprintf($command, $configYaml, $yamlFile, $rows, $tableName, $dbUser, $dbPWD, $dbHost, $dbPort, $dbName);
|
||||
$execDump = sprintf($dumpCommand, $dbUser, $dbPWD, $dbHost, $dbPort, $dbName, $tableName);
|
||||
$execYaml = sprintf($command, $configYaml, $yamlFile, $rows, $tableName, $dbUser, $dbPWD, $dbHost, $dbPort, $dbName);
|
||||
$execDump = sprintf($dumpCommand, $dbUser, $dbPWD, $dbHost, $dbPort, $dbName, $tableName);
|
||||
$execSetMode = sprintf($setModeSql, $dbUser, $dbPWD, $dbHost, $dbPort, $dbName);
|
||||
system($execSetMode);
|
||||
system($execDump);
|
||||
system($execYaml);
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
<?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');
|
||||
@@ -16,6 +14,9 @@ $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();
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
<?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-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);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -14,7 +26,7 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '101';
|
||||
$executionID = '3';
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getByIDTest($executionID)) && p('name') && e('迭代1'); //根据executionID查找任务详情
|
||||
r($execution->getByIDTest($executionID)) && p('name') && e('迭代1'); //根据executionID查找任务详情
|
||||
|
||||
@@ -2,6 +2,18 @@
|
||||
<?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-5');
|
||||
$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3');
|
||||
$execution->type->range('project{2},sprint,stage,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);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -12,13 +24,14 @@ pid=1
|
||||
|
||||
敏捷项目查询 >> 迭代1
|
||||
瀑布项目查询 >> stage
|
||||
看板项目查询 >> project61
|
||||
看板项目查询 >> doing
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getByIdListTest($executionIDList)) && p('101:name') && e('迭代1'); // 敏捷项目查询
|
||||
r($execution->getByIdListTest($executionIDList)) && p('131:type') && e('stage'); // 瀑布项目查询
|
||||
r($execution->getByIdListTest($executionIDList)) && p('161:code') && e('project61'); // 看板项目查询
|
||||
$executionList = $execution->getByIdListTest($executionIDList);
|
||||
r($executionList) && p('3:name') && e('迭代1'); // 敏捷项目查询
|
||||
r($executionList) && p('4:type') && e('stage'); // 瀑布项目查询
|
||||
r($executionList) && p('5:status') && e('doing'); // 看板项目查询
|
||||
|
||||
@@ -2,34 +2,49 @@
|
||||
<?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-7');
|
||||
$execution->name->range('项目集1,项目1,项目2,项目3,迭代1,阶段1,看板1');
|
||||
$execution->type->range('program,project{3},sprint,stage,kanban');
|
||||
$execution->model->range('[],scrum,waterfall,kanban,[]{3}');
|
||||
$execution->parent->range('0,1{3},2,3,4');
|
||||
$execution->project->range('0{4},2,3,4');
|
||||
$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(7);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getByProjectTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目执行列表查询 >> 11,迭代1
|
||||
瀑布项目执行列表查询 >> 41,已关闭的正常产品31/阶段31/子阶段1,stage
|
||||
看板项目执行列表查询 >> 71,看板61,kanban
|
||||
wait执行列表查询 >> wait,阶段581
|
||||
doing执行列表查询 >> doing,阶段582
|
||||
执行列表2条查询 >> 2
|
||||
执行列表10条查询 >> 10
|
||||
敏捷项目执行列表查询 >> 2,迭代1,sprint
|
||||
瀑布项目执行列表查询 >> 3,阶段1,stage
|
||||
看板项目执行列表查询 >> 4,看板1,kanban
|
||||
wait执行列表查询 >> 0
|
||||
doing执行列表查询 >> doing,看板1
|
||||
执行列表2条查询 >> 0
|
||||
执行列表10条查询 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('0', '11', '41', '71');
|
||||
$projectIDList = array(0, 2, 3, 4);
|
||||
$status = array('all', 'wait', 'doing');
|
||||
$limit = array('0', '2', '10');
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getByProjectTest($projectIDList[1],$status[0],$limit[0],$count[0])) && p('101:project,name') && e('11,迭代1'); // 敏捷项目执行列表查询
|
||||
r($execution->getByProjectTest($projectIDList[2],$status[0],$limit[0],$count[0])) && p('701:project,name,type') && e('41,已关闭的正常产品31/阶段31/子阶段1,stage'); // 瀑布项目执行列表查询
|
||||
r($execution->getByProjectTest($projectIDList[3],$status[0],$limit[0],$count[0])) && p('161:project,name,type') && e('71,看板61,kanban'); // 看板项目执行列表查询
|
||||
r($execution->getByProjectTest($projectIDList[0],$status[1],$limit[0],$count[0])) && p('681:status,name') && e('wait,阶段581'); // wait执行列表查询
|
||||
r($execution->getByProjectTest($projectIDList[0],$status[2],$limit[0],$count[0])) && p('682:status,name') && e('doing,阶段582'); // doing执行列表查询
|
||||
r($execution->getByProjectTest($projectIDList[0],$status[1],$limit[1],$count[1])) && p() && e('2'); // 执行列表2条查询
|
||||
r($execution->getByProjectTest($projectIDList[0],$status[2],$limit[2],$count[1])) && p() && e('10'); // 执行列表10条查询
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getByProjectTest($projectIDList[1],$status[0],$limit[0],$count[0])) && p('5:project,name,type') && e('2,迭代1,sprint'); // 敏捷项目执行列表查询
|
||||
r($executionTester->getByProjectTest($projectIDList[2],$status[0],$limit[0],$count[0])) && p('6:project,name,type') && e('3,阶段1,stage'); // 瀑布项目执行列表查询
|
||||
r($executionTester->getByProjectTest($projectIDList[3],$status[0],$limit[0],$count[0])) && p('7:project,name,type') && e('4,看板1,kanban'); // 看板项目执行列表查询
|
||||
r($executionTester->getByProjectTest($projectIDList[0],$status[1],$limit[0],$count[0])) && p() && e('0'); // wait执行列表查询
|
||||
r($executionTester->getByProjectTest($projectIDList[0],$status[2],$limit[0],$count[0])) && p('7:status,name') && e('doing,看板1'); // doing执行列表查询
|
||||
r($executionTester->getByProjectTest($projectIDList[0],$status[1],$limit[1],$count[1])) && p() && e('0'); // 执行列表2条查询
|
||||
r($executionTester->getByProjectTest($projectIDList[0],$status[2],$limit[2],$count[1])) && p() && e('3'); // 执行列表10条查询
|
||||
|
||||
@@ -2,30 +2,47 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
zdTable('team')->gen(0);
|
||||
|
||||
$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->getCanCopyObjectsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目数据查询 >> 迭代1
|
||||
瀑布项目数据查询 >> 阶段35
|
||||
看板项目数据查询 >> 看板61
|
||||
敏捷项目数据统计 >> 8
|
||||
瀑布项目数据统计 >> 9
|
||||
看板项目数据统计 >> 7
|
||||
敏捷项目数据查询 >> 迭代1(0人)
|
||||
瀑布项目数据查询 >> 阶段1(0人)
|
||||
看板项目数据查询 >> 看板1(0人)
|
||||
敏捷项目数据统计 >> 3
|
||||
瀑布项目数据统计 >> 3
|
||||
看板项目数据统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('11', '45', '71');
|
||||
$projectIDList = array(2, 3, 4);
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[0], $count[0])) && p('101') && e('迭代1'); // 敏捷项目数据查询
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[1], $count[0])) && p('135') && e('阶段35'); // 瀑布项目数据查询
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[2], $count[0])) && p('161') && e('看板61'); // 看板项目数据查询
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[0], $count[1])) && p() && e('8'); // 敏捷项目数据统计
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[1], $count[1])) && p() && e('9'); // 瀑布项目数据统计
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[2], $count[1])) && p() && e('7'); // 看板项目数据统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[0], $count[0])) && p('5') && e('迭代1(0人)'); // 敏捷项目数据查询
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[1], $count[0])) && p('7') && e('阶段1(0人)'); // 瀑布项目数据查询
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[2], $count[0])) && p('9') && e('看板1(0人)'); // 看板项目数据查询
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[0], $count[1])) && p() && e('3'); // 敏捷项目数据统计
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[1], $count[1])) && p() && e('3'); // 瀑布项目数据统计
|
||||
r($executionTester->getCanCopyObjectsTest($projectIDList[2], $count[1])) && p() && e('3'); // 看板项目数据统计
|
||||
|
||||
@@ -2,8 +2,20 @@
|
||||
<?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,子阶段2');
|
||||
$execution->type->range('program,project,stage{3}');
|
||||
$execution->parent->range('0,1,0,3{2}');
|
||||
$execution->status->range('wait');
|
||||
$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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getChildExecutionsTest();
|
||||
@@ -11,13 +23,13 @@ cid=1
|
||||
pid=1
|
||||
|
||||
查询子阶段 >> 子阶段1
|
||||
查询子阶段数量 >> 1
|
||||
查询子阶段数量 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '131';
|
||||
$executionID = 3;
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getChildExecutionsTest($executionID, $count[0])) && p('701:name') && e('子阶段1'); // 查询子阶段
|
||||
r($execution->getChildExecutionsTest($executionID, $count[1])) && p() && e('1'); // 查询子阶段数量
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getChildExecutionsTest($executionID, $count[0])) && p('4:name') && e('子阶段1'); // 查询子阶段
|
||||
r($executionTester->getChildExecutionsTest($executionID, $count[1])) && p() && e('2'); // 查询子阶段数量
|
||||
|
||||
@@ -2,7 +2,39 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
|
||||
$execution = zdTable('project');
|
||||
$execution->id->range('1-5');
|
||||
$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3');
|
||||
$execution->type->range('project{2},sprint,stage,kanban');
|
||||
$execution->status->range('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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$task->name->range('1-10')->prefix('任务');
|
||||
$task->execution->range('3,4,5');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('6');
|
||||
$task->left->range('3');
|
||||
$task->consumed->range('3');
|
||||
$task->gen(10);
|
||||
|
||||
|
||||
$bug = zdTable('bug');
|
||||
$bug->id->range('1-3,273');
|
||||
$bug->title->range('1-4')->prefix('Bug');
|
||||
$bug->project->range('1,2,1');
|
||||
$bug->execution->range('3,4,5');
|
||||
$bug->task->range('1-10');
|
||||
$bug->status->range('wait,doing');
|
||||
$bug->gen(4);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -16,20 +48,19 @@ Bug转任务统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$import = array('273' => '273', '3' => '3', '2' => '2', '1' => '1');
|
||||
$id = array('273' => '273', '3' => '3', '2' => '2', '1' => '1');
|
||||
$pri = array('273' => '1', '3' => '1', '2' => '2', '1' => '2');
|
||||
$errorestimate = array('273' => '2020-03-01', '3' => '2020-03-02', '2' => '2020-03-02', '1' => '2020-03-03');
|
||||
$estStarted = array('273' => '2020-03-10', '3' => '2020-03-12', '2' => '2020-03-12', '1' => '2020-03-13');
|
||||
$estimate = array('273' => '7', '3' => '6', '2' => '5', '1' => '4');
|
||||
$deadline = array('273' => '2020-03-17', '3' => '2020-03-17', '2' => '2020-03-18', '1' => '2020-03-19');
|
||||
$count = array('0','1');
|
||||
|
||||
$errorimport = array('import' => $import, 'id' => $id, 'pri' => $pri, 'estimate' => $errorestimate, 'deadline' => $deadline);
|
||||
$importBugs = array('import' => $import, 'id' => $id, 'pri' => $pri, 'estimate' => $estimate, 'deadline' => $deadline);
|
||||
$errorimport = array('import' => $import, 'id' => $id, 'pri' => $pri, 'estimate' => $errorestimate, 'deadline' => $deadline, 'estStarted' => $estStarted);
|
||||
$importBugs = array('import' => $import, 'id' => $id, 'pri' => $pri, 'estimate' => $estimate, 'deadline' => $deadline, 'estStarted' => $estStarted);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->importBugTest($executionIDList[0], $count[0], $errorimport)) && p('message:0') && e('最初预计"必须为数字'); // 预计输入错误
|
||||
r($execution->importBugTest($executionIDList[0], $count[1], $importBugs)) && p() && e('4'); // Bug转任务统计
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,28 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
|
||||
$execution = zdTable('project');
|
||||
$execution->id->range('1-5');
|
||||
$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3');
|
||||
$execution->type->range('project{2},sprint,stage,kanban');
|
||||
$execution->status->range('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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$task->execution->range('3');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('1-10');
|
||||
$task->left->range('1-10');
|
||||
$task->consumed->range('1-10');
|
||||
$task->gen(10);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,24 +32,22 @@ title=测试executionModel->importTaskTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行导入任务 >> 91,641
|
||||
瀑布执行导入任务 >> 32,672
|
||||
敏捷执行导入任务统计 >> 5
|
||||
瀑布执行导入任务统计 >> 5
|
||||
敏捷执行导入任务 >> 1,3
|
||||
瀑布执行导入任务 >> 2,4
|
||||
敏捷执行导入任务统计 >> 6
|
||||
瀑布执行导入任务统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('641','672');
|
||||
$sprintTaskIDlist = array('181', '91', '871', '872');
|
||||
$stageTaskIDlist = array('122', '32', '694', '695');
|
||||
$executionIDList = array('3','4');
|
||||
$sprintTaskIDlist = array('1', '3', '5', '7');
|
||||
$stageTaskIDlist = array('2', '4', '6', '8');
|
||||
$sprintTasks = array('tasks' => $sprintTaskIDlist);
|
||||
$stageTasks = array('tasks' => $stageTaskIDlist);
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->importTaskTest($executionIDList[0], $count[0], $sprintTasks)) && p('0:id,execution') && e('91,641'); // 敏捷执行导入任务
|
||||
r($execution->importTaskTest($executionIDList[1], $count[0], $stageTasks)) && p('0:id,execution') && e('32,672'); // 瀑布执行导入任务
|
||||
r($execution->importTaskTest($executionIDList[0], $count[1], $sprintTasks)) && p() && e('5'); // 敏捷执行导入任务统计
|
||||
r($execution->importTaskTest($executionIDList[1], $count[1], $stageTasks)) && p() && e('5'); // 瀑布执行导入任务统计
|
||||
|
||||
$db->restoreDB();
|
||||
r($execution->importTaskTest($executionIDList[0], $count[0], $sprintTasks)) && p('0:id,execution') && e('1,3'); // 敏捷执行导入任务
|
||||
r($execution->importTaskTest($executionIDList[1], $count[0], $stageTasks)) && p('0:id,execution') && e('2,4'); // 瀑布执行导入任务
|
||||
r($execution->importTaskTest($executionIDList[0], $count[1], $sprintTasks)) && p() && e('6'); // 敏捷执行导入任务统计
|
||||
r($execution->importTaskTest($executionIDList[1], $count[1], $stageTasks)) && p() && e('4'); // 瀑布执行导入任务统计
|
||||
|
||||
@@ -2,7 +2,40 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->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'); // 看板执行关联用例统计
|
||||
|
||||
@@ -2,7 +2,51 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->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('projectstory');
|
||||
$projectstory->project->range('3-5');
|
||||
$projectstory->product->range('1-3');
|
||||
$projectstory->story->range('4,324,364');
|
||||
$projectstory->gen(3);
|
||||
|
||||
$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->gen(3);
|
||||
|
||||
$projectproduct = zdTable('projectproduct');
|
||||
$projectproduct->project->range('3-5');
|
||||
$projectproduct->product->range('1-3');
|
||||
$projectproduct->plan->range('1-3');
|
||||
$projectproduct->gen(3);
|
||||
|
||||
$stroy = zdTable('story');
|
||||
$stroy->id->range('4,324,364');
|
||||
$stroy->title->range('1-3')->prefix('需求');
|
||||
$stroy->type->range('story');
|
||||
$stroy->status->range('active');
|
||||
$stroy->gen(3);
|
||||
|
||||
$cell = zdTable('kanbancell');
|
||||
$cell->id->range('1');
|
||||
$cell->kanban->range('5');
|
||||
$cell->gen(1);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,19 +55,17 @@ title=测试executionModel->linkStoryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联需求 >> 2
|
||||
敏捷执行关联需求 >> 1
|
||||
瀑布执行关联需求 >> 0
|
||||
看板执行关联需求 >> 0
|
||||
看板执行关联需求 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$productIDList = array('1', '0', '51');
|
||||
$planIDList = array('100', '0', '52');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$productIDList = array('1', '0', '3');
|
||||
$planIDList = array('1', '0', '3');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->linkStoriesTest($executionIDList[0], $productIDList[0], $planIDList[0])) && p() && e('2'); // 敏捷执行关联需求
|
||||
r($execution->linkStoriesTest($executionIDList[0], $productIDList[0], $planIDList[0])) && p() && e('1'); // 敏捷执行关联需求
|
||||
r($execution->linkStoriesTest($executionIDList[1], $productIDList[1], $planIDList[1])) && p() && e('0'); // 瀑布执行关联需求
|
||||
r($execution->linkStoriesTest($executionIDList[2], $productIDList[2], $planIDList[2])) && p() && e('0'); // 看板执行关联需求
|
||||
|
||||
$db->restoreDB();
|
||||
r($execution->linkStoriesTest($executionIDList[2], $productIDList[2], $planIDList[2])) && p() && e('1'); // 看板执行关联需求
|
||||
|
||||
@@ -2,7 +2,45 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->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('projectstory');
|
||||
$projectstory->project->range('3-5');
|
||||
$projectstory->product->range('1-3');
|
||||
$projectstory->story->range('4,324,364');
|
||||
$projectstory->gen(3);
|
||||
|
||||
$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->gen(3);
|
||||
|
||||
$stroy = zdTable('story');
|
||||
$stroy->id->range('4,324,364');
|
||||
$stroy->title->range('1-3')->prefix('需求');
|
||||
$stroy->type->range('story');
|
||||
$stroy->status->range('active');
|
||||
$stroy->gen(3);
|
||||
|
||||
$cell = zdTable('kanbancell');
|
||||
$cell->id->range('1');
|
||||
$cell->kanban->range('5');
|
||||
$cell->gen(1);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,28 +49,26 @@ title=测试executionModel->linkStoryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联需求 >> 101,1,4
|
||||
瀑布执行关联需求 >> 131,1,4
|
||||
看板执行关联需求 >> 161,1,4
|
||||
敏捷执行关联需求统计 >> 1
|
||||
瀑布执行关联需求统计 >> 1
|
||||
看板执行关联需求统计 >> 1
|
||||
敏捷执行关联需求 >> 3,1,4
|
||||
瀑布执行关联需求 >> 4,1,4
|
||||
看板执行关联需求 >> 5,1,4
|
||||
敏捷执行关联需求统计 >> 3
|
||||
瀑布执行关联需求统计 >> 3
|
||||
看板执行关联需求统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$stories = array('4', '324', '364');
|
||||
$products = array('4' => '1', '324' => '81', '364' => '91');
|
||||
$products = array('4' => '1', '324' => '2', '364' => '3');
|
||||
$count = array('0','1');
|
||||
|
||||
$story = array('stories' => $stories, 'products' => $products);
|
||||
|
||||
$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('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();
|
||||
r($execution->linkStoryTest($executionIDList[0], $count[0], $story)) && p('0:project,product,story') && e('3,1,4'); // 敏捷执行关联需求
|
||||
r($execution->linkStoryTest($executionIDList[1], $count[0], $story)) && p('0:project,product,story') && e('4,1,4'); // 瀑布执行关联需求
|
||||
r($execution->linkStoryTest($executionIDList[2], $count[0], $story)) && p('0:project,product,story') && e('5,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'); // 看板执行关联需求统计
|
||||
|
||||
@@ -2,7 +2,18 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
|
||||
$execution = zdTable('project');
|
||||
$execution->id->range('1-6');
|
||||
$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3,迭代4');
|
||||
$execution->type->range('project{2},sprint,stage,kanban,sprint');
|
||||
$execution->status->range('doing{5},wait');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->grade->range('2{2},1{4}');
|
||||
$execution->path->range('1,2,`1,3`,`1,4`,`2,5`,`1,6`')->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(6);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -18,11 +29,10 @@ wait执行延期 >> days,,5
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '102', '132', '162');
|
||||
$executionIDList = array('6', '3', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->putoffTest($executionIDList[0])) && p('0:field,old,new') && e('days,,5'); // wait执行延期
|
||||
r($execution->putoffTest($executionIDList[1])) && p('0:field,old,new') && e('status,doing,wait'); // 敏捷执行延期
|
||||
r($execution->putoffTest($executionIDList[2])) && p('0:field,old,new') && e('status,doing,wait'); // 瀑布阶段延期
|
||||
r($execution->putoffTest($executionIDList[3])) && p('0:field,old,new') && e('status,doing,wait'); // 看板执行延期
|
||||
$db->restoreDB();
|
||||
@@ -2,6 +2,41 @@
|
||||
<?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-5');
|
||||
$execution->name->range('项目1,项目2,迭代1,迭代2,迭代3');
|
||||
$execution->type->range('project{2},sprint,stage,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('projectstory');
|
||||
$projectstory->project->range('5');
|
||||
$projectstory->product->range('1');
|
||||
$projectstory->story->range('3,5,7');
|
||||
$projectstory->gen(3);
|
||||
|
||||
$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->gen(3);
|
||||
|
||||
$stroy = zdTable('story');
|
||||
$stroy->id->range('3,5,7');
|
||||
$stroy->title->range('1-3')->prefix('需求');
|
||||
$stroy->type->range('story');
|
||||
$stroy->product->range('1');
|
||||
$stroy->status->range('active');
|
||||
$stroy->gen(3);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,15 +45,15 @@ title=测试executionModel->saveKanbanData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
保存执行162看板数据 >> 246
|
||||
保存执行162看板空数据 >> empty
|
||||
保存执行5看板数据 >> 3
|
||||
保存执行5看板空数据 >> empty
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
$executionID = 162;
|
||||
$executionID = 5;
|
||||
$emptyData = array();
|
||||
|
||||
r($execution->saveKanbanDataTest($executionID)) && p('story:0') && e('246'); //保存执行162看板数据
|
||||
r($execution->saveKanbanDataTest($executionID, $emptyData)) && p('') && e('empty'); //保存执行162看板空数据
|
||||
r($execution->saveKanbanDataTest($executionID)) && p('story:0') && e('3'); //保存执行162看板数据
|
||||
r($execution->saveKanbanDataTest($executionID, $emptyData)) && p('') && e('empty'); //保存执行162看板空数据
|
||||
|
||||
Reference in New Issue
Block a user