Add execution

This commit is contained in:
liyang
2022-03-11 09:24:33 +08:00
parent c98a11da7a
commit 681ac8cd7d
6 changed files with 214 additions and 13 deletions
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getCanCopyObjectsTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$projectIDList = array('11', '45', '71');
$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'); // 看板项目数据统计
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getMembers2ImportTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$executionID = '101';
$accountList = array('test7', 'test82');
$allAccountList = array('test82', 'po82', 'user92');
$count = array('0','1');
$execution = new executionTest();
r($execution->getMembers2ImportTest($executionID, $accountList, $count[0])) && p('po82:account,role') && e('po82,研发'); // 正常数据查询
r($execution->getMembers2ImportTest($executionID, $allAccountList, $count[0])) && p() && e('无数据'); // 无效数据查询
r($execution->getMembers2ImportTest($executionID, $accountList, $count[1])) && p() && e('2'); // 正常数据查询统计
+6 -9
View File
@@ -19,14 +19,11 @@ pid=1
*/
$teamList = array('test2', 'test12', 'test15');
$begin = 'test2';
$end = 'test17';
$count = array('0','1');
$taskID = 901;
$begin = 'admin';
$end = 'user92';
$execution = new executionTest();
var_dump($execution->getTeamSkipTest($teamList, $teamList[0], $end, $count[0]));die;
r($execution->getTeamSkipTest($teamList, $begin, $end, $count[0])) && p('0:root,account,realname') && e('101,po82,研发主管82');// 批量查询敏捷执行team
r($execution->getTeamSkipTest($executionIDList, $count[0])[$executionIDList[1]]) && p('0:root,account,realname') && e('131,test22,开发22'); // 批量查询瀑布执行team
r($execution->getTeamSkipTest($executionIDList, $count[0])[$executionIDList[2]]) && p('0:root,account,realname') && e('161,test52,开发52'); // 批量查询看板执行team
r($execution->getTeamSkipTest($executionIDList, $count[1])) && p() && e('3'); // 批量查询执行team统计
r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('admin:root,account,role') && e('901,admin,研发'); // 正常跳过
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
su('admin');
/**
title=测试executionModel->getTeams2ImportTest();
cid=1
pid=1
敏捷执行关联用例 >> 101,1,1
瀑布执行关联用例 >> 131,43,169
看板执行关联用例 >> 161,68,269
敏捷执行关联用例统计 >> 4
瀑布执行关联用例统计 >> 4
看板执行关联用例统计 >> 4
*/
$executionID = '101';
$accountList = array('test7', 'test82');
$count = array('0','1');
$execution = new executionTest();
r($execution->getTeams2ImportTest($accountList[0], $executionID, $count[0])) && p() && e('无数据'); // 无效数据查询
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[0])) && p('191') && e('迭代91'); // 正常数据查询
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[1])) && p() && e('1'); // 正常数据查询统计