Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into zenops_46
This commit is contained in:
@@ -385,7 +385,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('bugModule', $lang->bug->module);?>
|
||||
<?php if(empty($product->shadow)) js::set('bugModule', $lang->bug->module);?>
|
||||
<?php js::set('bugExecution', $projectModel == 'kanban' ? $lang->bug->kanban : $lang->bug->execution);?>
|
||||
<script>
|
||||
$(function(){parent.$('body.hide-modal-close').removeClass('hide-modal-close');})
|
||||
|
||||
@@ -300,7 +300,7 @@ class product extends control
|
||||
}
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
$this->loadModel('common')->saveQueryCondition($queryCondition, 'story', ($browseType != 'bysearch' and $browseType != 'reviewbyme' and !$isProjectStory));
|
||||
$this->loadModel('common')->saveQueryCondition($queryCondition, 'story', (strpos('bysearch,reviewbyme,bymodule', $browseType) === false and !$isProjectStory));
|
||||
|
||||
if(!empty($stories)) $stories = $this->story->mergeReviewer($stories);
|
||||
|
||||
|
||||
@@ -758,7 +758,14 @@ class productplan extends control
|
||||
$this->productplan->unlinkStory($storyID, $planID);
|
||||
$this->loadModel('action')->create('productplan', $planID, 'unlinkstory', '', $storyID);
|
||||
|
||||
return print(js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story"), 'parent'));
|
||||
if($this->session->storyList)
|
||||
{
|
||||
return print(js::locate($this->session->storyList, 'parent'));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::locate($this->createLink('productplan', 'view', "planID=$planID&type=story"), 'parent'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#budgetUnit {border-left: 0px;}
|
||||
#projectName {display: inline-block; width: 32%;}
|
||||
.productsBox a {border-radius: 2px !important;}
|
||||
.productsBox .required:after {right: -9.5px !important;}
|
||||
.productsBox .required:after {right: -12px !important; top: 10px !important;}
|
||||
.productsBox .addProduct {padding-left: 0px !important;}
|
||||
.productsBox .addProduct.required:after {right: -1px !important;}
|
||||
.productsBox .input-group-addon > div {display: inline-block !important;}
|
||||
|
||||
@@ -253,6 +253,7 @@ class repoModel extends model
|
||||
public function update($id)
|
||||
{
|
||||
$repo = $this->getRepoByID($id);
|
||||
if($repo->client != $this->post->client and !$this->checkClient()) return false;
|
||||
if(!$this->checkConnection()) return false;
|
||||
|
||||
$isPipelineServer = in_array(strtolower($this->post->SCM), $this->config->repo->gitServiceList) ? true : false;
|
||||
@@ -289,9 +290,6 @@ class repoModel extends model
|
||||
$data->prefix = '';
|
||||
}
|
||||
|
||||
if($data->client != $repo->client and !$this->checkClient()) return false;
|
||||
if(!$this->checkConnection()) return false;
|
||||
|
||||
if($data->encrypt == 'base64') $data->password = base64_encode($data->password);
|
||||
$this->dao->update(TABLE_REPO)->data($data, $skip = 'serviceToken')
|
||||
->batchCheck($this->config->repo->edit->requiredFields, 'notempty')
|
||||
@@ -314,6 +312,7 @@ class repoModel extends model
|
||||
$this->dao->delete()->from(TABLE_REPOFILES)->where('repo')->eq($id)->exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1391,10 +1390,10 @@ class repoModel extends model
|
||||
if($clientVersionFile)
|
||||
{
|
||||
session_start();
|
||||
$this->session->set('clientVersionFile', $clientVersionFile);
|
||||
$this->session->set('clientVersionFile', '');
|
||||
session_write_close();
|
||||
|
||||
if(file_exists($clientVersionFile)) unlink($clientVersionFile);
|
||||
if(file_exists($clientVersionFile)) @unlink($clientVersionFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1401,7 +1401,7 @@ class story extends control
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$projectID = (isset($story->projects[$this->session->project]) || empty($story->projects)) ? $this->session->project : key($story->projects);
|
||||
$projectID = $param ? $param : $this->session->project;
|
||||
$this->loadModel('project')->setMenu($projectID);
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
@@ -3069,8 +3069,8 @@ class story extends control
|
||||
|
||||
/**
|
||||
* Ajax get story pairs.
|
||||
*
|
||||
* @param int $storyID
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
+13
-22
@@ -47,30 +47,14 @@ class storyModel extends model
|
||||
if($setImgSize) $story->spec = $this->file->setImgSize($story->spec);
|
||||
if($setImgSize) $story->verify = $this->file->setImgSize($story->verify);
|
||||
|
||||
$projects = $this->dao->select('t1.project, t2.name, t2.status, t2.type, t2.multiple, t2.project AS parentProject')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
$story->executions = $this->dao->select('t1.project, t2.name, t2.status, t2.type, t2.multiple')->from(TABLE_PROJECTSTORY)->alias('t1')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t2.type')->in('sprint,stage,kanban,project')
|
||||
->where('t2.type')->in('sprint,stage,kanban')
|
||||
->beginIF($story->twins)->andWhere('t1.story')->in(ltrim($story->twins, ',') . $story->id)
|
||||
->beginIF(!$story->twins)->andWhere('t1.story')->in($story->id)
|
||||
->orderBy('t1.`order` DESC')
|
||||
->fetchAll('project');
|
||||
|
||||
$story->projects = array();
|
||||
$story->executions = array();
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if($project->type == 'project')
|
||||
{
|
||||
$story->projects[$project->project] = $project->project;
|
||||
}
|
||||
else
|
||||
{
|
||||
$story->executions[$project->project] = $project;
|
||||
|
||||
if(!$project->multiple) $story->projects[$project->parentProject] = $project->parentProject;
|
||||
}
|
||||
}
|
||||
|
||||
$story->tasks = $this->dao->select('id, name, assignedTo, execution, project, status, consumed, `left`,type')->from(TABLE_TASK)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF($story->twins)->andWhere('story')->in(ltrim($story->twins, ',') . $story->id)
|
||||
@@ -4990,13 +4974,20 @@ class storyModel extends model
|
||||
$tab = $this->app->tab;
|
||||
$executionID = empty($execution) ? $this->session->execution : $execution->id;
|
||||
$account = $this->app->user->account;
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=0&storyType=$story->type");
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=&storyType=$story->type");
|
||||
$canView = common::hasPriv($story->type, 'view', null, "storyType=$story->type");
|
||||
|
||||
if($tab == 'project' and $this->session->multiple)
|
||||
if($tab == 'project')
|
||||
{
|
||||
$storyLink = helper::createLink('projectstory', 'view', "storyID=$story->id&project={$this->session->project}");
|
||||
$canView = common::hasPriv('projectstory', 'view');
|
||||
if($this->session->multiple)
|
||||
{
|
||||
$storyLink = helper::createLink('projectstory', 'view', "storyID=$story->id&project={$this->session->project}");
|
||||
$canView = common::hasPriv('projectstory', 'view');
|
||||
}
|
||||
else
|
||||
{
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m={$this->session->project}&storyType=$story->type");
|
||||
}
|
||||
}
|
||||
elseif($tab == 'execution')
|
||||
{
|
||||
|
||||
@@ -218,13 +218,13 @@
|
||||
<?php if(!$product->shadow):?>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->story->product;?></th>
|
||||
<td><?php echo html::a($this->createLink('product', 'view', "productID=$story->product"), $product->name);?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'view', "productID=$story->product"), $product->name, '', "data-app='product'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($product->type != 'normal'):?>
|
||||
<tr>
|
||||
<th class='w-90px'><?php echo $lang->product->branch;?></th>
|
||||
<td><?php common::printLink('product', 'browse', "productID=$story->product&branch=$story->branch", $branches[$story->branch]);?></td>
|
||||
<td><?php common::printLink('product', 'browse', "productID=$story->product&branch=$story->branch", $branches[$story->branch], '', "data-app='product'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
@@ -476,7 +476,7 @@
|
||||
{
|
||||
if(!isset($executions[$task->execution])) continue;
|
||||
$execution = isset($story->executions[$task->execution]) ? $story->executions[$task->execution] : '';
|
||||
$executionLink = !empty($execution->multiple) ? $this->createLink('execution', 'view', "executionID=$task->execution") : $this->createLink('project', 'view', "executionID=$task->project");
|
||||
$executionLink = !empty($execution->multiple) ? $this->createLink('execution', 'view', "executionID=$task->execution") : $this->createLink('project', 'view', "projectID=$task->project");
|
||||
$executionName = $executions[$task->execution];
|
||||
$taskInfo = $task->id . ' <span class="label label-success label-outline">' . $this->lang->task->statusList[$task->status] . '</span> ' . $task->name;
|
||||
$class = isonlybody() ? 'showinonlybody' : 'iframe';
|
||||
@@ -486,7 +486,10 @@
|
||||
}
|
||||
foreach($story->executions as $executionID => $execution)
|
||||
{
|
||||
if(!isset($executions[$executionID]) or isset($story->tasks[$executionID])) continue;
|
||||
if(!$execution->multiple) continue;
|
||||
if(!isset($executions[$executionID])) continue;
|
||||
if(isset($story->tasks[$executionID])) continue;
|
||||
|
||||
$execName = ($execution->type == 'kanban' and isonlybody()) ? $executions[$executionID] : html::a($this->createLink('execution', 'view', "executionID=$executionID"), $executions[$executionID], '', "class='text-muted'");
|
||||
echo "<li title='$execution->name'>" . $execName . '</li>';
|
||||
}
|
||||
|
||||
@@ -228,8 +228,10 @@ class task extends control
|
||||
|
||||
if($this->post->after == 'continueAdding')
|
||||
{
|
||||
$storyParam = $this->post->story ? $this->post->story : '';
|
||||
|
||||
$response['message'] = $this->lang->task->successSaved . $this->lang->task->afterChoices['continueAdding'];
|
||||
$response['locate'] = $this->createLink('task', 'create', "executionID=$executionID&storyID={$this->post->story}&moduleID=$moduleID");
|
||||
$response['locate'] = $this->createLink('task', 'create', "executionID=$executionID&storyID={$storyParam}&moduleID=$moduleID");
|
||||
return $this->send($response);
|
||||
}
|
||||
elseif($this->post->after == 'toTaskList')
|
||||
|
||||
@@ -276,7 +276,7 @@ foreach(explode(',', $config->testcase->create->requiredFields) as $field)
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php js::set('caseModule', $lang->testcase->module)?>
|
||||
<?php if(!$hiddenProduct) js::set('caseModule', $lang->testcase->module)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
foreach($modulePath as $key => $module)
|
||||
{
|
||||
if($tab == 'qa' || $tab == 'ops' || $tab == 'product')
|
||||
if($tab == 'qa' || $tab == 'ops')
|
||||
{
|
||||
if($isLibCase)
|
||||
{
|
||||
|
||||
@@ -509,6 +509,8 @@ class transferModel extends model
|
||||
|
||||
$modelData = $this->processDate($modelData);
|
||||
if(isset($fields['id'])) unset($fields['id']);
|
||||
$this->session->set($model . 'TemplateFields', implode(',', array_keys($fields)));
|
||||
|
||||
return $modelData;
|
||||
}
|
||||
|
||||
@@ -600,7 +602,7 @@ class transferModel extends model
|
||||
$values = $valuePairs;
|
||||
if(reset($values))
|
||||
{
|
||||
if(current($values) or (current($values) == 0)) $values[0] = '';
|
||||
if(current($values) or (current($values) == 0)) $values = [0 => ''] + $values;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -224,13 +224,13 @@ class tutorialModel extends model
|
||||
$execution->leftTasks = '—';
|
||||
$execution->teamMembers = array_keys($this->getTeamMembers());
|
||||
$execution->teamCount = count($execution->teamMembers);
|
||||
$execution->hasProduct = '';
|
||||
$execution->hasProduct = '1';
|
||||
$execution->multiple = '';
|
||||
$execution->order = 1;
|
||||
$execution->burns = array('');
|
||||
$execution->type = 'sprint';
|
||||
$execution->projectName = '';
|
||||
$execution->projectModel = '';
|
||||
$execution->burns = array('');
|
||||
$execution->type = 'sprint';
|
||||
$execution->projectName = '';
|
||||
$execution->projectModel = '';
|
||||
|
||||
if($browseType and $browseType != 'all') $execution->name .= '-' . $browseType; // Fix bug #21096
|
||||
|
||||
@@ -354,7 +354,7 @@ class tutorialModel extends model
|
||||
$execution->fluidBoard = 0;
|
||||
$execution->hours = $hours;
|
||||
$execution->burns = array(35, 35);
|
||||
$execution->hasProduct = '';
|
||||
$execution->hasProduct = '1';
|
||||
$execution->multiple = '';
|
||||
return $execution;
|
||||
}
|
||||
|
||||
@@ -584,7 +584,7 @@ class upgradeModel extends model
|
||||
$this->execSQL($xuanxuanSql);
|
||||
}
|
||||
break;
|
||||
case '18_0_beta2':
|
||||
case '18_0_beta3':
|
||||
$this->updateMyBlocks();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1957,7 +1957,11 @@ class userModel extends model
|
||||
/* Get product and project relation. */
|
||||
$projectProducts = array();
|
||||
$productProjects = array();
|
||||
$stmt = $this->dao->select('project,product')->from(TABLE_PROJECTPRODUCT)->where('product')->in(array_keys($allProducts))->query();
|
||||
$stmt = $this->dao->select('t1.project, t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->in(array_keys($allProducts))
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->query();
|
||||
while($projectProduct = $stmt->fetch())
|
||||
{
|
||||
$productProjects[$projectProduct->product][$projectProduct->project] = $projectProduct->project;
|
||||
|
||||
@@ -13,6 +13,34 @@ class executionTest
|
||||
$this->objectModel = $tester->loadModel('execution');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test save state.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param array $executions
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function saveStateTest($executionID = 0, $executions = array())
|
||||
{
|
||||
return $this->objectModel->saveState($executionID, $executions);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the select code of executions.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function selectTest($executionID, $currentModule, $currentMethod)
|
||||
{
|
||||
$executions = $this->objectModel->getPairs();
|
||||
return $this->objectModel->select($executions, $executionID, 0, $currentModule, $currentMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the privilege.
|
||||
*
|
||||
@@ -58,7 +86,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function createObject($param = array(), $project = '', $dayNum = '', $days = '')
|
||||
public function createTest($param = array(), $project = '', $dayNum = '', $days = '')
|
||||
{
|
||||
$products = array('');
|
||||
$plans = array('');
|
||||
@@ -70,7 +98,7 @@ class executionTest
|
||||
$createFields = array('project' => $project, 'name' => '', 'code' => '', 'begin' => $beginData, 'end' => $endData,
|
||||
'lifetime' => 'short', 'status' => 'wait', 'products' => $products, 'delta' => $delta, 'days' => $days,
|
||||
'plans' => $plans, 'team' => '', 'teams' => '0', 'PO' => '', 'QD' => '', 'PM' => '', 'RD' => '', 'whitelist' => '',
|
||||
'desc' => '', 'acl' => 'private');
|
||||
'desc' => '', 'acl' => 'private', 'percent' => '0');
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
@@ -371,7 +399,7 @@ class executionTest
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPairsTest($projectID,$count)
|
||||
public function getPairsTest($projectID, $count)
|
||||
{
|
||||
$object = $this->objectModel->getPairs($projectID);
|
||||
|
||||
@@ -808,7 +836,7 @@ class executionTest
|
||||
}
|
||||
elseif($count == "1")
|
||||
{
|
||||
return count($object);
|
||||
return isset($object[$productID]) ? count($object[$productID]) : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1600,19 +1628,18 @@ class executionTest
|
||||
}
|
||||
|
||||
/**
|
||||
* function fixFirst test by execution
|
||||
* Function fixFirst test by execution.
|
||||
*
|
||||
* @param string $executionID
|
||||
* @param array $param
|
||||
* @param string $date
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function fixFirstTest($executionID, $param = array())
|
||||
public function fixFirstTest($executionID, $param = array(), $date)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$date = date('Y-m-d');
|
||||
|
||||
$createFields = array('estimate' => '');
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
@@ -1652,15 +1679,8 @@ class executionTest
|
||||
*/
|
||||
public function getBurnDataFlotTest($executionID = 0)
|
||||
{
|
||||
$date = date("Y-m-d");
|
||||
$object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left');
|
||||
|
||||
$todayData = array();
|
||||
if(isset($object[$date]))
|
||||
{
|
||||
foreach($object[$date] as $key => $value) $todayData[$key] = $value;
|
||||
}
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
$error = dao::getError();
|
||||
@@ -1668,7 +1688,7 @@ class executionTest
|
||||
}
|
||||
else
|
||||
{
|
||||
return sizeof($todayData);
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2242,7 +2262,7 @@ class executionTest
|
||||
else
|
||||
{
|
||||
if(count((array)$object['closed']) == 0 and count((array)$object['nokey']) == 0) return 'empty';
|
||||
return $object;
|
||||
return count($object['nokey']->tasks);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2379,7 +2399,7 @@ class executionTest
|
||||
if(count($users) > 0) su($users[0]);
|
||||
|
||||
global $tester;
|
||||
return $tester->app->user->view->sprints;
|
||||
return ",{$tester->app->user->view->sprints},";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2396,6 +2416,37 @@ class executionTest
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
return $result;
|
||||
return $result > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test set menu.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function setMenuTest($executionID = 0)
|
||||
{
|
||||
$execution = $this->objectModel->getByID($executionID);
|
||||
if(empty($execution)) return '0';
|
||||
|
||||
$this->objectModel->setMenu($executionID);
|
||||
|
||||
global $lang;
|
||||
return strip_tags($lang->switcherMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get switcher.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @param string $method
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getSwitcherTest($executionID = 0, $method = '')
|
||||
{
|
||||
return $this->objectModel->getSwitcher($executionID, 'execution', $method);
|
||||
}
|
||||
}
|
||||
|
||||
+143
-10
@@ -237,7 +237,7 @@ class userTest
|
||||
public function createUserTest($params = array())
|
||||
{
|
||||
$_POST = $params;
|
||||
$_POST['verifyPassword'] = 'e79f8fb9726857b212401e42e5b7e18b';
|
||||
$_POST['verifyPassword'] = 'bac0bbaaf7192f219bebd5387e88c5d7';
|
||||
|
||||
$userID = $this->objectModel->create();
|
||||
unset($_POST);
|
||||
@@ -261,7 +261,11 @@ class userTest
|
||||
public function batchCreateUserTest($params = array())
|
||||
{
|
||||
$_POST = $params;
|
||||
$_POST['verifyPassword'] = 'e79f8fb9726857b212401e42e5b7e18b';
|
||||
$_POST['verifyPassword'] = 'bac0bbaaf7192f219bebd5387e88c5d7';
|
||||
$_POST['userType'] = 'inside';
|
||||
|
||||
global $tester;
|
||||
$tester->config->user->batchCreate = count($_POST['account']);
|
||||
|
||||
$userIDList = $this->objectModel->batchCreate();
|
||||
unset($_POST);
|
||||
@@ -290,7 +294,7 @@ class userTest
|
||||
public function updateUserTest($userID, $params = array())
|
||||
{
|
||||
$_POST = $params;
|
||||
$_POST['verifyPassword'] = 'e79f8fb9726857b212401e42e5b7e18b';
|
||||
$_POST['verifyPassword'] = 'bac0bbaaf7192f219bebd5387e88c5d7';
|
||||
|
||||
$this->objectModel->update($userID);
|
||||
unset($_POST);
|
||||
@@ -315,9 +319,9 @@ class userTest
|
||||
public function batchEditUserTest($params = array())
|
||||
{
|
||||
$_POST = $params;
|
||||
$_POST['verifyPassword'] = 'e79f8fb9726857b212401e42e5b7e18b';
|
||||
$_POST['verifyPassword'] = 'bac0bbaaf7192f219bebd5387e88c5d7';
|
||||
|
||||
$this->objectModel->batchEdit($params);
|
||||
$this->objectModel->batchEdit();
|
||||
unset($_POST);
|
||||
|
||||
if(dao::isError())
|
||||
@@ -526,6 +530,50 @@ class userTest
|
||||
return $myObjects;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test clean user locked time.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function cleanLockedTest($account)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$this->objectModel->cleanLocked($account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
$locked = $tester->dao->select('locked')->from(TABLE_USER)->where('account')->eq($account)->fetch('locked');
|
||||
|
||||
$result = $locked === '0000-00-00 00:00:00' ? 'success' : 'fail';
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test unbind Ranzhi.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function unbindTest($account)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
$this->objectModel->unbind($account);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
|
||||
$ranzhi = $tester->dao->select('ranzhi')->from(TABLE_USER)->where('account')->eq($account)->fetch('ranzhi');
|
||||
|
||||
$result = empty($ranzhi) ? 'success' : 'fail';
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get contact list.
|
||||
*
|
||||
@@ -539,7 +587,8 @@ class userTest
|
||||
$contacts = $this->objectModel->getContactLists($account, $params);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
return $contacts;
|
||||
|
||||
return $contacts ? $contacts : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -600,9 +649,12 @@ class userTest
|
||||
*/
|
||||
public function createContactListTest($listName = '', $userList = array())
|
||||
{
|
||||
$listID = $this->objectModel->createContactList($listName, $userList);
|
||||
ob_start();
|
||||
$listID = $this->objectModel->createContactList($listName, $userList);
|
||||
$message = ob_get_clean();
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
if($message) return array('message' => array('listName' => array(1)));
|
||||
if(dao::isError()) return array('message' => dao::getError());
|
||||
return $this->objectModel->getContactListByID($listID);
|
||||
}
|
||||
|
||||
@@ -619,7 +671,7 @@ class userTest
|
||||
{
|
||||
$this->objectModel->updateContactList($listID, $listName, $userList);
|
||||
|
||||
if(dao::isError()) return dao::getError();
|
||||
if(dao::isError()) return array('message' => dao::getError());
|
||||
return $this->objectModel->getContactListByID($listID);
|
||||
}
|
||||
|
||||
@@ -639,7 +691,7 @@ class userTest
|
||||
}
|
||||
|
||||
/**
|
||||
* Test delete a contact list.
|
||||
* Test get user data in json.
|
||||
*
|
||||
* @param object $user
|
||||
* @access public
|
||||
@@ -971,4 +1023,85 @@ class userTest
|
||||
$string = $this->objectModel->setUserList($users, $account);
|
||||
return strpos($string, "<option value='$account' selected='selected'") !== false ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update session random.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function updateSessionRandomTest()
|
||||
{
|
||||
global $tester;
|
||||
$oldRandom = $tester->session->rand;
|
||||
$newRandom = $this->objectModel->updateSessionRandom();
|
||||
|
||||
return $oldRandom != $newRandom ? 1 : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Judge a user is logon or not.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function isLogonTest()
|
||||
{
|
||||
return $this->objectModel->isLogon();
|
||||
}
|
||||
|
||||
/**
|
||||
* Plus the fail times.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function failPlusTest($account)
|
||||
{
|
||||
global $tester;
|
||||
$this->objectModel->failPlus($account);
|
||||
$failCounts = $tester->dao->select('fails')->from(TABLE_USER)->where('account')->eq($account)->fetch('fails');
|
||||
|
||||
return $failCounts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plus the fail times.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function checkLockedTest($account)
|
||||
{
|
||||
global $tester;
|
||||
$result = $this->objectModel->checkLocked($account);
|
||||
|
||||
$result = $result ? 'locked' : 'unlocked';
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Identify user by PHP_AUTH_USER.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function identifyByPhpAuthTest()
|
||||
{
|
||||
return $this->objectModel->identifyByPhpAuth();
|
||||
}
|
||||
|
||||
/**
|
||||
* Identify user by cookie.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function identifyByCookieTest()
|
||||
{
|
||||
return $this->objectModel->identifyByCookie();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel::accessDenied();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
权限不足跳转 >> html
|
||||
|
||||
*/
|
||||
|
||||
global $tester;
|
||||
$tester->loadModel('execution');
|
||||
ob_start();
|
||||
$tester->execution->accessDenied();
|
||||
$result = ob_get_clean();
|
||||
|
||||
r(substr($result, 1, 4)) && p() && e('html'); // 权限不足跳转
|
||||
@@ -2,9 +2,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->activateTest();
|
||||
@@ -20,15 +31,14 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('105', '136', '165', '106', '107', '708');
|
||||
$executionIDList = array(1,2,3,4,5);
|
||||
$readjustTask = array('readjustTime' => '1', 'readjustTask' => '1');
|
||||
$readjustTime = array('readjustTime' => '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->activateTest($executionIDList[0])) && p('0:field,old,new') && e('status,suspended,doing'); // 敏捷执行激活
|
||||
r($execution->activateTest($executionIDList[1])) && p('0:field,old,new') && e('status,suspended,doing'); // 瀑布执行激活
|
||||
r($execution->activateTest($executionIDList[2])) && p('0:field,old,new') && e('status,suspended,doing'); // 看板执行激活
|
||||
r($execution->activateTest($executionIDList[3],$readjustTime)) && p('1:field') && e('begin'); // 修改激活时间
|
||||
r($execution->activateTest($executionIDList[4],$readjustTask)) && p('1:field') && e('begin'); // 修改顺延
|
||||
r($execution->activateTest($executionIDList[5], array(), true)) && p('status') && e('doing'); // 子瀑布激活获取父瀑布状态
|
||||
$db->restoreDB();
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->activateTest($executionIDList[0])) && p('0:field,old,new') && e('status,suspended,doing'); // 敏捷执行激活
|
||||
r($executionTester->activateTest($executionIDList[1])) && p('0:field,old,new') && e('status,suspended,doing'); // 瀑布执行激活
|
||||
r($executionTester->activateTest($executionIDList[2])) && p('0:field,old,new') && e('status,suspended,doing'); // 看板执行激活
|
||||
r($executionTester->activateTest($executionIDList[3],$readjustTime)) && p('1:field') && e('begin'); // 修改激活时间
|
||||
r($executionTester->activateTest($executionIDList[4],$readjustTask)) && p('1:field') && e('begin'); // 修改顺延
|
||||
r($executionTester->activateTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布激活获取父瀑布状态
|
||||
|
||||
@@ -2,33 +2,52 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
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->status->range('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(7);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('5{2},6{2},7{2}');
|
||||
$team->account->range('admin,user1');
|
||||
$team->role->range('研发,测试');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(6);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->addProjectMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目根据执行添加团队信息 >> po82,研发
|
||||
瀑布项目根据执行添加团队信息 >> test22,测试
|
||||
看板项目根据执行添加团队信息 >> test52,测试
|
||||
敏捷项目根据执行添加团队信息 >> admin,研发
|
||||
瀑布项目根据执行添加团队信息 >> admin,研发
|
||||
看板项目根据执行添加团队信息 >> admin,研发
|
||||
敏捷项目根据执行添加团队信息统计 >> 2
|
||||
瀑布项目根据执行添加团队信息统计 >> 1
|
||||
看板项目根据执行添加团队信息统计 >> 1
|
||||
瀑布项目根据执行添加团队信息统计 >> 2
|
||||
看板项目根据执行添加团队信息统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('11', '41', '71');
|
||||
$executionIDList = array('101', '131', '161', '1611');
|
||||
$projectIDList = array(2, 3, 4);
|
||||
$executionIDList = array(5, 6, 7);
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[0])) && p('0:account,role') && e('po82,研发'); // 敏捷项目根据执行添加团队信息
|
||||
r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[0])) && p('0:account,role') && e('test22,测试'); // 瀑布项目根据执行添加团队信息
|
||||
r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[0])) && p('0:account,role') && e('test52,测试'); // 看板项目根据执行添加团队信息
|
||||
r($execution->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[1])) && p() && e('2'); // 敏捷项目根据执行添加团队信息统计
|
||||
r($execution->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[1])) && p() && e('1'); // 瀑布项目根据执行添加团队信息统计
|
||||
r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[1])) && p() && e('1'); // 看板项目根据执行添加团队信息统计
|
||||
$db->restoreDB();
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[0])) && p('0:account,role') && e('admin,研发'); // 敏捷项目根据执行添加团队信息
|
||||
r($executionTester->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[0])) && p('0:account,role') && e('admin,研发'); // 瀑布项目根据执行添加团队信息
|
||||
r($executionTester->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[0])) && p('0:account,role') && e('admin,研发'); // 看板项目根据执行添加团队信息
|
||||
r($executionTester->addProjectMembersTest($projectIDList[0], $executionIDList[0], $count[1])) && p() && e('2'); // 敏捷项目根据执行添加团队信息统计
|
||||
r($executionTester->addProjectMembersTest($projectIDList[1], $executionIDList[1], $count[1])) && p() && e('2'); // 瀑布项目根据执行添加团队信息统计
|
||||
r($executionTester->addProjectMembersTest($projectIDList[2], $executionIDList[2], $count[1])) && p() && e('2'); // 看板项目根据执行添加团队信息统计
|
||||
|
||||
@@ -2,9 +2,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->batchUpdate();
|
||||
@@ -16,7 +27,7 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '101';
|
||||
$executionID = '3';
|
||||
$name = array($executionID => '批量修改执行一');
|
||||
$code = array($executionID => '批量修改执行一code');
|
||||
$emptycode = array($executionID => '');
|
||||
@@ -31,4 +42,3 @@ $noName = array('statuses'=> $statuses, 'codes' => $code, 'PMs' => $pms, 'lifet
|
||||
$execution = new executionTest();
|
||||
r($execution->batchUpdateObject($normal, $executionID)) && p('0:field,old,new') && e('name,迭代1,批量修改执行一'); // 测试批量修改任务
|
||||
r($execution->batchUpdateObject($noName, $executionID)) && p('name:0') && e('『执行名称』不能为空。'); // 测试name为空
|
||||
$db->restoreDB();
|
||||
|
||||
@@ -2,8 +2,29 @@
|
||||
<?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);
|
||||
|
||||
$burn = zdTable('burn');
|
||||
$burn->execution->range('3{5},4{5},5{5}');
|
||||
$burn->date->range('20220111 000000:1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$burn->estimate->range('94.3,56.3,55.3,37.8,33.8');
|
||||
$burn->left->range('95.3,68.5,73.9,40.2,36,3');
|
||||
$burn->consumed->range('20.1,33.4,41,56.55,59.55');
|
||||
$burn->storyPoint->range('0,16.5,16,11.5,9');
|
||||
$burn->gen(15);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->buildBurnDataTest();
|
||||
@@ -11,17 +32,17 @@ cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行燃尽图数据 >> 7/1
|
||||
瀑布执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,0,0]
|
||||
看板执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,0,0]
|
||||
结果统计 >> 3
|
||||
瀑布执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,3,95.3]
|
||||
看板执行燃尽图数据 >> [36,32.4,28.8,25.2,21.6,18,14.4,10.8,7.2,3.6,0]
|
||||
结果统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array(3, 4, 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('[0,0,0,0,0,0,0,0,0,0,0]'); // 看板执行燃尽图数据
|
||||
r($execution->buildBurnDataTest($executionIDList[0], $count[1])) && p() && e('3'); // 结果统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->buildBurnDataTest($executionIDList[0], $count[0])) && p('labels:0') && e('7/1'); // 敏捷执行燃尽图数据
|
||||
r($executionTester->buildBurnDataTest($executionIDList[1], $count[0])) && p('burnLine') && e('[0,0,0,0,0,0,0,0,0,3,95.3]'); // 瀑布执行燃尽图数据
|
||||
r($executionTester->buildBurnDataTest($executionIDList[2], $count[0])) && p('baseLine') && e('[36,32.4,28.8,25.2,21.6,18,14.4,10.8,7.2,3.6,0]'); // 看板执行燃尽图数据
|
||||
r($executionTester->buildBurnDataTest($executionIDList[0], $count[1])) && p() && e('4'); // 结果统计
|
||||
|
||||
@@ -2,28 +2,38 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$execution = zdTable('project');
|
||||
$execution->id->range('1-10');
|
||||
$execution->name->range('项目集1,项目1,项目2,项目3,项目4,项目5,项目6,迭代1,阶段1,看板1');
|
||||
$execution->type->range('program,project{6},sprint,stage,kanban');
|
||||
$execution->model->range('[],scrum{2},waterfall{2},kanban{2},[]{3}');
|
||||
$execution->parent->range('0,1{6},2,3,4');
|
||||
$execution->status->range('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(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->changeProjectTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试修改敏捷执行关联项目 >> 41
|
||||
测试修改瀑布执行关联项目 >> ,11,131,
|
||||
测试修改看板执行关联项目 >> 41
|
||||
测试修改敏捷执行关联项目 >> 5
|
||||
测试修改瀑布执行关联项目 >> ,6,9,
|
||||
测试修改看板执行关联项目 >> 7
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$oldProjectIDlist = array('11', '41', '71');
|
||||
$newProjectIDlist = array('11', '41', '71');
|
||||
$executionIDList = array(8, 9, 10);
|
||||
$oldProjectIDlist = array(2, 3, 4);
|
||||
$newProjectIDlist = array(5, 6, 7);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->changeProjectTest($newProjectIDlist[1],$oldProjectIDlist[0],$executionIDList[0])) && p('0:parent') && e('41'); // 测试修改敏捷执行关联项目
|
||||
r($execution->changeProjectTest($newProjectIDlist[0],$oldProjectIDlist[1],$executionIDList[1])) && p('0:path') && e(',11,131,'); // 测试修改瀑布执行关联项目
|
||||
r($execution->changeProjectTest($newProjectIDlist[1],$oldProjectIDlist[2],$executionIDList[2])) && p('0:parent') && e('41'); // 测试修改看板执行关联项目
|
||||
|
||||
$db->restoreDB();
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->changeProjectTest($newProjectIDlist[0], $oldProjectIDlist[0], $executionIDList[0])) && p('0:parent') && e('5'); // 测试修改敏捷执行关联项目
|
||||
r($executionTester->changeProjectTest($newProjectIDlist[1], $oldProjectIDlist[1], $executionIDList[1])) && p('0:path') && e(',6,9,'); // 测试修改瀑布执行关联项目
|
||||
r($executionTester->changeProjectTest($newProjectIDlist[2], $oldProjectIDlist[2], $executionIDList[2])) && p('0:parent') && e('7'); // 测试修改看板执行关联项目
|
||||
|
||||
@@ -2,8 +2,19 @@
|
||||
<?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-5')->prefix('执行');
|
||||
$execution->type->range('sprint,stage,kanban');
|
||||
$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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel->checkPriv();
|
||||
@@ -12,20 +23,18 @@ pid=1
|
||||
|
||||
测试传入空值 >> 0
|
||||
测试传入0 >> 0
|
||||
测试传入正确的项目ID的权限判断 >> 1
|
||||
测试传入迭代ID的权限判断 >> 1
|
||||
测试传入阶段ID的权限判断 >> 1
|
||||
测试传入看板ID的权限判断 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionIdList = array('', 0, 1, 101, 131, 161);
|
||||
$executionIdList = array('', 0, 1, 2, 3);
|
||||
|
||||
$execution = new executionTest();
|
||||
$executionTester = new executionTest();
|
||||
|
||||
r($execution->checkPrivTest($executionIdList[0])) && p() && e('0'); // 测试传入空值
|
||||
r($execution->checkPrivTest($executionIdList[1])) && p() && e('0'); // 测试传入0
|
||||
r($execution->checkPrivTest($executionIdList[2])) && p() && e('1'); // 测试传入正确的项目ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[3])) && p() && e('1'); // 测试传入迭代ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[4])) && p() && e('1'); // 测试传入阶段ID的权限判断
|
||||
r($execution->checkPrivTest($executionIdList[5])) && p() && e('1'); // 测试传入看板ID的权限判断
|
||||
r($executionTester->checkPrivTest($executionIdList[0])) && p() && e('0'); // 测试传入空值
|
||||
r($executionTester->checkPrivTest($executionIdList[1])) && p() && e('0'); // 测试传入0
|
||||
r($executionTester->checkPrivTest($executionIdList[2])) && p() && e('1'); // 测试传入迭代ID的权限判断
|
||||
r($executionTester->checkPrivTest($executionIdList[3])) && p() && e('1'); // 测试传入阶段ID的权限判断
|
||||
r($executionTester->checkPrivTest($executionIdList[4])) && p() && e('1'); // 测试传入看板ID的权限判断
|
||||
|
||||
@@ -2,9 +2,20 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$execution = zdTable('project');
|
||||
$execution->id->range('1-6');
|
||||
$execution->name->range('项目1,1-5')->prefix('执行');
|
||||
$execution->type->range('project,sprint,stage,kanban,stage{2}');
|
||||
$execution->status->range('wait{4},suspended,closed,doing');
|
||||
$execution->parent->range('0{2},1,0,1,5');
|
||||
$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(6);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->closeTest();
|
||||
@@ -12,20 +23,19 @@ cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关闭 >> status,wait,closed
|
||||
瀑布执行关闭 >> status,doing,closed
|
||||
看板执行关闭 >> status,doing,closed
|
||||
瀑布执行关闭 >> status,wait,closed
|
||||
看板执行关闭 >> status,wait,closed
|
||||
不输入实际完成时间校验 >> 『realEnd』不能为空。
|
||||
子瀑布关闭获取父瀑布状态 >> closed
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('109', '138', '168', '708');
|
||||
$executionIDList = array(2, 3, 4, 6);
|
||||
$noRealEnd = array('realEnd' => '');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->closeTest($executionIDList[0])) && p('0:field,old,new') && e('status,wait,closed'); // 敏捷执行关闭
|
||||
r($execution->closeTest($executionIDList[1])) && p('0:field,old,new') && e('status,doing,closed'); // 瀑布执行关闭
|
||||
r($execution->closeTest($executionIDList[2])) && p('0:field,old,new') && e('status,doing,closed'); // 看板执行关闭
|
||||
r($execution->closeTest($executionIDList[1],$noRealEnd)) && p('realEnd:0') && e('『realEnd』不能为空。'); // 不输入实际完成时间校验
|
||||
r($execution->closeTest($executionIDList[3], array(), true)) && p('status') && e('closed'); // 子瀑布关闭获取父瀑布状态
|
||||
$db->restoreDB();
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->closeTest($executionIDList[0])) && p('0:field,old,new') && e('status,wait,closed'); // 敏捷执行关闭
|
||||
r($executionTester->closeTest($executionIDList[1])) && p('0:field,old,new') && e('status,wait,closed'); // 瀑布执行关闭
|
||||
r($executionTester->closeTest($executionIDList[2])) && p('0:field,old,new') && e('status,wait,closed'); // 看板执行关闭
|
||||
r($executionTester->closeTest($executionIDList[1],$noRealEnd)) && p('realEnd:0') && e('『realEnd』不能为空。'); // 不输入实际完成时间校验
|
||||
r($executionTester->closeTest($executionIDList[3], array(), true)) && p('status') && e('closed'); // 子瀑布关闭获取父瀑布状态
|
||||
|
||||
@@ -2,21 +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->code->range('1-5')->prefix('code');
|
||||
$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);
|
||||
|
||||
$burn = zdTable('burn');
|
||||
$burn->execution->range('3{5},4{5},5{5}');
|
||||
$burn->date->range('20220111 000000:1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$burn->estimate->range('94.3,56.3,55.3,37.8,33.8');
|
||||
$burn->left->range('95.3,68.5,73.9,40.2,36,3');
|
||||
$burn->consumed->range('20.1,33.4,41,56.55,59.55');
|
||||
$burn->storyPoint->range('0,16.5,16,11.5,9');
|
||||
$burn->gen(15);
|
||||
|
||||
$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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->computeBurnTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常初始化 >> project600
|
||||
初始化后数据统计 >> 361
|
||||
正常初始化 >> code3
|
||||
初始化后数据统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->computeBurnTest($count[0])) && p('700:executionName') && e('project600'); // 正常初始化
|
||||
r($execution->computeBurnTest($count[1])) && p() && e('361'); // 初始化后数据统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->computeBurnTest($count[0])) && p('3:executionName') && e('code3'); // 正常初始化
|
||||
r($executionTester->computeBurnTest($count[1])) && p() && e('1'); // 初始化后数据统计
|
||||
|
||||
@@ -2,9 +2,22 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$project = zdTable('project');
|
||||
$project->id->range('1-4');
|
||||
$project->name->range('项目集1,项目1,项目2,项目3');
|
||||
$project->type->range('program,project{3}');
|
||||
$project->model->range('[],scrum,waterfall,kanban');
|
||||
$project->parent->range('0,1{3}');
|
||||
$project->path->range('`,1,`, `,1,2,`, `,1,3,`, `,1,4,`');
|
||||
$project->status->range('doing');
|
||||
$project->openedBy->range('admin,user1');
|
||||
$project->begin->range('(-3M)-(+M):1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$project->end->range('(+5w)-(+2M):1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$project->gen(4);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->create();
|
||||
@@ -17,7 +30,7 @@ pid=1
|
||||
测试创建瀑布公开执行 >> 新增公开瀑布执行code,stage
|
||||
测试创建看板私有执行 >> 新增私有看板执行,kanban
|
||||
测试创建看板公开执行 >> 新增公开看板执行code,kanban
|
||||
测试创建迭代团队分配 >> pd58,pd72,dev10,dev10
|
||||
测试创建迭代团队分配 >> user1,user2,user3,user4
|
||||
测试不输入项目 >> 所属项目不能为空。
|
||||
测试不输入执行名称 >> 『执行名称』不能为空。
|
||||
测试不输入执行代号 >> 『执行代号』不能为空。
|
||||
@@ -26,9 +39,9 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$task = new executionTest();
|
||||
$executionTester = new executionTest();
|
||||
|
||||
$projectIDList = array('11', '12', '41', '71');
|
||||
$projectIDList = array(1, 2, 3, 4);
|
||||
$dayNum = '6';
|
||||
$days = '5';
|
||||
$products = array('1', '0');
|
||||
@@ -39,7 +52,7 @@ $prvExecution_waterfall = array('name' => '新增私有瀑布执行', 'code' =>
|
||||
$openExecution_waterfall = array('name' => '新增公开瀑布执行', 'code' => '新增公开瀑布执行code', 'products' => $products, 'acl' => 'open');
|
||||
$prvExecution_kanban = array('name' => '新增私有看板执行', 'code' => '新增私有看板执行code', 'products' => $products);
|
||||
$openExecution_kanban = array('name' => '新增公开看板执行', 'code' => '新增公开看板执行code', 'products' => $products, 'acl' => 'open');
|
||||
$teamExecution = array('name' => '新增团队执行', 'code' => '新增团队执行code', 'products' => $products, 'PO' => 'pd58' ,'QD' => 'pd72', 'PM' => 'dev10', 'RD' => 'dev10');
|
||||
$teamExecution = array('name' => '新增团队执行', 'code' => '新增团队执行code', 'products' => $products, 'PO' => 'user1' ,'QD' => 'user2', 'PM' => 'user3', 'RD' => 'user4');
|
||||
$noProjectID = array('name' => '新增私有敏捷执行', 'code' => '新增私有敏捷执行code', 'products' => $products);
|
||||
$noProductID = array('name' => '新增私有敏捷执行', 'code' => '新增私有敏捷执行code');
|
||||
$noName = array('name' => '', 'code' => '名称校验code', 'products' => $products);
|
||||
@@ -47,17 +60,15 @@ $noCode = array('name' => 'code校验', 'code' => '', 'products
|
||||
$equallyName = array('name' => '新增私有敏捷执行', 'code' => '一样名称校验code', 'products' => $products);
|
||||
$equallyCode = array('name' => '一样code校验', 'code' => '新增私有敏捷执行code', 'products' => $products);
|
||||
|
||||
r($task->createObject($prvExecution, $projectIDList[1], $dayNum, $days)) && p('name,type') && e('新增私有敏捷执行,sprint'); // 测试创建敏捷私有执行
|
||||
r($task->createObject($openExecution, $projectIDList[1], $dayNum, $days)) && p('code,type') && e('新增公开敏捷执行code,sprint'); // 测试创建敏捷公开执行
|
||||
r($task->createObject($prvExecution_waterfall, $projectIDList[2], $dayNum, $days)) && p('name,type') && e('新增私有瀑布执行,stage'); // 测试创建瀑布私有执行
|
||||
r($task->createObject($openExecution_waterfall, $projectIDList[2], $dayNum, $days)) && p('code,type') && e('新增公开瀑布执行code,stage'); // 测试创建瀑布公开执行
|
||||
r($task->createObject($prvExecution_kanban, $projectIDList[3], $dayNum, $days)) && p('name,type') && e('新增私有看板执行,kanban'); // 测试创建看板私有执行
|
||||
r($task->createObject($openExecution_kanban, $projectIDList[3], $dayNum, $days)) && p('code,type') && e('新增公开看板执行code,kanban'); // 测试创建看板公开执行
|
||||
r($task->createObject($teamExecution, $projectIDList[1], $dayNum, $days)) && p('PO,QD,PM,RD') && e('pd58,pd72,dev10,dev10'); // 测试创建迭代团队分配
|
||||
r($task->createObject($prvExecution, '', $dayNum, $days)) && p('message:0') && e('所属项目不能为空。'); // 测试不输入项目
|
||||
r($task->createObject($noName, $projectIDList[1], $dayNum, $days)) && p('name:0') && e('『执行名称』不能为空。'); // 测试不输入执行名称
|
||||
r($task->createObject($noCode, $projectIDList[1], $dayNum, $days)) && p('code:0') && e('『执行代号』不能为空。'); // 测试不输入执行代号
|
||||
r($task->createObject($equallyName, $projectIDList[1], $dayNum, $days)) && p('name:0') && e('『执行名称』已经有『新增私有敏捷执行』这条记录了。'); // 测试一样的执行名称
|
||||
r($task->createObject($equallyCode, $projectIDList[1], $dayNum, $days)) && p('code:0') && e('『执行代号』已经有『新增私有敏捷执行code』这条记录了。'); // 测试一样的执行代号
|
||||
|
||||
$db->restoreDB();
|
||||
r($executionTester->createTest($prvExecution, $projectIDList[1], $dayNum, $days)) && p('name,type') && e('新增私有敏捷执行,sprint'); // 测试创建敏捷私有执行
|
||||
r($executionTester->createTest($openExecution, $projectIDList[1], $dayNum, $days)) && p('code,type') && e('新增公开敏捷执行code,sprint'); // 测试创建敏捷公开执行
|
||||
r($executionTester->createTest($prvExecution_waterfall, $projectIDList[2], $dayNum, $days)) && p('name,type') && e('新增私有瀑布执行,stage'); // 测试创建瀑布私有执行
|
||||
r($executionTester->createTest($openExecution_waterfall, $projectIDList[2], $dayNum, $days)) && p('code,type') && e('新增公开瀑布执行code,stage'); // 测试创建瀑布公开执行
|
||||
r($executionTester->createTest($prvExecution_kanban, $projectIDList[3], $dayNum, $days)) && p('name,type') && e('新增私有看板执行,kanban'); // 测试创建看板私有执行
|
||||
r($executionTester->createTest($openExecution_kanban, $projectIDList[3], $dayNum, $days)) && p('code,type') && e('新增公开看板执行code,kanban'); // 测试创建看板公开执行
|
||||
r($executionTester->createTest($teamExecution, $projectIDList[1], $dayNum, $days)) && p('PO,QD,PM,RD') && e('user1,user2,user3,user4'); // 测试创建迭代团队分配
|
||||
r($executionTester->createTest($prvExecution, '', $dayNum, $days)) && p('message:0') && e('所属项目不能为空。'); // 测试不输入项目
|
||||
r($executionTester->createTest($noName, $projectIDList[1], $dayNum, $days)) && p('name:0') && e('『执行名称』不能为空。'); // 测试不输入执行名称
|
||||
r($executionTester->createTest($noCode, $projectIDList[1], $dayNum, $days)) && p('code:0') && e('『执行代号』不能为空。'); // 测试不输入执行代号
|
||||
r($executionTester->createTest($equallyName, $projectIDList[1], $dayNum, $days)) && p('name:0') && e('『执行名称』已经有『新增私有敏捷执行』这条记录了。'); // 测试一样的执行名称
|
||||
r($executionTester->createTest($equallyCode, $projectIDList[1], $dayNum, $days)) && p('code:0') && e('『执行代号』已经有『新增私有敏捷执行code』这条记录了。'); // 测试一样的执行代号
|
||||
|
||||
@@ -2,23 +2,32 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
$db->switchDB();
|
||||
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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->createDefaultSprintTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
创建默认迭代并返回ID >> 751
|
||||
创建默认迭代 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$test = new executionTest();
|
||||
$executionTester = new executionTest();
|
||||
|
||||
$result = $test->createDefaultSprintTest(11);
|
||||
$result = $executionTester->createDefaultSprintTest(2);
|
||||
|
||||
r($result) && p('') && e('751'); // 创建默认迭代并返回ID
|
||||
|
||||
$db->restoreDB();
|
||||
r($result) && p('') && e('1'); // 创建默认迭代
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/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->getTreeTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关闭 >> status,wait,getTreed
|
||||
瀑布执行关闭 >> status,doing,getTreed
|
||||
看板执行关闭 >> status,doing,getTreed
|
||||
不输入实际完成时间校验 >> 『realEnd』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','131', '161');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
var_dump($execution->getTreeTest($executionIDList[0],$count[0]));die;
|
||||
r($execution->getTreeTest($executionIDList[0],$count[0])) && p('91') && e('0,101,102'); // 敏捷项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[1],$count[0])) && p('46') && e('0,11,12'); // 瀑布项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[2],$count[0])) && p('57') && e('0,33,34'); // 看板项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[3],$count[0])) && p('21') && e('0'); // 非分支产品执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[0],$count[1])) && p() && e('3'); // 敏捷执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[1],$count[1])) && p() && e('2'); // 瀑布执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[2],$count[1])) && p() && e('2'); // 看板执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[3],$count[1])) && p() && e('2'); // 正常产品分支统计
|
||||
@@ -2,27 +2,59 @@
|
||||
<?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->code->range('1-5')->prefix('code');
|
||||
$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);
|
||||
|
||||
$burn = zdTable('burn');
|
||||
$burn->execution->range('3{5},4{5},5{5}');
|
||||
$burn->date->range('20220111 000000:1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$burn->estimate->range('94.3,56.3,55.3,37.8,33.8');
|
||||
$burn->left->range('95.3,68.5,73.9,40.2,36,3');
|
||||
$burn->consumed->range('20.1,33.4,41,56.55,59.55');
|
||||
$burn->storyPoint->range('0,16.5,16,11.5,9');
|
||||
$burn->gen(15);
|
||||
|
||||
$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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->fixFirstTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
不传入withLeft >> 26
|
||||
敏捷执行更新首日剩余工时 >> 26
|
||||
不传入withLeft >> 25
|
||||
敏捷执行更新首日剩余工时 >> 5
|
||||
瀑布执行更新首日剩余工时 >> 17
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131');
|
||||
$executionIDList = array(3, 4);
|
||||
|
||||
$scrumEstimate = array('estimate' => '25');
|
||||
$withLeft = array('estimate' => '21', 'withLeft' => '1');
|
||||
$withLeft = array('estimate' => '5', 'withLeft' => '5');
|
||||
$waterfallEstimate = array('estimate' => '17', 'withLeft' => '1');
|
||||
$date = '2022-01-12';
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->fixFirstTest($executionIDList[0], $scrumEstimate)) && p('0:estimate') && e('26'); // 不传入withLeft
|
||||
r($execution->fixFirstTest($executionIDList[0], $withLeft)) && p('0:estimate') && e('26'); // 敏捷执行更新首日剩余工时
|
||||
r($execution->fixFirstTest($executionIDList[1], $waterfallEstimate)) && p('0:left') && e('17'); // 瀑布执行更新首日剩余工时
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->fixFirstTest($executionIDList[0], $scrumEstimate, $date)) && p('0:estimate') && e('25'); // 不传入withLeft
|
||||
r($executionTester->fixFirstTest($executionIDList[0], $withLeft, $date)) && p('0:left') && e('5'); // 敏捷执行更新首日剩余工时
|
||||
r($executionTester->fixFirstTest($executionIDList[1], $waterfallEstimate, $date)) && p('0:estimate') && e('17'); // 瀑布执行更新首日剩余工时
|
||||
|
||||
@@ -2,8 +2,21 @@
|
||||
<?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->order->range('1-5');
|
||||
$execution->gen(5);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->fixOrderTest();
|
||||
@@ -14,5 +27,5 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->fixOrderTest()) && p('101:order') && e('15'); // 重置order
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->fixOrderTest()) && p('3:order') && e('15'); // 重置order
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/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->getTreeTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关闭 >> status,wait,getTreed
|
||||
瀑布执行关闭 >> status,doing,getTreed
|
||||
看板执行关闭 >> status,doing,getTreed
|
||||
不输入实际完成时间校验 >> 『realEnd』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','131', '161');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
var_dump($execution->getTreeTest($executionIDList[0],$count[0]));die;
|
||||
r($execution->getTreeTest($executionIDList[0],$count[0])) && p('91') && e('0,101,102'); // 敏捷项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[1],$count[0])) && p('46') && e('0,11,12'); // 瀑布项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[2],$count[0])) && p('57') && e('0,33,34'); // 看板项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[3],$count[0])) && p('21') && e('0'); // 非分支产品执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[0],$count[1])) && p() && e('3'); // 敏捷执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[1],$count[1])) && p() && e('2'); // 瀑布执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[2],$count[1])) && p() && e('2'); // 看板执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[3],$count[1])) && p() && e('2'); // 正常产品分支统计
|
||||
@@ -2,29 +2,38 @@
|
||||
<?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-5')->prefix('看板');
|
||||
$execution->type->range('kanban');
|
||||
$execution->status->range('wait{3},suspended,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);
|
||||
|
||||
/**
|
||||
|
||||
title=executionModel->getBeginEnd4CFD();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
ID 161 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 162 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 163 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 171 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 181 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 191 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天 >> 1,1
|
||||
ID 3 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致 >> 1,1
|
||||
ID 2 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致 >> 1,1
|
||||
ID 3 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致 >> 1,1
|
||||
ID 4 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致 >> 1,1
|
||||
ID 5 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致 >> 1,1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array(161, 162, 163, 171, 181, 191);
|
||||
$executionIDList = array(1, 2, 3, 4, 5);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[0])) && p('0,1') && e('1,1'); // ID 161 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[1])) && p('0,1') && e('1,1'); // ID 162 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[2])) && p('0,1') && e('1,1'); // ID 163 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[3])) && p('0,1') && e('1,1'); // ID 171 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[4])) && p('0,1') && e('1,1'); // ID 181 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
r($execution->getBeginEnd4CFDTest($executionIDList[5])) && p('0,1') && e('1,1'); // ID 191 的专业研发看板累计流图默认开始和结束时间 是不是14天前和今天
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getBeginEnd4CFDTest($executionIDList[0])) && p('0,1') && e('1,1'); // ID 1 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致
|
||||
r($executionTester->getBeginEnd4CFDTest($executionIDList[1])) && p('0,1') && e('1,1'); // ID 2 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致
|
||||
r($executionTester->getBeginEnd4CFDTest($executionIDList[2])) && p('0,1') && e('1,1'); // ID 3 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致
|
||||
r($executionTester->getBeginEnd4CFDTest($executionIDList[3])) && p('0,1') && e('1,1'); // ID 4 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致
|
||||
r($executionTester->getBeginEnd4CFDTest($executionIDList[4])) && p('0,1') && e('1,1'); // ID 5 的专业研发看板累计流图默认开始和结束时间是不是14天前和今天一致
|
||||
|
||||
@@ -2,24 +2,40 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-2');
|
||||
$product->name->range('正常产品1,多分支产品1');
|
||||
$product->type->range('normal,branch');
|
||||
$product->status->range('normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(2);
|
||||
|
||||
$branch = zdTable('branch');
|
||||
$branch->id->range('1-2');
|
||||
$branch->product->range('2');
|
||||
$branch->name->range('分支1,分支2');
|
||||
$branch->status->range('active');
|
||||
$branch->gen(2);
|
||||
|
||||
/**
|
||||
|
||||
title=executionModel->getBranchByProduct();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常产品分支统计 >> 1
|
||||
正常产品分支统计 >> 0
|
||||
分支产品分支查看 >> 分支1
|
||||
分支产品分支统计 >> 1
|
||||
分支产品分支统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array('1', '41');
|
||||
$productIDList = array(1, 2);
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
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'); //分支产品分支统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getBranchByProductTest($productIDList[0], $count[1])) && p() && e('0'); // 正常产品分支统计
|
||||
r($executionTester->getBranchByProductTest($productIDList[1], $count[0])) && p('2:1') && e('分支1'); // 分支产品分支查看
|
||||
r($executionTester->getBranchByProductTest($productIDList[1], $count[1])) && p() && e('3'); // 分支产品分支统计
|
||||
|
||||
@@ -2,35 +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');
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-2');
|
||||
$product->name->range('正常产品1,多分支产品1');
|
||||
$product->type->range('normal,branch');
|
||||
$product->status->range('normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(2);
|
||||
|
||||
$branch = zdTable('branch');
|
||||
$branch->id->range('1-2');
|
||||
$branch->product->range('2');
|
||||
$branch->name->range('分支1,分支2');
|
||||
$branch->status->range('active');
|
||||
$branch->gen(2);
|
||||
|
||||
$projectProduct = zdTable('projectproduct');
|
||||
$projectProduct->project->range('3{3}, 4{3}, 5{3}');
|
||||
$projectProduct->product->range('1-2{2}');
|
||||
$projectProduct->branch->range('0-2');
|
||||
$projectProduct->gen(9);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getBranchesTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目下根据执行查询产品分支 >> 0,101,102
|
||||
瀑布项目下根据执行查询产品分支 >> 0,11,12
|
||||
看板项目下根据执行查询产品分支 >> 0,33,34
|
||||
非分支产品执行查询产品分支 >> 0
|
||||
敏捷执行关联产品分支统计 >> 3
|
||||
敏捷项目下根据执行查询产品分支 >> 1
|
||||
瀑布项目下根据执行查询产品分支 >> 0,1,2
|
||||
看板项目下根据执行查询产品分支 >> 2
|
||||
敏捷执行关联产品分支统计 >> 2
|
||||
瀑布执行关联产品分支统计 >> 2
|
||||
看板执行关联产品分支统计 >> 2
|
||||
正常产品分支统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','146', '617', '121');
|
||||
$count = array('0','1');
|
||||
$executionIDList = array(3, 4, 5);
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
//var_dump($execution->getBranchesTest($executionIDList[3],$count[0]));die;
|
||||
r($execution->getBranchesTest($executionIDList[0],$count[0])) && p('91') && e('0,101,102'); // 敏捷项目下根据执行查询产品分支
|
||||
r($execution->getBranchesTest($executionIDList[1],$count[0])) && p('46') && e('0,11,12'); // 瀑布项目下根据执行查询产品分支
|
||||
r($execution->getBranchesTest($executionIDList[2],$count[0])) && p('57') && e('0,33,34'); // 看板项目下根据执行查询产品分支
|
||||
r($execution->getBranchesTest($executionIDList[3],$count[0])) && p('21') && e('0'); // 非分支产品执行查询产品分支
|
||||
r($execution->getBranchesTest($executionIDList[0],$count[1])) && p() && e('3'); // 敏捷执行关联产品分支统计
|
||||
r($execution->getBranchesTest($executionIDList[1],$count[1])) && p() && e('2'); // 瀑布执行关联产品分支统计
|
||||
r($execution->getBranchesTest($executionIDList[2],$count[1])) && p() && e('2'); // 看板执行关联产品分支统计
|
||||
r($execution->getBranchesTest($executionIDList[3],$count[1])) && p() && e('2'); // 正常产品分支统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getBranchesTest($executionIDList[0],$count[0])) && p('1') && e('1'); // 敏捷项目下根据执行查询产品分支
|
||||
r($executionTester->getBranchesTest($executionIDList[1],$count[0])) && p('2') && e('0,1,2'); // 瀑布项目下根据执行查询产品分支
|
||||
r($executionTester->getBranchesTest($executionIDList[2],$count[0])) && p('1') && e('2'); // 看板项目下根据执行查询产品分支
|
||||
r($executionTester->getBranchesTest($executionIDList[0],$count[1])) && p() && e('2'); // 敏捷执行关联产品分支统计
|
||||
r($executionTester->getBranchesTest($executionIDList[1],$count[1])) && p() && e('2'); // 瀑布执行关联产品分支统计
|
||||
r($executionTester->getBranchesTest($executionIDList[2],$count[1])) && p() && e('2'); // 看板执行关联产品分支统计
|
||||
|
||||
@@ -2,23 +2,54 @@
|
||||
<?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->code->range('1-5')->prefix('code');
|
||||
$execution->parent->range('0,1,2{3}');
|
||||
$execution->status->range('wait{3},suspended,closed,doing');
|
||||
$execution->openedBy->range('admin,user1');
|
||||
$execution->begin->range('20220110 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$execution->end->range('20220220 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$execution->gen(5);
|
||||
|
||||
$burn = zdTable('burn');
|
||||
$burn->execution->range('3{5},4{5},5{5}');
|
||||
$burn->date->range('20220111 000000:1D')->type('timestamp')->format('YY/MM/DD');
|
||||
$burn->estimate->range('94.3,56.3,55.3,37.8,33.8');
|
||||
$burn->left->range('95.3,68.5,73.9,40.2,36,3');
|
||||
$burn->consumed->range('20.1,33.4,41,56.55,59.55');
|
||||
$burn->storyPoint->range('0,16.5,16,11.5,9');
|
||||
$burn->gen(15);
|
||||
|
||||
$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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getBurnDataFlotTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询统计 >> 3
|
||||
敏捷执行查询统计 >> 95.3
|
||||
瀑布执行查询统计 >> 3
|
||||
看板执行查询统计 >> 0
|
||||
看板执行查询统计 >> 36
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array(3, 4, 5);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getBurnDataFlotTest($executionIDList[0])) && p() && e('3'); // 敏捷执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[1])) && p() && e('3'); // 瀑布执行查询统计
|
||||
r($execution->getBurnDataFlotTest($executionIDList[2])) && p() && e('0'); // 看板执行查询统计
|
||||
r(current($execution->getBurnDataFlotTest($executionIDList[0]))) && p('value') && e('95.3'); // 敏捷执行查询统计
|
||||
r(current($execution->getBurnDataFlotTest($executionIDList[1]))) && p('value') && e('3'); // 瀑布执行查询统计
|
||||
r(current($execution->getBurnDataFlotTest($executionIDList[2]))) && p('value') && e('36'); // 看板执行查询统计
|
||||
|
||||
@@ -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'); // 查询子阶段数量
|
||||
|
||||
@@ -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('无数据'); // 日期输入错误查询
|
||||
|
||||
@@ -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'); //看板查找访问人员
|
||||
|
||||
@@ -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数量统计
|
||||
|
||||
@@ -2,28 +2,60 @@
|
||||
<?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-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);
|
||||
|
||||
$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('2{3}, 3{3}, 4{3}, 5, 6, 7, 8, 9, 10');
|
||||
$projectProduct->product->range('1-3');
|
||||
$projectProduct->branch->range('0');
|
||||
$projectProduct->gen(14);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getInvolvedExecutionListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
根据项目查询执行列表 >> 30,迭代20
|
||||
根据产品查询执行列表 >> 30,迭代20,sprint
|
||||
根据项目查询执行列表 >> 2,迭代1
|
||||
根据产品查询执行列表 >> 2,迭代1,sprint
|
||||
根据项目查询执行数量 >> 1
|
||||
根据产品查询执行数量 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('0', '30');
|
||||
$productIDList = array('0', '10');
|
||||
$limit = array('0', '2', '10');
|
||||
$count = array('0', '1');
|
||||
$projectIDList = array(0, 2);
|
||||
$productIDList = array(0, 1);
|
||||
$limit = array(0, 2, 10);
|
||||
$count = array(0, 1);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getInvolvedExecutionListTest($projectIDList[1],$limit[0],$productIDList[0],$count[0])) && p('120:project,name') && e('30,迭代20'); // 根据项目查询执行列表
|
||||
r($execution->getInvolvedExecutionListTest($projectIDList[0],$limit[0],$productIDList[1],$count[0])) && p('120:project,name,type') && e('30,迭代20,sprint'); // 根据产品查询执行列表
|
||||
r($execution->getInvolvedExecutionListTest($projectIDList[1],$limit[1],$productIDList[0],$count[1])) && p() && e('1'); // 根据项目查询执行数量
|
||||
r($execution->getInvolvedExecutionListTest($projectIDList[0],$limit[2],$productIDList[1],$count[1])) && p() && e('1'); // 根据产品查询执行数量
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getInvolvedExecutionListTest($projectIDList[1],$limit[0],$productIDList[0],$count[0])) && p('5:project,name') && e('2,迭代1'); // 根据项目查询执行列表
|
||||
r($executionTester->getInvolvedExecutionListTest($projectIDList[0],$limit[0],$productIDList[1],$count[0])) && p('5:project,name,type') && e('2,迭代1,sprint'); // 根据产品查询执行列表
|
||||
r($executionTester->getInvolvedExecutionListTest($projectIDList[1],$limit[1],$productIDList[0],$count[1])) && p() && e('1'); // 根据项目查询执行数量
|
||||
r($executionTester->getInvolvedExecutionListTest($projectIDList[0],$limit[2],$productIDList[1],$count[1])) && p() && e('1'); // 根据产品查询执行数量
|
||||
|
||||
@@ -2,25 +2,80 @@
|
||||
<?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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$task->execution->range('3');
|
||||
$task->name->range('1-10')->prefix('任务');
|
||||
$task->type->range('design,devel,test,study,discuss,ui,affair,misc');
|
||||
$task->status->range('wait,doing,done,closed');
|
||||
$task->gen(10);
|
||||
|
||||
$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);
|
||||
|
||||
$story = zdTable('story');
|
||||
$story->id->range('1-10');
|
||||
$story->name->range('1-10')->prefix('需求');
|
||||
$story->type->range('story');
|
||||
$story->product->range('1');
|
||||
$story->status->range('active');
|
||||
$story->staged->range('projected');
|
||||
$story->version->range('1');
|
||||
$story->gen(10);
|
||||
|
||||
$projectStory = zdTable('projectstory');
|
||||
$projectStory->project->range('3');
|
||||
$projectStory->product->range('1');
|
||||
$projectStory->story->range('1-10');
|
||||
$projectStory->version->range('1');
|
||||
$projectStory->gen(10);
|
||||
|
||||
$bug = zdTable('bug');
|
||||
$bug->id->range('1-10');
|
||||
$bug->execution->range('3');
|
||||
$bug->name->range('1-10')->prefix('Bug');
|
||||
$bug->status->range('active');
|
||||
$bug->gen(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getKanbanGroupData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
空数据查询 >> empty
|
||||
查询执行162需求 >> 软件需求246
|
||||
空数据查询 >> empty
|
||||
获取id=3执行的任务数 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
$executionTester = new executionTest();
|
||||
|
||||
$executionID = 162;
|
||||
$executionID = 3;
|
||||
$stories = $tester->loadModel('story')->getExecutionStories($executionID);
|
||||
$tasks = $execution->getKanbanTasksTest($executionID, false);
|
||||
$tasks = $executionTester->getKanbanTasksTest($executionID, false);
|
||||
$bugs = $tester->loadModel('bug')->getExecutionBugs($executionID);
|
||||
|
||||
r($execution->getKanbanGroupDataTest(array(), array(), array(), 'story')) && p('') && e('empty'); //空数据查询
|
||||
r($execution->getKanbanGroupDataTest($stories, $tasks, $bugs, 'story')) && p('246:title') && e('软件需求246'); // 查询执行162需求
|
||||
r($executionTester->getKanbanGroupDataTest(array(), array(), array(), 'story')) && p('') && e('empty'); // 空数据查询
|
||||
r($executionTester->getKanbanGroupDataTest($stories, $tasks, $bugs, 'story')) && p('') && e('1'); // 获取id=3执行的任务数
|
||||
|
||||
@@ -2,30 +2,53 @@
|
||||
<?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-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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-30');
|
||||
$task->execution->range('5, 7, 9');
|
||||
$task->name->range('1-30')->prefix('任务');
|
||||
$task->type->range('design,devel,test,study,discuss,ui,affair,misc');
|
||||
$task->status->range('wait,doing,done,closed');
|
||||
$task->gen(30);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getKanbanTasksTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询 >> 子任务6,101
|
||||
瀑布执行查询 >> 更多任务93,131
|
||||
看板执行查询 >> 开发任务71,161
|
||||
敏捷执行查询统计 >> 11
|
||||
瀑布执行查询统计 >> 4
|
||||
看板执行查询统计 >> 4
|
||||
敏捷执行查询 >> 任务25,5
|
||||
瀑布执行查询 >> 任务29,7
|
||||
看板执行查询 >> 任务21,9
|
||||
敏捷执行查询统计 >> 10
|
||||
瀑布执行查询统计 >> 10
|
||||
看板执行查询统计 >> 10
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array(5, 7, 9);
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanTasksTest($executionIDList[0], $count[0])) && p('906:name,execution') && e('子任务6,101'); // 敏捷执行查询
|
||||
r($execution->getKanbanTasksTest($executionIDList[1], $count[0])) && p('693:name,execution') && e('更多任务93,131'); // 瀑布执行查询
|
||||
r($execution->getKanbanTasksTest($executionIDList[2], $count[0])) && p('61:name,execution') && e('开发任务71,161'); // 看板执行查询
|
||||
r($execution->getKanbanTasksTest($executionIDList[0], $count[1])) && p() && e('11'); // 敏捷执行查询统计
|
||||
r($execution->getKanbanTasksTest($executionIDList[1], $count[1])) && p() && e('4'); // 瀑布执行查询统计
|
||||
r($execution->getKanbanTasksTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[0], $count[0])) && p('25:name,execution') && e('任务25,5'); // 敏捷执行查询
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[1], $count[0])) && p('29:name,execution') && e('任务29,7'); // 瀑布执行查询
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[2], $count[0])) && p('21:name,execution') && e('任务21,9'); // 看板执行查询
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[0], $count[1])) && p() && e('10'); // 敏捷执行查询统计
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[1], $count[1])) && p() && e('10'); // 瀑布执行查询统计
|
||||
r($executionTester->getKanbanTasksTest($executionIDList[2], $count[1])) && p() && e('10'); // 看板执行查询统计
|
||||
|
||||
@@ -2,21 +2,33 @@
|
||||
<?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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getLifetimeByIdList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询执行103和161 lifetime >> emptyLifetime
|
||||
查询执行3和4 lifetime >> emptyLifetime
|
||||
查询空执行 lifetime >> empty
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('103', '161');
|
||||
$executionIDList = array(3, 4);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getLifetimeByIdListTest($executionIDList)) && p('103') && e('emptyLifetime'); // 查询执行103和161 lifetime
|
||||
r($execution->getLifetimeByIdListTest(array('0'))) && p('') && e('empty'); // 查询空执行 lifetime
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getLifetimeByIdListTest($executionIDList)) && p('3') && e('emptyLifetime'); // 查询执行3和4 lifetime
|
||||
r($executionTester->getLifetimeByIdListTest(array('0'))) && p('') && e('empty'); // 查询空执行 lifetime
|
||||
|
||||
@@ -2,44 +2,76 @@
|
||||
<?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-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);
|
||||
|
||||
$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('2{3}, 3{3}, 4{3}, 5, 6, 7, 8, 9, 10');
|
||||
$projectProduct->product->range('1-3');
|
||||
$projectProduct->branch->range('0');
|
||||
$projectProduct->gen(9);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目执行列表查询 >> 11,迭代1
|
||||
瀑布项目执行列表查询 >> 41,阶段31,stage
|
||||
看板项目执行列表查询 >> 71,看板61,kanban
|
||||
产品1执行列表查询 >> 迭代1
|
||||
敏捷执行列表查询 >> sprint,迭代561
|
||||
瀑布执行列表查询 >> stage,阶段591
|
||||
看板执行列表查询 >> kanban,看板531
|
||||
wait执行列表查询 >> wait,阶段581
|
||||
doing执行列表查询 >> doing,阶段582
|
||||
执行列表2条查询 >> 2
|
||||
执行列表10条查询 >> 10
|
||||
敏捷项目执行列表查询 >> 2,迭代1
|
||||
瀑布项目执行列表查询 >> 3,阶段1,stage
|
||||
看板项目执行列表查询 >> 4,看板1,kanban
|
||||
产品1执行列表查询 >> 0
|
||||
敏捷执行列表查询 >> sprint,迭代2
|
||||
瀑布执行列表查询 >> stage,阶段2
|
||||
看板执行列表查询 >> kanban,看板2
|
||||
wait执行列表查询 >> 0
|
||||
doing执行列表查询 >> doing,迭代1
|
||||
执行列表2条查询 >> 0
|
||||
执行列表10条查询 >> 6
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('0', '11', '41', '71');
|
||||
$projectIDList = array(0, 2, 3, 4);
|
||||
$productIDList = array('0', '1');
|
||||
$status = array('all', 'wait', 'doing');
|
||||
$type = array('all', 'sprint', 'stage', 'kanban');
|
||||
$limit = array('0', '2', '10');
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getListTest($projectIDList[1],$type[0],$status[0],$limit[0],$productIDList[0],$count[0])) && p('101:project,name') && e('11,迭代1'); // 敏捷项目执行列表查询
|
||||
r($execution->getListTest($projectIDList[2],$type[0],$status[0],$limit[0],$productIDList[0],$count[0])) && p('131:project,name,type') && e('41,阶段31,stage'); // 瀑布项目执行列表查询
|
||||
r($execution->getListTest($projectIDList[3],$type[0],$status[0],$limit[0],$productIDList[0],$count[0])) && p('161:project,name,type') && e('71,看板61,kanban'); // 看板项目执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[0],$status[0],$limit[0],$productIDList[1],$count[0])) && p('101:name') && e('迭代1'); // 产品1执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[1],$status[0],$limit[2],$productIDList[0],$count[0])) && p('661:type,name') && e('sprint,迭代561'); // 敏捷执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[2],$status[0],$limit[2],$productIDList[0],$count[0])) && p('691:type,name') && e('stage,阶段591'); // 瀑布执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[3],$status[0],$limit[2],$productIDList[0],$count[0])) && p('631:type,name') && e('kanban,看板531'); // 看板执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[0],$status[1],$limit[0],$productIDList[0],$count[0])) && p('681:status,name') && e('wait,阶段581'); // wait执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[0],$status[2],$limit[0],$productIDList[0],$count[0])) && p('682:status,name') && e('doing,阶段582'); // doing执行列表查询
|
||||
r($execution->getListTest($projectIDList[0],$type[0],$status[1],$limit[1],$productIDList[0],$count[1])) && p() && e('2'); // 执行列表2条查询
|
||||
r($execution->getListTest($projectIDList[0],$type[0],$status[2],$limit[2],$productIDList[0],$count[1])) && p() && e('10'); // 执行列表10条查询
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getListTest($projectIDList[1], $type[0], $status[0], $limit[0], $productIDList[0], $count[0])) && p('5:project,name') && e('2,迭代1'); // 敏捷项目执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[2], $type[0], $status[0], $limit[0], $productIDList[0], $count[0])) && p('7:project,name,type') && e('3,阶段1,stage'); // 瀑布项目执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[3], $type[0], $status[0], $limit[0], $productIDList[0], $count[0])) && p('9:project,name,type') && e('4,看板1,kanban'); // 看板项目执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[0], $status[0], $limit[0], $productIDList[1], $count[0])) && p() && e('0'); // 产品1执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[1], $status[0], $limit[2], $productIDList[0], $count[0])) && p('6:type,name') && e('sprint,迭代2'); // 敏捷执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[2], $status[0], $limit[2], $productIDList[0], $count[0])) && p('8:type,name') && e('stage,阶段2'); // 瀑布执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[3], $status[0], $limit[2], $productIDList[0], $count[0])) && p('10:type,name') && e('kanban,看板2'); // 看板执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[0], $status[1], $limit[0], $productIDList[0], $count[0])) && p() && e('0'); // wait执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[0], $status[2], $limit[0], $productIDList[0], $count[0])) && p('5:status,name') && e('doing,迭代1'); // doing执行列表查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[0], $status[1], $limit[1], $productIDList[0], $count[1])) && p() && e('0'); // 执行列表2条查询
|
||||
r($executionTester->getListTest($projectIDList[0], $type[0], $status[2], $limit[2], $productIDList[0], $count[1])) && p() && e('6'); // 执行列表10条查询
|
||||
|
||||
@@ -2,26 +2,36 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('1');
|
||||
$team->type->range('execution');
|
||||
$team->account->range('user1,user2');
|
||||
$team->role->range('研发,测试');
|
||||
$team->days->range('5');
|
||||
$team->hours->range('7');
|
||||
$team->gen(2);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getMembers2ImportTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
正常数据查询 >> po82,研发
|
||||
正常数据查询 >> user1,研发
|
||||
无效数据查询 >> 无数据
|
||||
正常数据查询统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '101';
|
||||
$accountList = array('test7', 'test82');
|
||||
$allAccountList = array('test82', 'po82', 'user92');
|
||||
$executionID = '1';
|
||||
$accountList = array('test1', 'test2');
|
||||
$allAccountList = array('test1', 'user1', 'user2');
|
||||
$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'); // 正常数据查询统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getMembers2ImportTest($executionID, $accountList, $count[0])) && p('user1:account,role') && e('user1,研发'); // 正常数据查询
|
||||
r($executionTester->getMembers2ImportTest($executionID, $allAccountList, $count[0])) && p() && e('无数据'); // 无效数据查询
|
||||
r($executionTester->getMembers2ImportTest($executionID, $accountList, $count[1])) && p() && e('2'); // 正常数据查询统计
|
||||
|
||||
@@ -2,26 +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');
|
||||
|
||||
$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);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->type->range('execution');
|
||||
$team->account->range('admin,user1,user2,user3,user4');
|
||||
$team->role->range('研发,测试{4}');
|
||||
$team->days->range('5');
|
||||
$team->hours->range('7');
|
||||
$team->gen(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getMembersByIdListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
批量查询敏捷执行team >> 101,po82,研发主管82
|
||||
批量查询瀑布执行team >> 131,test22,开发22
|
||||
批量查询看板执行team >> 161,test52,开发52
|
||||
批量查询敏捷执行team >> 3,admin,admin
|
||||
批量查询瀑布执行team >> 4,user1,用户1
|
||||
批量查询看板执行team >> 5,admin,admin
|
||||
批量查询执行team统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array(3, 4, 5);
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[0]]) && p('0:root,account,realname') && e('101,po82,研发主管82');// 批量查询敏捷执行team
|
||||
r($execution->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[1]]) && p('0:root,account,realname') && e('131,test22,开发22'); // 批量查询瀑布执行team
|
||||
r($execution->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[2]]) && p('0:root,account,realname') && e('161,test52,开发52'); // 批量查询看板执行team
|
||||
r($execution->getMembersByIdListTest($executionIDList, $count[1])) && p() && e('3'); // 批量查询执行team统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[0]]) && p('0:root,account,realname') && e('3,admin,admin'); // 批量查询敏捷执行team
|
||||
r($executionTester->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[1]]) && p('0:root,account,realname') && e('4,user1,用户1'); // 批量查询瀑布执行team
|
||||
r($executionTester->getMembersByIdListTest($executionIDList, $count[0])[$executionIDList[2]]) && p('0:root,account,realname') && e('5,admin,admin'); // 批量查询看板执行team
|
||||
r($executionTester->getMembersByIdListTest($executionIDList, $count[1])) && p() && e('3'); // 批量查询执行team统计
|
||||
|
||||
@@ -2,48 +2,64 @@
|
||||
<?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('wait,doing,done,closed');
|
||||
$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->getOrderedExecutions();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目wait状态执行查看 >> 11,wait,sprint
|
||||
敏捷项目doing状态执行查看 >> 12,doing,sprint
|
||||
瀑布项目wait状态执行查看 >> 41,wait,stage
|
||||
瀑布项目doing状态执行查看 >> 42,doing,stage
|
||||
看板项目wait状态执行查看 >> 71,wait,kanban
|
||||
看板项目doing状态执行查看 >> 72,doing,kanban
|
||||
敏捷项目wait状态执行统计 >> 7
|
||||
敏捷项目doing状态执行统计 >> 7
|
||||
瀑布项目wait状态执行统计 >> 8
|
||||
瀑布项目doing状态执行统计 >> 8
|
||||
看板项目wait状态执行统计 >> 6
|
||||
看板项目doing状态执行统计 >> 6
|
||||
敏捷项目wait状态执行查看 >> 2,wait,sprint
|
||||
敏捷项目doing状态执行查看 >> 2,doing,sprint
|
||||
瀑布项目wait状态执行查看 >> 0
|
||||
瀑布项目doing状态执行查看 >> 0
|
||||
看板项目wait状态执行查看 >> 4,wait,kanban
|
||||
看板项目doing状态执行查看 >> 4,doing,kanban
|
||||
敏捷项目wait状态执行统计 >> 1
|
||||
敏捷项目doing状态执行统计 >> 1
|
||||
瀑布项目wait状态执行统计 >> 0
|
||||
瀑布项目doing状态执行统计 >> 0
|
||||
看板项目wait状态执行统计 >> 1
|
||||
看板项目doing状态执行统计 >> 1
|
||||
敏捷项目done状态执行统计 >> 0
|
||||
敏捷项目closed状态执行统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('11', '12', '41', '42', '71', '72');
|
||||
$projectIDList = array(2, 3, 4);
|
||||
$status = array('wait', 'doing', 'done', 'closed');
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
//var_dump($execution->getOrderedExecutionsTest($projectIDList[5],$status[1],$count[0]));die;
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[0],$status[0],$count[0])) && p('101:project,status,type') && e('11,wait,sprint'); //敏捷项目wait状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[1],$status[1],$count[0])) && p('102:project,status,type') && e('12,doing,sprint'); //敏捷项目doing状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[2],$status[0],$count[0])) && p('701:project,status,type') && e('41,wait,stage'); //瀑布项目wait状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[3],$status[1],$count[0])) && p('702:project,status,type') && e('42,doing,stage'); //瀑布项目doing状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[4],$status[0],$count[0])) && p('161:project,status,type') && e('71,wait,kanban'); //看板项目wait状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[5],$status[1],$count[0])) && p('162:project,status,type') && e('72,doing,kanban'); //看板项目doing状态执行查看
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[0],$status[0],$count[1])) && p() && e('7'); //敏捷项目wait状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[1],$status[1],$count[1])) && p() && e('7'); //敏捷项目doing状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[2],$status[0],$count[1])) && p() && e('8'); //瀑布项目wait状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[3],$status[1],$count[1])) && p() && e('8'); //瀑布项目doing状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[4],$status[0],$count[1])) && p() && e('6'); //看板项目wait状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[5],$status[1],$count[1])) && p() && e('6'); //看板项目doing状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[0],$status[2],$count[1])) && p() && e('0'); //敏捷项目done状态执行统计
|
||||
r($execution->getOrderedExecutionsTest($projectIDList[0],$status[3],$count[1])) && p() && e('0'); //敏捷项目closed状态执行统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[0],$count[0])) && p('5:project,status,type') && e('2,wait,sprint'); // 敏捷项目wait状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[1],$count[0])) && p('6:project,status,type') && e('2,doing,sprint'); // 敏捷项目doing状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[1],$status[0],$count[0])) && p() && e('0'); // 瀑布项目wait状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[1],$status[1],$count[0])) && p() && e('0'); // 瀑布项目doing状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[2],$status[0],$count[0])) && p('9:project,status,type') && e('4,wait,kanban'); // 看板项目wait状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[2],$status[1],$count[0])) && p('10:project,status,type') && e('4,doing,kanban'); // 看板项目doing状态执行查看
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[0],$count[1])) && p() && e('1'); // 敏捷项目wait状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[1],$count[1])) && p() && e('1'); // 敏捷项目doing状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[1],$status[0],$count[1])) && p() && e('0'); // 瀑布项目wait状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[1],$status[1],$count[1])) && p() && e('0'); // 瀑布项目doing状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[2],$status[0],$count[1])) && p() && e('1'); // 看板项目wait状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[2],$status[1],$count[1])) && p() && e('1'); // 看板项目doing状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[2],$count[1])) && p() && e('0'); // 敏捷项目done状态执行统计
|
||||
r($executionTester->getOrderedExecutionsTest($projectIDList[0],$status[3],$count[1])) && p() && e('0'); // 敏捷项目closed状态执行统计
|
||||
|
||||
@@ -2,8 +2,23 @@
|
||||
<?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->getPairsTest();
|
||||
@@ -11,23 +26,23 @@ cid=1
|
||||
pid=1
|
||||
|
||||
敏捷项目执行查看 >> 迭代1
|
||||
瀑布项目执行查看 >> 阶段121
|
||||
看板项目执行查看 >> 看板61
|
||||
敏捷项目执行统计 >> 7
|
||||
敏捷项目执行统计 >> 8
|
||||
敏捷项目执行统计 >> 6
|
||||
瀑布项目执行查看 >> 阶段1
|
||||
看板项目执行查看 >> 看板1
|
||||
敏捷项目执行统计 >> 1
|
||||
敏捷项目执行统计 >> 1
|
||||
敏捷项目执行统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$projectIDList = array('11', '41', '71');
|
||||
$projectIDList = array(2, 3, 4);
|
||||
$count = array('0','1');
|
||||
$noRealEnd = array('realEnd' => '');
|
||||
$readjustTime = array('readjustTime' => '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getPairsTest($projectIDList[0],$count[0])) && p('101') && e('迭代1'); // 敏捷项目执行查看
|
||||
r($execution->getPairsTest($projectIDList[1],$count[0])) && p('221') && e('阶段121'); // 瀑布项目执行查看
|
||||
r($execution->getPairsTest($projectIDList[2],$count[0])) && p('161') && e('看板61'); // 看板项目执行查看
|
||||
r($execution->getPairsTest($projectIDList[0],$count[1])) && p() && e('7'); // 敏捷项目执行统计
|
||||
r($execution->getPairsTest($projectIDList[1],$count[1])) && p() && e('8'); // 敏捷项目执行统计
|
||||
r($execution->getPairsTest($projectIDList[2],$count[1])) && p() && e('6'); // 敏捷项目执行统计
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getPairsTest($projectIDList[0],$count[0])) && p('5') && e('迭代1'); // 敏捷项目执行查看
|
||||
r($executionTester->getPairsTest($projectIDList[1],$count[0])) && p('6') && e('阶段1'); // 瀑布项目执行查看
|
||||
r($executionTester->getPairsTest($projectIDList[2],$count[0])) && p('7') && e('看板1'); // 看板项目执行查看
|
||||
r($executionTester->getPairsTest($projectIDList[0],$count[1])) && p() && e('1'); // 敏捷项目执行统计
|
||||
r($executionTester->getPairsTest($projectIDList[1],$count[1])) && p() && e('1'); // 敏捷项目执行统计
|
||||
r($executionTester->getPairsTest($projectIDList[2],$count[1])) && p() && e('1'); // 敏捷项目执行统计
|
||||
|
||||
@@ -2,24 +2,44 @@
|
||||
<?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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$task->execution->range('4');
|
||||
$task->name->range('1-10')->prefix('任务');
|
||||
$task->type->range('design,devel,test,study,discuss,ui,affair,misc');
|
||||
$task->status->range('wait,doing,done,closed');
|
||||
$task->gen(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getPrevKanban();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询执行162数据 >> empty
|
||||
保存数据后查询执行162数据 >> 246
|
||||
查询执行4数据 >> empty
|
||||
保存数据后查询执行4数据 >> task1
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
$executionTester = new executionTest();
|
||||
|
||||
$emptyExecutionID = 163;
|
||||
$executionID = 162;
|
||||
$emptyExecutionID = 5;
|
||||
$executionID = 4;
|
||||
|
||||
r($execution->getPrevKanbanTest($emptyExecutionID)) && p('') && e('empty'); //查询执行162数据
|
||||
$execution->saveKanbanDataTest($executionID);
|
||||
r($execution->getPrevKanbanTest($executionID)) && p('story:0') && e('246'); //保存数据后查询执行162数据
|
||||
r($executionTester->getPrevKanbanTest($emptyExecutionID)) && p() && e('empty'); // 查询执行id=4数据
|
||||
$executionTester->saveKanbanDataTest($executionID);
|
||||
r($executionTester->getPrevKanbanTest($executionID)) && p('wait:0') && e('task1'); // 保存数据后查询执行id=4数据
|
||||
|
||||
@@ -2,21 +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-10');
|
||||
$execution->name->range('项目集1,项目1,项目2,项目3,项目4,项目5,项目6,迭代1,阶段1,看板1');
|
||||
$execution->type->range('program,project{6},sprint,stage,kanban');
|
||||
$execution->model->range('[],scrum{2},waterfall{2},kanban{2},[]{3}');
|
||||
$execution->parent->range('0,1{6},2,3,4');
|
||||
$execution->status->range('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(10);
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-10');
|
||||
$product->name->range('1-10')->prefix('产品');
|
||||
$product->code->range('1-10')->prefix('product');
|
||||
$product->type->range('normal');
|
||||
$product->program->range('1{2}, 2{3}, 3{5}');
|
||||
$product->status->range('normal');
|
||||
$product->gen(10);
|
||||
|
||||
$projectProduct = zdTable('projectproduct');
|
||||
$projectProduct->project->range('8{3}, 9{3}, 10{3}');
|
||||
$projectProduct->product->range('1-9');
|
||||
$projectProduct->branch->range('0');
|
||||
$projectProduct->gen(9);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->getProductGroupListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询当前用户访问的产品相关项目集 >> 项目集10
|
||||
查询当前用户访问的产品相关数量 >> 121
|
||||
查询当前用户访问的产品相关项目集 >> 项目集1
|
||||
查询当前用户访问的产品相关数量 >> 10
|
||||
|
||||
*/
|
||||
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getProductGroupListTest($count[0])) && p('9:name') && e('项目集10'); // 查询当前用户访问的产品相关项目集
|
||||
r($execution->getProductGroupListTest($count[1])) && p() && e('121'); // 查询当前用户访问的产品相关数量
|
||||
$executionTester = new executionTest();
|
||||
r($executionTester->getProductGroupListTest($count[0])) && p('0:name') && e('项目集1'); // 查询当前用户访问的产品相关项目集
|
||||
r($executionTester->getProductGroupListTest($count[1])) && p() && e('10'); // 查询当前用户访问的产品相关数量
|
||||
|
||||
@@ -2,6 +2,36 @@
|
||||
<?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);
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-3');
|
||||
$product->name->range('正常产品1,多分支产品1,多平台产品1');
|
||||
$product->type->range('normal,branch,platform');
|
||||
$product->status->range('closed{2},normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(3);
|
||||
|
||||
$projectproduct = zdTable('projectproduct');
|
||||
$projectproduct->project->range('1-10');
|
||||
$projectproduct->product->range('1-3');
|
||||
$projectproduct->plan->range('1-3');
|
||||
$projectproduct->gen(10);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,22 +41,21 @@ cid=1
|
||||
pid=1
|
||||
|
||||
查询敏捷执行关联查询 >> 项目1
|
||||
查询瀑布执行关联查询 >> 项目36
|
||||
查询看板执行关联查询 >> 项目57
|
||||
查询敏捷执行关联统计 >> 22
|
||||
查询瀑布执行关联统计 >> 26
|
||||
查询看板执行关联统计 >> 22
|
||||
查询瀑布执行关联查询 >> 项目3
|
||||
查询看板执行关联查询 >> 项目2
|
||||
查询敏捷执行关联统计 >> 2
|
||||
查询瀑布执行关联统计 >> 3
|
||||
查询看板执行关联统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','146', '617');
|
||||
$executionIDList = array('5','7', '9');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
//var_dump($execution->getRelatedExecutionsTest($executionIDList[2],$count[0]));die;
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[0],$count[0])) && p('11') && e('项目1'); // 查询敏捷执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[1],$count[0])) && p('46') && e('项目36'); // 查询瀑布执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[2],$count[0])) && p('67') && e('项目57'); // 查询看板执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[0],$count[1])) && p() && e('22'); // 查询敏捷执行关联统计
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[1],$count[1])) && p() && e('26'); // 查询瀑布执行关联统计
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[2],$count[1])) && p() && e('22'); // 查询看板执行关联统计
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[0],$count[0])) && p('2') && e('项目1'); // 查询敏捷执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[1],$count[0])) && p('4') && e('项目3'); // 查询瀑布执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[2],$count[0])) && p('3') && e('项目2'); // 查询看板执行关联查询
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[0],$count[1])) && p() && e('2'); // 查询敏捷执行关联统计
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[1],$count[1])) && p() && e('3'); // 查询瀑布执行关联统计
|
||||
r($execution->getRelatedExecutionsTest($executionIDList[2],$count[1])) && p() && e('2'); // 查询看板执行关联统计
|
||||
|
||||
@@ -2,6 +2,51 @@
|
||||
<?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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$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-10');
|
||||
$bug->title->range('1-10')->prefix('Bug');
|
||||
$bug->project->range('1');
|
||||
$bug->product->range('1');
|
||||
$bug->execution->range('3-5');
|
||||
$bug->status->range('active,wait,doing');
|
||||
$bug->gen(10);
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-3');
|
||||
$product->name->range('正常产品1,多分支产品1,多平台产品1');
|
||||
$product->type->range('normal,branch,platform');
|
||||
$product->status->range('closed{2},normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(3);
|
||||
|
||||
$projectproduct = zdTable('projectproduct');
|
||||
$projectproduct->project->range('5-10');
|
||||
$projectproduct->product->range('1-3');
|
||||
$projectproduct->plan->range('1-3');
|
||||
$projectproduct->gen(5);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,15 +55,15 @@ title=测试executionModel->getSearchBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询产品1bug >> 测试单转Bug1
|
||||
查询项目13bug优先级 >> 3
|
||||
查询产品1bug名称 >> Bug10
|
||||
查询执行3bug名称 >> Bug1
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array(1 => '正常产品1');
|
||||
$executionIDList = array('103');
|
||||
$executionIDList = array('3');
|
||||
$sql = '1=1';
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getSearchBugsTest($productIDList, 0, $sql)) && p('301:title') && e('测试单转Bug1'); // 查询产品1bug
|
||||
r($execution->getSearchBugsTest(array(), $executionIDList[0], $sql)) && p('303:pri') && e(3); // 查询项目13bug优先级
|
||||
r($execution->getSearchBugsTest($productIDList, 0, $sql)) && p('10:title') && e('Bug10'); // 查询产品1bug名称
|
||||
r($execution->getSearchBugsTest(array(), $executionIDList[0], $sql)) && p('1:title') && e('Bug1'); // 查询执行3bug名称
|
||||
|
||||
@@ -2,6 +2,35 @@
|
||||
<?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');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->project->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');
|
||||
$task->type->range('test,devel,design');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('1-10');
|
||||
$task->left->range('1-10');
|
||||
$task->consumed->range('1-10');
|
||||
$task->fromBug->range('0,1');
|
||||
$task->story->range('0,1');
|
||||
$task->parent->range('0,1');
|
||||
$task->module->range('0,2');
|
||||
$task->gen(10);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,49 +39,48 @@ title=executionModel->getSearchTasks();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0 >> 910:name:子任务10;909:name:子任务9;908:name:子任务8;
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0 >> 1:name:开发任务11;901:name:子任务1;902:name:子任务2;
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0 >> 910:name:子任务10;909:name:子任务9;908:name:子任务8;907:name:子任务7;906:name:子任务6;
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0 >> 1:name:开发任务11;901:name:子任务1;902:name:子任务2;903:name:子任务3;904:name:子任务4;
|
||||
测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 0
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11;
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11;
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11;
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '101' and story != '0' and parent >= 0 >> 1:name:开发任务11;
|
||||
测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 909:name:子任务9;901:name:子任务1;801:name:更多任务201;
|
||||
测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 1:name:开发任务11;65:name:开发任务75;73:name:开发任务83;
|
||||
测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 909:name:子任务9;901:name:子任务1;801:name:更多任务201;769:name:更多任务169;737:name:更多任务137;
|
||||
测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 1:name:开发任务11;65:name:开发任务75;73:name:开发任务83;81:name:开发任务91;89:name:开发任务99;
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '3' and deleted = '0' and parent >= 0 >> 10:name:任务10;9:name:任务9;8:name:任务8;
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '3' and deleted = '0' and parent >= 0 >> 1:name:任务1;3:name:任务3;
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '3' and deleted = '0' and parent >= 0 >> 10:name:任务10;9:name:任务9;8:name:任务8;7:name:任务7;6:name:任务6;
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '3' and deleted = '0' and parent >= 0 >> 1:name:任务1;3:name:任务3;5:name:任务5;
|
||||
测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 8:name:任务8;2:name:任务2;
|
||||
测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 2:name:任务2;8:name:任务8;
|
||||
测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0 >> 8:name:任务8;2:name:任务2;
|
||||
测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0 >> 2:name:任务2;8:name:任务8;
|
||||
测试通过sql语句获取3个任务 id 倒序 execution = '3' and story != '0' and parent >= 0 >> 10:name:任务10;8:name:任务8;6:name:任务6;
|
||||
测试通过sql语句获取3个任务 id 正序 execution = '3' and story != '0' and parent >= 0 >> 2:name:任务2;4:name:任务4;6:name:任务6;
|
||||
测试通过sql语句获取5个任务 id 倒序 execution = '3' and story != '0' and parent >= 0 >> 10:name:任务10;8:name:任务8;6:name:任务6;4:name:任务4;2:name:任务2;
|
||||
测试通过sql语句获取5个任务 id 正序 execution = '3' and story != '0' and parent >= 0 >> 2:name:任务2;4:name:任务4;6:name:任务6;8:name:任务8;10:name:任务10;
|
||||
测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 6:name:任务6;
|
||||
测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 6:name:任务6;
|
||||
测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0 >> 6:name:任务6;
|
||||
测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0 >> 6:name:任务6;
|
||||
|
||||
*/
|
||||
|
||||
$condition = array();
|
||||
$condition[] = "execution = '101' and deleted = '0' and parent >= 0";
|
||||
$condition[] = "execution = '3' and deleted = '0' and parent >= 0";
|
||||
$condition[] = "type = 'devel' and fromBug != '0' and parent >= 0";
|
||||
$condition[] = "execution = '101' and story != '0' and parent >= 0";
|
||||
$condition[] = "execution = '3' and story != '0' and parent >= 0";
|
||||
$condition[] = "module like '%2%' and type = 'design' and parent >= 0";
|
||||
|
||||
$recPerPage = array('3', '5');
|
||||
$orderBy = array('id_desc', 'id_asc');
|
||||
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[0])) && p() && e('910:name:子任务10;909:name:子任务9;908:name:子任务8;'); // 测试通过sql语句获取3个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11;901:name:子任务1;902:name:子任务2;'); // 测试通过sql语句获取3个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[0])) && p() && e('910:name:子任务10;909:name:子任务9;908:name:子任务8;907:name:子任务7;906:name:子任务6;'); // 测试通过sql语句获取5个任务 id 倒序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11;901:name:子任务1;902:name:子任务2;903:name:子任务3;904:name:子任务4;'); // 测试通过sql语句获取5个任务 id 正序 execution = '101' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[0])) && p() && e('0'); // 测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[1])) && p() && e('0'); // 测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[0])) && p() && e('0'); // 测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[1])) && p() && e('0'); // 测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[0])) && p() && e('1:name:开发任务11;'); // 测试通过sql语句获取3个任务 id 倒序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11;'); // 测试通过sql语句获取3个任务 id 正序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[0])) && p() && e('1:name:开发任务11;'); // 测试通过sql语句获取5个任务 id 倒序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11;'); // 测试通过sql语句获取5个任务 id 正序 execution = '101' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[0])) && p() && e('909:name:子任务9;901:name:子任务1;801:name:更多任务201;'); // 测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[1])) && p() && e('1:name:开发任务11;65:name:开发任务75;73:name:开发任务83;'); // 测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[0])) && p() && e('909:name:子任务9;901:name:子任务1;801:name:更多任务201;769:name:更多任务169;737:name:更多任务137;'); // 测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[1])) && p() && e('1:name:开发任务11;65:name:开发任务75;73:name:开发任务83;81:name:开发任务91;89:name:开发任务99;'); // 测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[0])) && p() && e('10:name:任务10;9:name:任务9;8:name:任务8;'); // 测试通过sql语句获取3个任务 id 倒序 execution = '3' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[0], $orderBy[1])) && p() && e('1:name:任务1;3:name:任务3;'); // 测试通过sql语句获取3个任务 id 正序 execution = '3' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[0])) && p() && e('10:name:任务10;9:name:任务9;8:name:任务8;7:name:任务7;6:name:任务6;'); // 测试通过sql语句获取5个任务 id 倒序 execution = '3' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[0], $recPerPage[1], $orderBy[1])) && p() && e('1:name:任务1;3:name:任务3;5:name:任务5;'); // 测试通过sql语句获取5个任务 id 正序 execution = '3' and deleted = '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[0])) && p() && e('8:name:任务8;2:name:任务2;'); // 测试通过sql语句获取3个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[0], $orderBy[1])) && p() && e('2:name:任务2;8:name:任务8;'); // 测试通过sql语句获取3个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[0])) && p() && e('8:name:任务8;2:name:任务2;'); // 测试通过sql语句获取5个任务 id 倒序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[1], $recPerPage[1], $orderBy[1])) && p() && e('2:name:任务2;8:name:任务8;'); // 测试通过sql语句获取5个任务 id 正序 type = 'devel' and fromBug != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[0])) && p() && e('10:name:任务10;8:name:任务8;6:name:任务6;'); // 测试通过sql语句获取3个任务 id 倒序 execution = '3' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[0], $orderBy[1])) && p() && e('2:name:任务2;4:name:任务4;6:name:任务6;'); // 测试通过sql语句获取3个任务 id 正序 execution = '3' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[0])) && p() && e('10:name:任务10;8:name:任务8;6:name:任务6;4:name:任务4;2:name:任务2;'); // 测试通过sql语句获取5个任务 id 倒序 execution = '3' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[2], $recPerPage[1], $orderBy[1])) && p() && e('2:name:任务2;4:name:任务4;6:name:任务6;8:name:任务8;10:name:任务10;'); // 测试通过sql语句获取5个任务 id 正序 execution = '3' and story != '0' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[0])) && p() && e('6:name:任务6;'); // 测试通过sql语句获取3个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[0], $orderBy[1])) && p() && e('6:name:任务6;'); // 测试通过sql语句获取3个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[0])) && p() && e('6:name:任务6;'); // 测试通过sql语句获取5个任务 id 倒序 module like '%2%' and type = 'design' and parent >= 0
|
||||
r($execution->getSearchTasksTest($condition[3], $recPerPage[1], $orderBy[1])) && p() && e('6:name:任务6;'); // 测试通过sql语句获取5个任务 id 正序 module like '%2%' and type = 'design' and parent >= 0
|
||||
|
||||
@@ -2,32 +2,70 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/execution.class.php';
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
$product = zdTable('product');
|
||||
$product->id->range('1-3');
|
||||
$product->name->range('正常产品1,多分支产品1,多平台产品1');
|
||||
$product->type->range('normal,branch,platform');
|
||||
$product->status->range('closed{2},normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(3);
|
||||
|
||||
$projectproduct = zdTable('projectproduct');
|
||||
$projectproduct->project->range('5-10');
|
||||
$projectproduct->product->range('1-3');
|
||||
$projectproduct->plan->range('1-3');
|
||||
$projectproduct->gen(5);
|
||||
|
||||
$branch = zdTable('branch');
|
||||
$branch->id->range('1-2');
|
||||
$branch->product->range('2');
|
||||
$branch->name->range('分支1,分支2');
|
||||
$branch->status->range('active');
|
||||
$branch->gen(2);
|
||||
|
||||
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->getStageLinkProductPairsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行产品查询 >> 多平台产品91
|
||||
瀑布执行产品查询 >> 已关闭的正常产品31
|
||||
看板执行产品查询 >> 已关闭的多分支产品61
|
||||
敏捷执行产品统计 >> 3
|
||||
瀑布执行产品统计 >> 3
|
||||
看板执行产品统计 >> 3
|
||||
敏捷执行产品查询 >> 正常产品1
|
||||
瀑布执行产品查询 >> 多平台产品1
|
||||
看板执行产品查询 >> 多分支产品1
|
||||
敏捷执行产品统计 >> 2
|
||||
瀑布执行产品统计 >> 2
|
||||
看板执行产品统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$sprintIDList = array('101', '102', '103');
|
||||
$stageIDList = array('131', '132', '133');
|
||||
$kanbanIDList = array('161', '162', '163');
|
||||
$sprintIDList = array('5', '6');
|
||||
$stageIDList = array('7', '8');
|
||||
$kanbanIDList = array('9', '10');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getStageLinkProductPairsTest($sprintIDList, $count[0])) && p('101') && e('多平台产品91'); // 敏捷执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($stageIDList, $count[0])) && p('131') && e('已关闭的正常产品31'); // 瀑布执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[0])) && p('161') && e('已关闭的多分支产品61'); // 看板执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($sprintIDList, $count[1])) && p() && e('3'); // 敏捷执行产品统计
|
||||
r($execution->getStageLinkProductPairsTest($stageIDList, $count[1])) && p() && e('3'); // 瀑布执行产品统计
|
||||
r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[1])) && p() && e('3'); // 看板执行产品统计
|
||||
r($execution->getStageLinkProductPairsTest($sprintIDList, $count[0])) && p('5') && e('正常产品1'); // 敏捷执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($stageIDList, $count[0])) && p('7') && e('多平台产品1'); // 瀑布执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[0])) && p('9') && e('多分支产品1'); // 看板执行产品查询
|
||||
r($execution->getStageLinkProductPairsTest($sprintIDList, $count[1])) && p() && e('2'); // 敏捷执行产品统计
|
||||
r($execution->getStageLinkProductPairsTest($stageIDList, $count[1])) && p() && e('2'); // 瀑布执行产品统计
|
||||
r($execution->getStageLinkProductPairsTest($kanbanIDList, $count[1])) && p() && e('1'); // 看板执行产品统计
|
||||
|
||||
@@ -2,6 +2,54 @@
|
||||
<?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');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->project->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-5');
|
||||
$task->type->range('test,devel');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('1-10');
|
||||
$task->left->range('1-10');
|
||||
$task->consumed->range('1-10');
|
||||
$task->gen(10);
|
||||
|
||||
$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');
|
||||
$projectproduct->plan->range('1-3');
|
||||
$projectproduct->gen(3);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->account->range('1-5')->prefix('user');
|
||||
$team->role->range('研发{3},测试{2}');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(5);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,36 +58,36 @@ title=测试 executionModel->getStatData();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试默认值 >> 0
|
||||
测试传入空值 >> 0
|
||||
测试projectID为1的所有未关闭执行 >> 0
|
||||
测试projectID为1的所有执行 >> 0
|
||||
测试projectID为1的未开始执行 >> 0
|
||||
测试projectID为1的进行中执行 >> 0
|
||||
测试projectID为1的已挂起执行 >> 0
|
||||
测试projectID为1的已关闭执行 >> 0
|
||||
测试projectID为1的我参与执行 >> 0
|
||||
测试projectID为1的搜索出来的执行 >> 0
|
||||
测试projectID为1的评审执行 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的所有执行 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的所有执行和任务 >> 0
|
||||
测试projectID为1, productID为1, branchID为0的非父阶段 >> 0
|
||||
测试projectID为11的所有未关闭执行 >> 7
|
||||
测试projectID为11的所有执行 >> 7
|
||||
测试projectID为11的未开始执行 >> 7
|
||||
测试projectID为11的进行中执行 >> 7
|
||||
测试projectID为11的已挂起执行 >> 7
|
||||
测试projectID为11的已关闭执行 >> 7
|
||||
测试projectID为11的我参与执行 >> 7
|
||||
测试projectID为11的搜索出来的执行 >> 7
|
||||
测试projectID为11的评审执行 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的所有执行 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的所有执行和任务 >> 7
|
||||
测试projectID为11, productID为1, branchID为0的非父阶段 >> 7
|
||||
测试默认值 >> 3
|
||||
测试传入空值 >> 3
|
||||
测试projectID为10的所有未关闭执行 >> 0
|
||||
测试projectID为10的所有执行 >> 0
|
||||
测试projectID为10的未开始执行 >> 0
|
||||
测试projectID为10的进行中执行 >> 0
|
||||
测试projectID为10的已挂起执行 >> 0
|
||||
测试projectID为10的已关闭执行 >> 0
|
||||
测试projectID为10的我参与执行 >> 0
|
||||
测试projectID为10的搜索出来的执行 >> 0
|
||||
测试projectID为10的评审执行 >> 0
|
||||
测试projectID为10, productID为1, branchID为0的所有执行 >> 0
|
||||
测试projectID为10, productID为1, branchID为0的所有执行和任务 >> 0
|
||||
测试projectID为10, productID为1, branchID为0的非父阶段 >> 0
|
||||
测试projectID为2的所有未关闭执行 >> 1
|
||||
测试projectID为2的所有执行 >> 1
|
||||
测试projectID为2的未开始执行 >> 1
|
||||
测试projectID为2的进行中执行 >> 1
|
||||
测试projectID为2的已挂起执行 >> 1
|
||||
测试projectID为2的已关闭执行 >> 1
|
||||
测试projectID为2的我参与执行 >> 1
|
||||
测试projectID为2的搜索出来的执行 >> 1
|
||||
测试projectID为2的评审执行 >> 1
|
||||
测试projectID为2, productID为1, branchID为0的所有执行 >> 1
|
||||
测试projectID为2, productID为1, branchID为0的所有执行和任务 >> 1
|
||||
测试projectID为2, productID为1, branchID为0的非父阶段 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$projectIdList = array(0, 1, 11);
|
||||
$projectIdList = array(0, 10, 2);
|
||||
$browseTypeList = array('all', 'wait', 'doing', 'suspended', 'closed', 'involved', 'bySearch', 'review');
|
||||
$productID = 1;
|
||||
$branchID = 0;
|
||||
@@ -48,29 +96,29 @@ $param = 'skipParent';
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
r($execution->getStatDataTest()) && p() && e('0'); // 测试默认值
|
||||
r($execution->getStatDataTest($projectIdList[0])) && p() && e('0'); // 测试传入空值
|
||||
r($execution->getStatDataTest($projectIdList[1])) && p() && e('0'); // 测试projectID为1的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0])) && p() && e('0'); // 测试projectID为1的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[1])) && p() && e('0'); // 测试projectID为1的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[2])) && p() && e('0'); // 测试projectID为1的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[3])) && p() && e('0'); // 测试projectID为1的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[4])) && p() && e('0'); // 测试projectID为1的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[5])) && p() && e('0'); // 测试projectID为1的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[6])) && p() && e('0'); // 测试projectID为1的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[7])) && p() && e('0'); // 测试projectID为1的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID)) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('0'); // 测试projectID为1, productID为1, branchID为0的非父阶段
|
||||
r($execution->getStatDataTest($projectIdList[2])) && p() && e('7'); // 测试projectID为11的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0])) && p() && e('7'); // 测试projectID为11的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[1])) && p() && e('7'); // 测试projectID为11的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[2])) && p() && e('7'); // 测试projectID为11的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[3])) && p() && e('7'); // 测试projectID为11的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[4])) && p() && e('7'); // 测试projectID为11的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[5])) && p() && e('7'); // 测试projectID为11的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[6])) && p() && e('7'); // 测试projectID为11的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[7])) && p() && e('7'); // 测试projectID为11的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID)) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('7'); // 测试projectID为11, productID为1, branchID为0的非父阶段
|
||||
r($execution->getStatDataTest()) && p() && e('3'); // 测试默认值
|
||||
r($execution->getStatDataTest($projectIdList[0])) && p() && e('3'); // 测试传入空值
|
||||
r($execution->getStatDataTest($projectIdList[1])) && p() && e('0'); // 测试projectID为10的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0])) && p() && e('0'); // 测试projectID为10的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[1])) && p() && e('0'); // 测试projectID为10的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[2])) && p() && e('0'); // 测试projectID为10的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[3])) && p() && e('0'); // 测试projectID为10的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[4])) && p() && e('0'); // 测试projectID为10的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[5])) && p() && e('0'); // 测试projectID为10的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[6])) && p() && e('0'); // 测试projectID为10的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[7])) && p() && e('0'); // 测试projectID为10的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID)) && p() && e('0'); // 测试projectID为10, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('0'); // 测试projectID为10, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[1], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('0'); // 测试projectID为10, productID为1, branchID为0的非父阶段
|
||||
r($execution->getStatDataTest($projectIdList[2])) && p() && e('1'); // 测试projectID为2的所有未关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0])) && p() && e('1'); // 测试projectID为2的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[1])) && p() && e('1'); // 测试projectID为2的未开始执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[2])) && p() && e('1'); // 测试projectID为2的进行中执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[3])) && p() && e('1'); // 测试projectID为2的已挂起执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[4])) && p() && e('1'); // 测试projectID为2的已关闭执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[5])) && p() && e('1'); // 测试projectID为2的我参与执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[6])) && p() && e('1'); // 测试projectID为2的搜索出来的执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[7])) && p() && e('1'); // 测试projectID为2的评审执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID)) && p() && e('1'); // 测试projectID为2, productID为1, branchID为0的所有执行
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[1]) && p() && e('1'); // 测试projectID为2, productID为1, branchID为0的所有执行和任务
|
||||
r($execution->getStatDataTest($projectIdList[2], $browseTypeList[0], $productID, $branchID), $withTasksList[0], $param) && p() && e('1'); // 测试projectID为2, productID为1, branchID为0的非父阶段
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env php
|
||||
<?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,项目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);
|
||||
|
||||
su('admin');
|
||||
/**
|
||||
|
||||
title=测试 executionModel::saveState();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查看传入空返回的下拉菜单 >> 执行
|
||||
查看传入id=1, 请求all方法的执行返回的下拉菜单 >> 0
|
||||
查看传入id=1,请求tasks方法的执行返回的下拉菜单 >> 项目集1
|
||||
|
||||
*/
|
||||
$methods = array('all', 'task');
|
||||
|
||||
$executionTester = new executionTest();
|
||||
$switcher1 = $executionTester->getSwitcherTest(0);
|
||||
$switcher2 = $executionTester->getSwitcherTest(1, $methods[0]);
|
||||
$switcher3 = $executionTester->getSwitcherTest(1, $methods[1]);
|
||||
|
||||
r(strip_tags($switcher1)) && p() && e('执行'); // 查看传入空返回的下拉菜单
|
||||
r(strip_tags($switcher2)) && p() && e('0'); // 查看传入id=1, 请求all方法的执行返回的下拉菜单
|
||||
r(strip_tags($switcher3)) && p() && e('项目集1'); // 查看传入id=1,请求tasks方法的执行返回的下拉菜单
|
||||
@@ -2,6 +2,31 @@
|
||||
<?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');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->project->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-5');
|
||||
$task->type->range('test,devel');
|
||||
$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');
|
||||
|
||||
/**
|
||||
@@ -10,13 +35,13 @@ title=测试 executionModel->getTaskGroupByExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试空数据 >> 0
|
||||
测试空数据 >> 0
|
||||
测试获取执行的任务 >> 3
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$executionIdList = array(0, 1, 101, 131, 161);
|
||||
$executionIdList = array(0, 3, 4, 5);
|
||||
|
||||
$execution = new executionTest();
|
||||
|
||||
|
||||
@@ -2,6 +2,49 @@
|
||||
<?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');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->project->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-5');
|
||||
$task->type->range('test,devel');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('1-10');
|
||||
$task->left->range('1-10');
|
||||
$task->consumed->range('1-10');
|
||||
$task->gen(10);
|
||||
|
||||
$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);
|
||||
|
||||
$query = zdTable('userquery');
|
||||
$query->id->range('1');
|
||||
$query->account->range('admin');
|
||||
$query->module->range('task');
|
||||
$query->title->range('搜索条件1');
|
||||
$query->form->range('`a:59:{s:9:"fieldname";s:0:"";s:11:"fieldstatus";s:0:"";s:9:"fielddesc";s:0:"";s:15:"fieldassignedTo";s:0:"";s:8:"fieldpri";s:1:"0";s:14:"fieldexecution";s:0:"";s:11:"fieldmodule";s:4:"ZERO";s:13:"fieldestimate";s:0:"";s:9:"fieldleft";s:0:"";s:13:"fieldconsumed";s:0:"";s:9:"fieldtype";s:0:"";s:12:"fieldfromBug";s:0:"";s:17:"fieldclosedReason";s:0:"";s:13:"fieldopenedBy";s:0:"";s:15:"fieldfinishedBy";s:0:"";s:13:"fieldclosedBy";s:0:"";s:15:"fieldcanceledBy";s:0:"";s:17:"fieldlastEditedBy";s:0:"";s:11:"fieldmailto";s:0:"";s:15:"fieldopenedDate";s:0:"";s:13:"fielddeadline";s:0:"";s:15:"fieldestStarted";s:0:"";s:16:"fieldrealStarted";s:0:"";s:17:"fieldassignedDate";s:0:"";s:17:"fieldfinishedDate";s:0:"";s:15:"fieldclosedDate";s:0:"";s:17:"fieldcanceledDate";s:0:"";s:19:"fieldlastEditedDate";s:0:"";s:18:"fieldactivatedDate";s:0:"";s:7:"fieldid";s:0:"";s:6:"andOr1";s:3:"AND";s:6:"field1";s:4:"name";s:9:"operator1";s:7:"include";s:6:"value1";s:6:"任务";s:6:"andOr2";s:3:"and";s:6:"field2";s:2:"id";s:9:"operator2";s:1:"=";s:6:"value2";s:0:"";s:6:"andOr3";s:3:"and";s:6:"field3";s:6:"status";s:9:"operator3";s:1:"=";s:6:"value3";s:0:"";s:10:"groupAndOr";s:3:"and";s:6:"andOr4";s:3:"AND";s:6:"field4";s:4:"desc";s:9:"operator4";s:7:"include";s:6:"value4";s:0:"";s:6:"andOr5";s:3:"and";s:6:"field5";s:10:"assignedTo";s:9:"operator5";s:1:"=";s:6:"value5";s:0:"";s:6:"andOr6";s:3:"and";s:6:"field6";s:3:"pri";s:9:"operator6";s:1:"=";s:6:"value6";s:1:"0";s:6:"module";s:4:"task";s:9:"actionURL";s:41:"/execution-task-3-bySearch-myQueryID.html";s:10:"groupItems";s:1:"3";s:8:"formType";s:4:"lite";}`');
|
||||
$query->sql->range("`(( 1 AND `name` LIKE '%任务%' ) AND ( 1 )) AND deleted = '0'`");
|
||||
$query->gen(1);
|
||||
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,38 +53,38 @@ title=测试executionModel->getTasksTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行任务查询 >> 101,开发任务11
|
||||
瀑布执行任务查询 >> 131,41
|
||||
看板执行任务查询 >> 161,done
|
||||
正常产品查询任务 >> 101,开发任务11
|
||||
unclosed任务查询 >> 101,wait
|
||||
wait任务查询 >> 101,wait
|
||||
doing任务查询 >> 101,doing
|
||||
undone任务查询 >> 101,doing
|
||||
done任务查询 >> 101,done
|
||||
根据查询条件查询任务 >> 101,开发任务11
|
||||
根据模块查询任务 >> 101,21
|
||||
name_asc,id_asc排序查询 >> 101,开发任务11
|
||||
id_asc排序查询 >> 101,design
|
||||
pri_desc,id_desc排序查询 >> 101,wait
|
||||
敏捷执行任务查询统计 >> 4
|
||||
瀑布执行任务查询统计 >> 4
|
||||
看板执行任务查询统计 >> 4
|
||||
正常产品查询任务统计 >> 1
|
||||
unclosed任务查询统计 >> 4
|
||||
wat任务查询统计 >> 2
|
||||
doing任务查询统计 >> 1
|
||||
undone任务查询统计 >> 3
|
||||
done任务查询统计 >> 1
|
||||
根据查询条件查询任务统计 >> 1
|
||||
根据模块查询任务统计 >> 8
|
||||
name_asc,id_asc排序查询统计 >> 4
|
||||
id_asc排序查询统计 >> 4
|
||||
敏捷执行任务查询 >> 3,任务1
|
||||
瀑布执行任务查询 >> 4,0
|
||||
看板执行任务查询 >> 5,wait
|
||||
正常产品查询任务 >> 0
|
||||
unclosed任务查询 >> 3,wait
|
||||
wait任务查询 >> 3,wait
|
||||
doing任务查询 >> 3,doing
|
||||
undone任务查询 >> 3,doing
|
||||
done任务查询 >> 0
|
||||
根据查询条件查询任务 >> 3,任务1
|
||||
根据模块查询任务 >> 0
|
||||
name_asc,id_asc排序查询 >> 3,任务1
|
||||
id_asc排序查询 >> 3,test
|
||||
pri_desc,id_desc排序查询 >> 3,wait
|
||||
敏捷执行任务查询统计 >> 4
|
||||
瀑布执行任务查询统计 >> 3
|
||||
看板执行任务查询统计 >> 3
|
||||
正常产品查询任务统计 >> 0
|
||||
unclosed任务查询统计 >> 4
|
||||
wat任务查询统计 >> 2
|
||||
doing任务查询统计 >> 2
|
||||
undone任务查询统计 >> 4
|
||||
done任务查询统计 >> 0
|
||||
根据查询条件查询任务统计 >> 4
|
||||
根据模块查询任务统计 >> 0
|
||||
name_asc,id_asc排序查询统计 >> 4
|
||||
id_asc排序查询统计 >> 4
|
||||
pri_desc,id_desc排序查询统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('0', '101', '131', '161');
|
||||
$executionIDList = array('0', '3', '4', '5');
|
||||
$productIDList = array('0', '1');
|
||||
$browseType = array('all', 'unclosed', 'wait', 'doing', 'undone', 'done', 'closed', 'bysearch');
|
||||
$queryID = array('0', '1');
|
||||
@@ -50,31 +93,31 @@ $sort = array('status,id_desc', 'name_asc,id_asc', 'id_asc', 'pri_des
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('101,开发任务11'); // 敏捷执行任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[2],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('693:execution,project') && e('131,41'); // 瀑布执行任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[3],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('783:execution,status') && e('161,done'); // 看板执行任务查询
|
||||
r($execution->getTasksTest($productIDList[1],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('101,开发任务11'); // 正常产品查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[1],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,status') && e('101,wait'); // unclosed任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[2],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('601:execution,status') && e('101,wait'); // wait任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('602:execution,status') && e('101,doing'); // doing任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('602:execution,status') && e('101,doing'); // undone任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('603:execution,status') && e('101,done'); // done任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('101,开发任务11'); // 根据查询条件查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[0])) && p('601:execution,module') && e('101,21'); // 根据模块查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[0])) && p('1:execution,name') && e('101,开发任务11'); // name_asc,id_asc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[0])) && p('601:execution,type') && e('101,design'); // id_asc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[0])) && p('1:execution,status') && e('101,wait'); // pri_desc,id_desc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // 敏捷执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[2],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // 瀑布执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[3],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // 看板执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[1],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // 正常产品查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[1],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // unclosed任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[2],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('2'); // wat任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // doing任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('3'); // undone任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // done任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[1])) && p() && e('1'); // 根据查询条件查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('8'); // 根据模块查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[1])) && p() && e('4'); // name_asc,id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[1])) && p() && e('4'); // id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[1])) && p() && e('4'); // pri_desc,id_desc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('3,任务1'); // 敏捷执行任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[2],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('2:execution,project') && e('4,0'); // 瀑布执行任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[3],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('3:execution,status') && e('5,wait'); // 看板执行任务查询
|
||||
r($execution->getTasksTest($productIDList[1],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('0'); // 正常产品查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[1],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,status') && e('3,wait'); // unclosed任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[2],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('1:execution,status') && e('3,wait'); // wait任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('4:execution,status') && e('3,doing'); // doing任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('4:execution,status') && e('3,doing'); // undone任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[0])) && p('3:execution,status') && e('0'); // done任务查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[0])) && p('1:execution,name') && e('3,任务1'); // 根据查询条件查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[0])) && p('1:execution,module') && e('0'); // 根据模块查询任务
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[0])) && p('1:execution,name') && e('3,任务1'); // name_asc,id_asc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[0])) && p('1:execution,type') && e('3,test'); // id_asc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[0])) && p('1:execution,status') && e('3,wait'); // pri_desc,id_desc排序查询
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // 敏捷执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[2],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('3'); // 瀑布执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[3],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('3'); // 看板执行任务查询统计
|
||||
r($execution->getTasksTest($productIDList[1],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('0'); // 正常产品查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[1],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // unclosed任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[2],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('2'); // wat任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('2'); // doing任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[4],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // undone任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[5],$queryID[0],$moduleID[0],$sort[0],$count[1])) && p() && e('0'); // done任务查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[7],$queryID[1],$moduleID[0],$sort[0],$count[1])) && p() && e('4'); // 根据查询条件查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[1],$sort[0],$count[1])) && p() && e('0'); // 根据模块查询任务统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[1],$count[1])) && p() && e('4'); // name_asc,id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[2],$count[1])) && p() && e('4'); // id_asc排序查询统计
|
||||
r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[0],$queryID[0],$moduleID[0],$sort[3],$count[1])) && p() && e('4'); // pri_desc,id_desc排序查询统计
|
||||
|
||||
@@ -2,6 +2,39 @@
|
||||
<?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');
|
||||
$execution->parent->range('0,0,1,1,2');
|
||||
$execution->project->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-5');
|
||||
$task->type->range('test,devel');
|
||||
$task->status->range('wait,doing');
|
||||
$task->estimate->range('1-10');
|
||||
$task->left->range('1-10');
|
||||
$task->consumed->range('1-10');
|
||||
$task->gen(10);
|
||||
|
||||
$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);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,22 +43,22 @@ title=测试executionModel->getTasks2ImportedTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行任务查看 >> 更多任务1
|
||||
瀑布执行任务查看 >> test
|
||||
敏捷执行任务查看 >> 任务1
|
||||
瀑布执行任务查看 >> devel
|
||||
看板执行任务查看 >> wait
|
||||
敏捷执行任务统计 >> 3
|
||||
敏捷执行任务统计 >> 4
|
||||
敏捷执行任务统计 >> 3
|
||||
敏捷执行任务统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getTasks2ImportedTest($executionIDList[0],$count[0])) && p('601:name') && e('更多任务1'); // 敏捷执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[1],$count[0])) && p('691:type') && e('test'); // 瀑布执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[2],$count[0])) && p('61:status') && e('wait'); // 看板执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[0],$count[1])) && p() && e('3'); // 敏捷执行任务统计
|
||||
r($execution->getTasks2ImportedTest($executionIDList[1],$count[1])) && p() && e('3'); // 敏捷执行任务统计
|
||||
r($execution->getTasks2ImportedTest($executionIDList[2],$count[1])) && p() && e('3'); // 敏捷执行任务统计
|
||||
r($execution->getTasks2ImportedTest($executionIDList[0],$count[0])) && p('1:name') && e('任务1'); // 敏捷执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[1],$count[0])) && p('2:type') && e('devel'); // 瀑布执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[2],$count[0])) && p('3:status') && e('wait'); // 看板执行任务查看
|
||||
r($execution->getTasks2ImportedTest($executionIDList[0],$count[1])) && p() && e('4'); // 敏捷执行任务统计
|
||||
r($execution->getTasks2ImportedTest($executionIDList[1],$count[1])) && p() && e('3'); // 敏捷执行任务统计
|
||||
r($execution->getTasks2ImportedTest($executionIDList[2],$count[1])) && p() && e('3'); // 敏捷执行任务统计
|
||||
|
||||
@@ -2,6 +2,28 @@
|
||||
<?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);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->account->range('1-5')->prefix('user');
|
||||
$team->role->range('研发{3},测试{2}');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(5);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,22 +32,22 @@ title=测试executionModel->getTeamMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查看team >> 101,execution,482
|
||||
瀑布执行查看team >> 131,execution,开发22
|
||||
看板执行查看team >> 161,execution,开发52
|
||||
敏捷执行查看team >> 3,execution,2
|
||||
瀑布执行查看team >> 4,execution,用户2
|
||||
看板执行查看team >> 5,execution,用户3
|
||||
敏捷执行team统计 >> 2
|
||||
瀑布执行team统计 >> 1
|
||||
看板执行team统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getTeamMembersTest($executionIDList[0], $count[0])) && p('po82:root,type,userID') && e('101,execution,482'); // 敏捷执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[1], $count[0])) && p('test22:root,type,realname') && e('131,execution,开发22'); // 瀑布执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[2], $count[0])) && p('test52:root,type,realname') && e('161,execution,开发52'); // 看板执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行team统计
|
||||
r($execution->getTeamMembersTest($executionIDList[1], $count[1])) && p() && e('1'); // 瀑布执行team统计
|
||||
r($execution->getTeamMembersTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行team统计
|
||||
r($execution->getTeamMembersTest($executionIDList[0], $count[0])) && p('user1:root,type,userID') && e('3,execution,2'); // 敏捷执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[1], $count[0])) && p('user2:root,type,realname') && e('4,execution,用户2'); // 瀑布执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[2], $count[0])) && p('user3:root,type,realname') && e('5,execution,用户3'); // 看板执行查看team
|
||||
r($execution->getTeamMembersTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行team统计
|
||||
r($execution->getTeamMembersTest($executionIDList[1], $count[1])) && p() && e('1'); // 瀑布执行team统计
|
||||
r($execution->getTeamMembersTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行team统计
|
||||
|
||||
@@ -2,6 +2,25 @@
|
||||
<?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-6');
|
||||
$execution->name->range('项目1,迭代1,迭代2,迭代3,迭代4,迭代5');
|
||||
$execution->type->range('project,stage,sprint,stage{2},sprint');
|
||||
$execution->parent->range('0,1{3},2{2}');
|
||||
$execution->status->range('wait');
|
||||
$execution->gen(6);
|
||||
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->account->range('1-5')->prefix('user');
|
||||
$team->role->range('研发{3},测试{2}');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(5);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,17 +29,18 @@ title=测试executionModel->getTeams2ImportTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
无效数据查询 >> 无数据
|
||||
正常数据查询 >> 迭代91
|
||||
无效数据查询 >> 无数据
|
||||
正常数据查询 >> 迭代3
|
||||
正常数据查询统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '101';
|
||||
$accountList = array('test7', 'test82');
|
||||
$executionID = '2';
|
||||
$accountList = array('user10', 'user5');
|
||||
$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'); // 正常数据查询统计
|
||||
|
||||
r($execution->getTeams2ImportTest($accountList[0], $executionID, $count[0])) && p() && e('无数据'); // 无效数据查询
|
||||
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[0])) && p('4') && e('迭代3'); // 正常数据查询
|
||||
r($execution->getTeams2ImportTest($accountList[1], $executionID, $count[1])) && p() && e('1'); // 正常数据查询统计
|
||||
|
||||
@@ -2,6 +2,15 @@
|
||||
<?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-7');
|
||||
$execution->name->range('项目1,迭代1,迭代2,阶段3,阶段4,看板5,看板6');
|
||||
$execution->type->range('project,sprint{2},stage{2},kanban{2}');
|
||||
$execution->parent->range('0,1,2,1,4,1,5');
|
||||
$execution->status->range('wait');
|
||||
$execution->gen(7);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,24 +20,24 @@ cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行查询 >> 迭代1
|
||||
瀑布执行查询 >> 阶段31
|
||||
看板执行查询 >> 看板61
|
||||
瀑布执行查询 >> 阶段3
|
||||
看板执行查询 >> 看板5
|
||||
敏捷执行统计 >> 2
|
||||
瀑布执行统计 >> 2
|
||||
看板执行统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$sprintExecutions = array('101', '102');
|
||||
$stageExecutions = array('131', '132');
|
||||
$kanbanExecutions = array('161', '162');
|
||||
$sprintExecutions = array('2', '3');
|
||||
$stageExecutions = array('4', '5');
|
||||
$kanbanExecutions = array('6', '7');
|
||||
$type = array('sprint', 'stage', 'kanban');
|
||||
$count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getToImportTest($sprintExecutions,$type[0],$count[0])) && p('101') && e('迭代1'); // 敏捷执行查询
|
||||
r($execution->getToImportTest($stageExecutions,$type[1],$count[0])) && p('131') && e('阶段31'); // 瀑布执行查询
|
||||
r($execution->getToImportTest($kanbanExecutions,$type[2],$count[0])) && p('161') && e('看板61'); // 看板执行查询
|
||||
r($execution->getToImportTest($sprintExecutions,$type[0],$count[1])) && p('') && e('2'); // 敏捷执行统计
|
||||
r($execution->getToImportTest($stageExecutions,$type[1],$count[1])) && p('') && e('2'); // 瀑布执行统计
|
||||
r($execution->getToImportTest($kanbanExecutions,$type[2],$count[1])) && p('') && e('2'); // 看板执行统计
|
||||
r($execution->getToImportTest($sprintExecutions,$type[0],$count[0])) && p('2') && e('迭代1'); // 敏捷执行查询
|
||||
r($execution->getToImportTest($stageExecutions,$type[1],$count[0])) && p('4') && e('阶段3'); // 瀑布执行查询
|
||||
r($execution->getToImportTest($kanbanExecutions,$type[2],$count[0])) && p('6') && e('看板5'); // 看板执行查询
|
||||
r($execution->getToImportTest($sprintExecutions,$type[0],$count[1])) && p('') && e('2'); // 敏捷执行统计
|
||||
r($execution->getToImportTest($stageExecutions,$type[1],$count[1])) && p('') && e('2'); // 瀑布执行统计
|
||||
r($execution->getToImportTest($kanbanExecutions,$type[2],$count[1])) && p('') && e('2'); // 看板执行统计
|
||||
|
||||
@@ -2,6 +2,28 @@
|
||||
<?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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$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);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,17 +32,17 @@ title=测试executionModel->getTotalEstimateTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行预计工时统计 >> 48
|
||||
瀑布执行预计工时统计 >> 17
|
||||
看板执行预计工时统计 >> 20
|
||||
敏捷执行预计工时统计 >> 24
|
||||
瀑布执行预计工时统计 >> 18
|
||||
看板执行预计工时统计 >> 18
|
||||
无执行预计工时统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getTotalEstimateTest($executionIDList[0])) && p() && e('48'); // 敏捷执行预计工时统计
|
||||
r($execution->getTotalEstimateTest($executionIDList[1])) && p() && e('17'); // 瀑布执行预计工时统计
|
||||
r($execution->getTotalEstimateTest($executionIDList[2])) && p() && e('20'); // 看板执行预计工时统计
|
||||
r($execution->getTotalEstimateTest('')) && p() && e('0'); // 无执行预计工时统计
|
||||
r($execution->getTotalEstimateTest($executionIDList[0])) && p() && e('24'); // 敏捷执行预计工时统计
|
||||
r($execution->getTotalEstimateTest($executionIDList[1])) && p() && e('18'); // 瀑布执行预计工时统计
|
||||
r($execution->getTotalEstimateTest($executionIDList[2])) && p() && e('18'); // 看板执行预计工时统计
|
||||
r($execution->getTotalEstimateTest('')) && p() && e('0'); // 无执行预计工时统计
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/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->getTreeTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关闭 >> status,wait,getTreed
|
||||
瀑布执行关闭 >> status,doing,getTreed
|
||||
看板执行关闭 >> status,doing,getTreed
|
||||
不输入实际完成时间校验 >> 『realEnd』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','131', '161');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
var_dump($execution->getTreeTest($executionIDList[0],$count[0]));die;
|
||||
r($execution->getTreeTest($executionIDList[0],$count[0])) && p('91') && e('0,101,102'); // 敏捷项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[1],$count[0])) && p('46') && e('0,11,12'); // 瀑布项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[2],$count[0])) && p('57') && e('0,33,34'); // 看板项目下根据执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[3],$count[0])) && p('21') && e('0'); // 非分支产品执行查询产品分支
|
||||
r($execution->getTreeTest($executionIDList[0],$count[1])) && p() && e('3'); // 敏捷执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[1],$count[1])) && p() && e('2'); // 瀑布执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[2],$count[1])) && p() && e('2'); // 看板执行关联产品分支统计
|
||||
r($execution->getTreeTest($executionIDList[3],$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,6 +2,28 @@
|
||||
<?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);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->account->range('1-5')->prefix('user');
|
||||
$team->role->range('研发{3},测试{2}');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(5);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,16 +32,16 @@ title=测试executionModel->manageMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
团队管理 >> 101,execution,dev10
|
||||
团队管理 >> 3,execution,user1
|
||||
团队人员管理统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionID = '101';
|
||||
$realnames = array('研发主管82', '测试92');
|
||||
$executionID = '3';
|
||||
$realnames = array('用户1', '用户2', 'admin');
|
||||
$roles = array('研发', '研发', '研发');
|
||||
$hours = array('3.0', '6.0', '7.0');
|
||||
$accounts = array('po82', 'user92', 'dev10');
|
||||
$accounts = array('user1', 'user2', 'admin');
|
||||
$limited = array('yes', 'no', 'yes');
|
||||
$days = array('17', '27', '127');
|
||||
|
||||
@@ -27,5 +49,5 @@ $manageMembers = array('realnames' => $realnames, 'roles' => $roles, 'hours' =>
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->manageMembersTest($executionID, $count[0], $manageMembers)) && p('0:root,type,account') && e('101,execution,dev10'); // 团队管理
|
||||
r($execution->manageMembersTest($executionID, $count[1], $manageMembers)) && p() && e('3'); // 团队人员管理统计
|
||||
r($execution->manageMembersTest($executionID, $count[0], $manageMembers)) && p('0:root,type,account') && e('3,execution,user1'); // 团队管理
|
||||
r($execution->manageMembersTest($executionID, $count[1], $manageMembers)) && 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看板空数据
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/usr/bin/env php
|
||||
<?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,2,3');
|
||||
$execution->name->range('执行1,执行2,执行3');
|
||||
$execution->type->range('sprint');
|
||||
$execution->grade->range('1');
|
||||
$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(3);
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->saveState();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
执行ID存在但无权访问 >> html
|
||||
执行ID不存在 >> 0
|
||||
执行ID存在,但不在可以查看的执行列表 >> 1
|
||||
执行ID存在,且在可以查看的执行列表 >> 2
|
||||
执行ID不存在,且有可以查看的执行列表 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionTester = new executionTest();
|
||||
ob_start();
|
||||
$executionTester->saveStateTest(1);
|
||||
$execution1 = ob_get_clean();
|
||||
$execution2 = $executionTester->saveStateTest(0);
|
||||
$execution3 = $executionTester->saveStateTest(1, array(1 => ''));
|
||||
$execution4 = $executionTester->saveStateTest(3, array(2 => ''));
|
||||
$execution5 = $executionTester->saveStateTest(0, array(2 => ''));
|
||||
|
||||
r(substr($execution1, 1, 4)) && p() && e('html'); // 执行ID存在但无权访问
|
||||
r($execution2) && p() && e('0'); // 执行ID不存在
|
||||
r($execution3) && p() && e('1'); // 执行ID存在,但不在可以查看的执行列表
|
||||
r($execution4) && p() && e('2'); // 执行ID存在,且在可以查看的执行列表
|
||||
r($execution5) && p() && e('2'); // 执行ID不存在,且有可以查看的执行列表
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env php
|
||||
<?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('execution,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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel::select();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
检查下拉菜单默认选中迭代1 >> 迭代1
|
||||
|
||||
*/
|
||||
|
||||
$executionTester = new executionTest();
|
||||
$html = $executionTester->selectTest('3', 'execution', 'all');
|
||||
|
||||
r(strip_tags($html)) && p() && e('迭代1'); // 检查下拉菜单默认选中迭代1
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?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('execution,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);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel::setMenu();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
执行存在的情况 >> 迭代1
|
||||
执行不存在的情况 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$executionTester = new executionTest();
|
||||
|
||||
r($executionTester->setMenuTest(3)) && p() && e('迭代1'); // 执行存在的情况
|
||||
r($executionTester->setMenuTest(10)) && p() && e('0'); // 执行不存在的情况
|
||||
@@ -2,6 +2,15 @@
|
||||
<?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-6');
|
||||
$execution->name->range('项目1,迭代1,迭代2,迭代3,迭代4,迭代5');
|
||||
$execution->type->range('project,stage,sprint,stage{2},sprint');
|
||||
$execution->parent->range('0,1{3},2{2}');
|
||||
$execution->status->range('wait');
|
||||
$execution->gen(6);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,15 +19,15 @@ title=测试executionModel->setTreePathTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
子阶段设置path >> 41,131,,41,131,701,
|
||||
子阶段设置path >> 11,11,,11,101,
|
||||
子阶段设置path >> 41,41,,41,131,
|
||||
子阶段设置path >> 0,1,,1,2,
|
||||
子阶段设置path >> 0,1,,1,4,
|
||||
子阶段设置path >> 0,2,,1,2,5,
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('701', '101', '131');
|
||||
$executionIDList = array('2', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->setTreePathTest($executionIDList[0])) && p('701:project,parent,path') && e('41,131,,41,131,701,'); // 子阶段设置path
|
||||
r($execution->setTreePathTest($executionIDList[1])) && p('101:project,parent,path') && e('11,11,,11,101,'); // 子阶段设置path
|
||||
r($execution->setTreePathTest($executionIDList[2])) && p('131:project,parent,path') && e('41,41,,41,131,'); // 子阶段设置path
|
||||
r($execution->setTreePathTest($executionIDList[0])) && p('2:project,parent,path') && e('0,1,,1,2,'); // 子阶段设置path
|
||||
r($execution->setTreePathTest($executionIDList[1])) && p('4:project,parent,path') && e('0,1,,1,4,'); // 子阶段设置path
|
||||
r($execution->setTreePathTest($executionIDList[2])) && p('5:project,parent,path') && e('0,2,,1,2,5,'); // 子阶段设置path
|
||||
|
||||
@@ -2,7 +2,14 @@
|
||||
<?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,迭代1,迭代2,迭代3,迭代4,迭代5');
|
||||
$execution->type->range('project,sprint{2},waterfall{2},kanban{1}');
|
||||
$execution->parent->range('0,1{3},2{2}');
|
||||
$execution->status->range('wait');
|
||||
$execution->gen(6);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,15 +18,15 @@ title=测试executionModel->startTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行开始 >> status,wait,doing
|
||||
瀑布阶段开始 >> status,wait,doing
|
||||
看板执行开始 >> status,wait,doing
|
||||
重复执行开始 >> 此任务已被启动,不能重复启动!
|
||||
敏捷执行开始 >> status,wait,doing
|
||||
瀑布阶段开始 >> status,wait,doing
|
||||
看板执行开始 >> status,wait,doing
|
||||
重复执行开始 >> 此任务已被启动,不能重复启动!
|
||||
子瀑布开启获取父瀑布状态 >> doing
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161', '103', '701');
|
||||
$executionIDList = array('2', '3', '4', '5');
|
||||
|
||||
$noRealBegan = array('realBegan' => '');
|
||||
|
||||
@@ -29,4 +36,3 @@ r($execution->startTest($executionIDList[1])) && p('1:field,old,n
|
||||
r($execution->startTest($executionIDList[2])) && p('1:field,old,new') && e('status,wait,doing'); // 看板执行开始
|
||||
r($execution->startTest($executionIDList[0],$noRealBegan)) && p() && e('此任务已被启动,不能重复启动!'); // 重复执行开始
|
||||
r($execution->startTest($executionIDList[3], array(), true)) && p('status') && e('doing'); // 子瀑布开启获取父瀑布状态
|
||||
$db->restoreDB();
|
||||
|
||||
@@ -2,6 +2,48 @@
|
||||
<?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);
|
||||
|
||||
$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);
|
||||
|
||||
$projectstory = zdTable('projectstory');
|
||||
$projectstory->project->range('3-5');
|
||||
$projectstory->product->range('1-3');
|
||||
$projectstory->story->range('4,324,364');
|
||||
$projectstory->gen(3);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$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-10');
|
||||
$bug->project->range('1,2,1');
|
||||
$bug->execution->range('3,4,5');
|
||||
$bug->status->range('wait,doing');
|
||||
$bug->gen(10);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,15 +52,15 @@ title=测试executionModel->statRelatedDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行数据统计 >> 2
|
||||
瀑布执行数据统计 >> 4
|
||||
敏捷执行数据统计 >> 1
|
||||
瀑布执行数据统计 >> 3
|
||||
看板执行数据统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('2'); // 敏捷执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[1])) && p('taskCount') && e('4'); // 瀑布执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[2])) && p('bugCount') && e('3'); // 看板执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('1'); // 敏捷执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[1])) && p('taskCount') && e('3'); // 瀑布执行数据统计
|
||||
r($execution->statRelatedDataTest($executionIDList[2])) && p('bugCount') && e('3'); // 看板执行数据统计
|
||||
|
||||
@@ -2,6 +2,28 @@
|
||||
<?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);
|
||||
|
||||
$task = zdTable('task');
|
||||
$task->id->range('1-10');
|
||||
$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);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -10,15 +32,15 @@ title=测试executionModel->summaryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行任务统计 >> 本页共 <strong>14</strong> 个任务,未开始 <strong>4</strong>,进行中 <strong>3</strong>,总预计 <strong>3</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>3</strong> 工时。
|
||||
瀑布执行任务统计 >> 本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>17</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>17</strong> 工时。
|
||||
看板执行任务统计 >> 本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>20</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>20</strong> 工时。
|
||||
敏捷执行任务统计 >> 本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>2</strong>,总预计 <strong>24</strong> 工时,已消耗 <strong>12</strong> 工时,剩余 <strong>12</strong> 工时。
|
||||
瀑布执行任务统计 >> 本页共 <strong>3</strong> 个任务,未开始 <strong>1</strong>,进行中 <strong>2</strong>,总预计 <strong>18</strong> 工时,已消耗 <strong>9</strong> 工时,剩余 <strong>9</strong> 工时。
|
||||
看板执行任务统计 >> 本页共 <strong>3</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>18</strong> 工时,已消耗 <strong>9</strong> 工时,剩余 <strong>9</strong> 工时。
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->summaryTest($executionIDList[0])) && p() && e('本页共 <strong>14</strong> 个任务,未开始 <strong>4</strong>,进行中 <strong>3</strong>,总预计 <strong>3</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>3</strong> 工时。'); // 敏捷执行任务统计
|
||||
r($execution->summaryTest($executionIDList[1])) && p() && e('本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>17</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>17</strong> 工时。'); // 瀑布执行任务统计
|
||||
r($execution->summaryTest($executionIDList[2])) && p() && e('本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>20</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>20</strong> 工时。'); // 看板执行任务统计
|
||||
r($execution->summaryTest($executionIDList[0])) && p() && e('本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>2</strong>,总预计 <strong>24</strong> 工时,已消耗 <strong>12</strong> 工时,剩余 <strong>12</strong> 工时。'); // 敏捷执行任务统计
|
||||
r($execution->summaryTest($executionIDList[1])) && p() && e('本页共 <strong>3</strong> 个任务,未开始 <strong>1</strong>,进行中 <strong>2</strong>,总预计 <strong>18</strong> 工时,已消耗 <strong>9</strong> 工时,剩余 <strong>9</strong> 工时。'); // 瀑布执行任务统计
|
||||
r($execution->summaryTest($executionIDList[2])) && p() && e('本页共 <strong>3</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>18</strong> 工时,已消耗 <strong>9</strong> 工时,剩余 <strong>9</strong> 工时。'); // 看板执行任务统计
|
||||
|
||||
@@ -2,7 +2,14 @@
|
||||
<?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-7');
|
||||
$execution->name->range('项目1,迭代1,迭代2,迭代3,迭代4,迭代5,迭代6');
|
||||
$execution->type->range('project,sprint{2},waterfall{2},kanban{2}');
|
||||
$execution->status->range('doing,wait');
|
||||
$execution->gen(7);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,17 +18,17 @@ title=测试executionModel->suspendTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
wait敏捷执行挂起 >> status,wait,suspended
|
||||
wait敏捷执行挂起 >> status,wait,suspended
|
||||
doing敏捷执行挂起 >> status,doing,suspended
|
||||
wait瀑布执行挂起 >> status,wait,suspended
|
||||
wait瀑布执行挂起 >> status,wait,suspended
|
||||
doing瀑布执行挂起 >> status,doing,suspended
|
||||
wait看板执行挂起 >> status,wait,suspended
|
||||
wait看板执行挂起 >> status,wait,suspended
|
||||
doing看板执行挂起 >> status,doing,suspended
|
||||
挂起后再次挂起 >> 0
|
||||
挂起后再次挂起 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('103', '104', '133', '134', '163', '164');
|
||||
$executionIDList = array('2', '3', '4', '5', '6', '7');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->suspendTest($executionIDList[0])) && p('0:field,old,new') && e('status,wait,suspended'); // wait敏捷执行挂起
|
||||
@@ -31,4 +38,3 @@ r($execution->suspendTest($executionIDList[3])) && p('0:field,old,new') && e('st
|
||||
r($execution->suspendTest($executionIDList[4])) && p('0:field,old,new') && e('status,wait,suspended'); // wait看板执行挂起
|
||||
r($execution->suspendTest($executionIDList[5])) && p('0:field,old,new') && e('status,doing,suspended'); // doing看板执行挂起
|
||||
r($execution->suspendTest($executionIDList[0])) && p() && e('0'); // 挂起后再次挂起
|
||||
$db->restoreDB();
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.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('execution,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-2');
|
||||
$product->name->range('正常产品1,多分支产品1');
|
||||
$product->type->range('normal,branch');
|
||||
$product->status->range('normal');
|
||||
$product->createdBy->range('admin,user1');
|
||||
$product->gen(2);
|
||||
|
||||
$branch = zdTable('branch');
|
||||
$branch->id->range('1-2');
|
||||
$branch->product->range('2');
|
||||
$branch->name->range('分支1,分支2');
|
||||
$branch->status->range('active');
|
||||
$branch->gen(2);
|
||||
|
||||
$projectProduct = zdTable('projectproduct');
|
||||
$projectProduct->project->range('3{3}, 4{3}, 5{3}');
|
||||
$projectProduct->product->range('1-2{2}');
|
||||
$projectProduct->branch->range('0-2');
|
||||
$projectProduct->gen(9);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 executionModel::tree();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
检查执行列表的树状结构 >> 正常产品1
|
||||
|
||||
*/
|
||||
|
||||
global $tester;
|
||||
$treeHtml = $tester->loadModel('execution')->tree();
|
||||
|
||||
r(strip_tags($treeHtml)) && p() && e('正常产品1'); // 检查执行列表的树状结构
|
||||
@@ -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');
|
||||
|
||||
/**
|
||||
@@ -17,7 +50,7 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$products = array('1', '43', '68');
|
||||
$stories = array('2', '170', '270');
|
||||
$count = array('0','1');
|
||||
@@ -26,5 +59,3 @@ $execution = new executionTest();
|
||||
r($execution->unlinkCasesTest($executionIDList[0], $products[0], $stories[0])) && p() && e('0'); // 敏捷执行解除关联用例
|
||||
r($execution->unlinkCasesTest($executionIDList[1], $products[1], $stories[1])) && p() && e('0'); // 瀑布执行解除关联用例
|
||||
r($execution->unlinkCasesTest($executionIDList[2], $products[2], $stories[2])) && p() && e('0'); // 看板执行解除关联用例
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,31 +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);
|
||||
|
||||
$team = zdTable('team');
|
||||
$team->root->range('3-5');
|
||||
$team->account->range('1-5')->prefix('user');
|
||||
$team->role->range('研发{3},测试{2}');
|
||||
$team->type->range('execution');
|
||||
$team->join->range('20220112 000000:0')->type('timestamp')->format('YY/MM/DD');
|
||||
$team->gen(5);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试executionModel->unlinkMemberTest();
|
||||
title=测试executionModel->unlinkMember();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行解除团队成员 >> po82,研发
|
||||
敏捷执行解除团队成员 >> user4,测试
|
||||
敏捷执行解除团队成员后统计 >> 1
|
||||
瀑布执行解除团队成员 >> 0
|
||||
看板执行解除团队成员 >> 0
|
||||
瀑布执行解除团队成员 >> user2,研发
|
||||
看板执行解除团队成员 >> 0
|
||||
看板执行解除团队成员后统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$accountList = array('user92', 'test22', 'test52');
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$accountList = array('user1', 'user2', 'user3');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$count = array('0','1');
|
||||
|
||||
$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[0])) && p('0:account,role') && e('user4,测试'); // 敏捷执行解除团队成员
|
||||
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('0'); // 看板执行解除团队成员
|
||||
r($execution->unlinkMemberTest($executionIDList[1], $accountList[1], $count[0])) && p('0:account,role') && e('user2,研发'); // 瀑布执行解除团队成员
|
||||
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();
|
||||
|
||||
@@ -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->unlinkStoryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行解除关联需求 >> 0
|
||||
瀑布执行解除关联需求 >> 131,1,4
|
||||
看板执行解除关联需求 >> 161,1,4
|
||||
敏捷执行关联需求统计 >> 0
|
||||
瀑布执行关联需求统计 >> 1
|
||||
看板执行关联需求统计 >> 1
|
||||
敏捷执行解除关联需求 >> 3,2,324
|
||||
瀑布执行解除关联需求 >> 4,1,4
|
||||
看板执行解除关联需求 >> 5,1,4
|
||||
敏捷执行关联需求统计 >> 2
|
||||
瀑布执行关联需求统计 >> 2
|
||||
看板执行关联需求统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$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->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();
|
||||
r($execution->unlinkStoryTest($executionIDList[0], $count[0], $stories[0], $story)) && p('0:project,product,story') && e('3,2,324'); // 敏捷执行解除关联需求
|
||||
r($execution->unlinkStoryTest($executionIDList[1], $count[0], $stories[1], $story)) && p('0:project,product,story') && e('4,1,4'); // 瀑布执行解除关联需求
|
||||
r($execution->unlinkStoryTest($executionIDList[2], $count[0], $stories[2], $story)) && p('0:project,product,story') && e('5,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'); // 看板执行关联需求统计
|
||||
|
||||
@@ -2,7 +2,32 @@
|
||||
<?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-11');
|
||||
$execution->name->setFields(array(
|
||||
array('field' => 'name1', 'range' => '项目{2},执行{3},迭代{2},阶段{2},看板{2}'),
|
||||
array('field' => 'name2', 'range' => '1-3'),
|
||||
));
|
||||
$execution->code->setFields(array(
|
||||
array('field' => 'name1', 'range' => '项目{2},执行{3},迭代{2},阶段{2},看板{2}'),
|
||||
array('field' => 'name2', 'range' => '1-3'),
|
||||
));
|
||||
$execution->type->range('project{2},sprint{5},waterfall{2},kanban{2}');
|
||||
$execution->status->range('doing{11}');
|
||||
$execution->parent->range('0');
|
||||
$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(11);
|
||||
|
||||
$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);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,50 +36,48 @@ title=测试executionModel->update();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试重复迭代code >> 『迭代代号』已经有『project1』这条记录了。
|
||||
测试修改迭代名称 >> name,迭代1,迭代名修改
|
||||
测试修改迭代项目为瀑布项目 >> project,11,41
|
||||
测试修改迭代项目为看板项目 >> project,41,71
|
||||
测试修改迭代code >> code,project31,code修改
|
||||
测试修改迭代工作日 >> days,0,5
|
||||
测试修改迭代类型 >> lifetime,,long
|
||||
测试修改迭代状态为wait >> status,wait,doing
|
||||
测试修改迭代状态为closed >> status,doing,closed
|
||||
测试修改名称为空 >> 『阶段名称』不能为空。
|
||||
测试修改code为空 >> 『迭代代号』不能为空。
|
||||
测试无修改 >> 没有数据更新
|
||||
测试重复迭代code >> 『迭代代号』已经有『执行2』这条记录了。
|
||||
测试修改迭代名称 >> name,执行3,迭代名修改
|
||||
测试修改迭代项目为瀑布项目 >> project,0,1
|
||||
测试修改迭代项目为看板项目 >> project,1,2
|
||||
测试修改迭代code >> code,执行1,code修改
|
||||
测试修改迭代工作日 >> days,0,5
|
||||
测试修改迭代类型 >> lifetime,,long
|
||||
测试修改迭代状态为wait >> status,doing,wait
|
||||
测试修改迭代状态为closed >> status,wait,closed
|
||||
测试修改名称为空 >> 『迭代名称』不能为空。
|
||||
测试修改code为空 >> 『迭代代号』不能为空。
|
||||
测试无修改 >> 没有数据更新
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','131','251','4','5','6','7','8','9');
|
||||
$productIDList = array('2','82','92');
|
||||
$executionIDList = array('3','4','5','6','7','8','9','10','11');
|
||||
$productIDList = array('2','1','3');
|
||||
|
||||
$changeName = array('name' => '迭代名修改', 'code' => '迭代名修改code');
|
||||
$changeStage = array('project' =>'41', 'code' => '修改code');
|
||||
$changeKanban = array('project' =>'71', 'code' => '修改code2');
|
||||
$changeKanban = array('project' =>'71', 'code' => '修改code3');
|
||||
$changeStage = array('project' =>'1', 'code' => '修改code');
|
||||
$changeKanban = array('project' =>'2', 'code' => '修改code2');
|
||||
$changeKanban = array('project' =>'2', 'code' => '修改code3');
|
||||
$changeCode = array('code' => 'code修改');
|
||||
$changeDays = array('days' => '5');
|
||||
$changeLifetime = array('lifetime' => 'long');
|
||||
$changeDoing = array('status' => 'doing');
|
||||
$changeDoing = array('status' => 'wait');
|
||||
$changeClosed = array('status' => 'closed');
|
||||
$noChange = array();
|
||||
$noName = array('name' => '');
|
||||
$noCode = array('code' => '');
|
||||
$repeatcode = array('name' => '迭代名修改1');
|
||||
$repeatcode = array('name' => '迭代1', 'code' => '执行2');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->updateObject($executionIDList[0], $repeatcode)) && p('code:0') && e('『迭代代号』已经有『project1』这条记录了。'); // 测试重复迭代code
|
||||
r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,迭代1,迭代名修改'); // 测试修改迭代名称
|
||||
r($execution->updateObject($executionIDList[0], $changeStage)) && p('0:field,old,new') && e('project,11,41'); // 测试修改迭代项目为瀑布项目
|
||||
r($execution->updateObject($executionIDList[0], $changeKanban)) && p('0:field,old,new') && e('project,41,71'); // 测试修改迭代项目为看板项目
|
||||
r($execution->updateObject($executionIDList[1], $changeCode)) && p('0:field,old,new') && e('code,project31,code修改'); // 测试修改迭代code
|
||||
r($execution->updateObject($executionIDList[1], $changeDays)) && p('0:field,old,new') && e('days,0,5'); // 测试修改迭代工作日
|
||||
r($execution->updateObject($executionIDList[1], $changeLifetime)) && p('0:field,old,new') && e('lifetime,,long'); // 测试修改迭代类型
|
||||
r($execution->updateObject($executionIDList[1], $changeDoing)) && p('0:field,old,new') && e('status,wait,doing'); // 测试修改迭代状态为wait
|
||||
r($execution->updateObject($executionIDList[1], $changeClosed)) && p('0:field,old,new') && e('status,doing,closed'); // 测试修改迭代状态为closed
|
||||
r($execution->updateObject($executionIDList[1], $noName)) && p('name:0') && e('『阶段名称』不能为空。'); // 测试修改名称为空
|
||||
r($execution->updateObject($executionIDList[1], $noCode)) && p('code:0') && e('『迭代代号』不能为空。'); // 测试修改code为空
|
||||
r($execution->updateObject($executionIDList[1], $noChange)) && p() && e('没有数据更新'); // 测试无修改
|
||||
|
||||
$db->restoreDB();
|
||||
r($execution->updateObject($executionIDList[0], $repeatcode)) && p('code:0') && e('『迭代代号』已经有『执行2』这条记录了。'); // 测试重复迭代code
|
||||
r($execution->updateObject($executionIDList[0], $changeName)) && p('0:field,old,new') && e('name,执行3,迭代名修改'); // 测试修改迭代名称
|
||||
r($execution->updateObject($executionIDList[0], $changeStage)) && p('0:field,old,new') && e('project,0,1'); // 测试修改迭代项目为瀑布项目
|
||||
r($execution->updateObject($executionIDList[0], $changeKanban)) && p('0:field,old,new') && e('project,1,2'); // 测试修改迭代项目为看板项目
|
||||
r($execution->updateObject($executionIDList[1], $changeCode)) && p('0:field,old,new') && e('code,执行1,code修改'); // 测试修改迭代code
|
||||
r($execution->updateObject($executionIDList[1], $changeDays)) && p('0:field,old,new') && e('days,0,5'); // 测试修改迭代工作日
|
||||
r($execution->updateObject($executionIDList[1], $changeLifetime)) && p('0:field,old,new') && e('lifetime,,long'); // 测试修改迭代类型
|
||||
r($execution->updateObject($executionIDList[1], $changeDoing)) && p('0:field,old,new') && e('status,doing,wait'); // 测试修改迭代状态为wait
|
||||
r($execution->updateObject($executionIDList[1], $changeClosed)) && p('0:field,old,new') && e('status,wait,closed'); // 测试修改迭代状态为closed
|
||||
r($execution->updateObject($executionIDList[1], $noName)) && p('name:0') && e('『迭代名称』不能为空。'); // 测试修改名称为空
|
||||
r($execution->updateObject($executionIDList[3], $noCode)) && p('code') && e('『迭代代号』不能为空。'); // 测试修改code为空
|
||||
r($execution->updateObject($executionIDList[1], $noChange)) && p() && e('没有数据更新'); // 测试无修改
|
||||
|
||||
@@ -2,7 +2,19 @@
|
||||
<?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-11');
|
||||
$execution->name->setFields(array(
|
||||
array('field' => 'name1', 'range' => '项目{2},执行{3},迭代{2},阶段{2},看板{2}'),
|
||||
array('field' => 'name2', 'range' => '1-3'),
|
||||
));
|
||||
$execution->type->range('project{2},sprint{5},waterfall{2},kanban{2}');
|
||||
$execution->status->range('doing{11}');
|
||||
$execution->parent->range('0');
|
||||
$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(11);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,19 +23,19 @@ title=测试executionModel->updateChildsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
修改敏捷执行的父执行 >> 102,迭代2
|
||||
修改敏捷执行的父执行 >> 133,阶段33
|
||||
修改敏捷执行的父执行 >> 162,看板62
|
||||
修改敏捷执行的父执行 >> 6,迭代3
|
||||
修改敏捷执行的父执行 >> 9,阶段3
|
||||
修改敏捷执行的父执行 >> 10,看板1
|
||||
修改敏捷执行的父执行 >> 2
|
||||
修改敏捷执行的父执行 >> 2
|
||||
修改敏捷执行的父执行 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$sprintExecutionID = array('102', '103');
|
||||
$stageExecutionID = array('132', '133');
|
||||
$kanbanExecutionID = array('162', '163');
|
||||
$executionIDList = array('3', '4', '5');
|
||||
$sprintExecutionID = array('6', '7');
|
||||
$stageExecutionID = array('8', '9');
|
||||
$kanbanExecutionID = array('10', '11');
|
||||
$count = array('0','1');
|
||||
|
||||
$sprintChilds = array('childs' => $sprintExecutionID);
|
||||
@@ -31,11 +43,9 @@ $stageChilds = array('childs' => $stageExecutionID);
|
||||
$kanbanChilds = array('childs' => $kanbanExecutionID);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->updateChildsTest($executionIDList[0], $count[0], $sprintChilds)) && p('0:id,name') && e('102,迭代2'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[1], $count[0], $stageChilds)) && p('1:id,name') && e('133,阶段33'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[2], $count[0], $kanbanChilds)) && p('0:id,name') && e('162,看板62'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[0], $count[1], $sprintChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[1], $count[1], $stageChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[2], $count[1], $kanbanChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
|
||||
$db->restoreDB();
|
||||
r($execution->updateChildsTest($executionIDList[0], $count[0], $sprintChilds)) && p('0:id,name') && e('6,迭代3'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[1], $count[0], $stageChilds)) && p('1:id,name') && e('9,阶段3'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[2], $count[0], $kanbanChilds)) && p('0:id,name') && e('10,看板1'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[0], $count[1], $sprintChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[1], $count[1], $stageChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
r($execution->updateChildsTest($executionIDList[2], $count[1], $kanbanChilds)) && p() && e('2'); // 修改敏捷执行的父执行
|
||||
|
||||
@@ -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,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);
|
||||
|
||||
$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);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,19 +32,17 @@ title=测试executionModel->updateProductsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试修改敏捷执行关联产品 >> 2
|
||||
测试修改瀑布执行关联产品 >> 82
|
||||
测试修改看板执行关联产品 >> 92
|
||||
测试修改敏捷执行关联产品 >> 1
|
||||
测试修改瀑布执行关联产品 >> 2
|
||||
测试修改看板执行关联产品 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101','131','251');
|
||||
$productIDlist = array('2','82','92');
|
||||
$executionIDList = array('3','4','5');
|
||||
$productIDlist = array('1','2','3');
|
||||
$products = array('products' => $productIDlist);
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->updateProductsTest($executionIDList[0], $products)) && p('0:product') && e('2'); // 测试修改敏捷执行关联产品
|
||||
r($execution->updateProductsTest($executionIDList[1], $products)) && p('1:product') && e('82'); // 测试修改瀑布执行关联产品
|
||||
r($execution->updateProductsTest($executionIDList[2], $products)) && p('2:product') && e('92'); // 测试修改看板执行关联产品
|
||||
|
||||
$db->restoreDB();
|
||||
r($execution->updateProductsTest($executionIDList[0], $products)) && p('0:product') && e('1'); // 测试修改敏捷执行关联产品
|
||||
r($execution->updateProductsTest($executionIDList[1], $products)) && p('1:product') && e('2'); // 测试修改瀑布执行关联产品
|
||||
r($execution->updateProductsTest($executionIDList[2], $products)) && p('2:product') && e('3'); // 测试修改看板执行关联产品
|
||||
|
||||
@@ -2,7 +2,24 @@
|
||||
<?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{3}');
|
||||
$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);
|
||||
|
||||
zdTable('user')->gen(5);
|
||||
zdTable('team')->gen(0);
|
||||
zdTable('product')->gen(0);
|
||||
zdTable('userview')->gen(0);
|
||||
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -11,15 +28,10 @@ title=测试executionModel->updateUserView();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
默认情况下的用户是否有201权限 >> 400
|
||||
删除执行201后dev1用户是否有201权限 >> 0
|
||||
默认情况下的用户是否有执行的可视权限 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$executionID = 201;
|
||||
|
||||
$execution = new executionTest();
|
||||
r(strpos($execution->updateUserViewTest($executionID), '201,')) && p() && e('400'); // 默认情况下的用户是否有201权限
|
||||
$tester->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec();
|
||||
r(strpos($execution->updateUserViewTest($executionID, 'sprint', array('dev1')), '201,')) && p() && e('0'); // 删除执行201后dev1用户是否有201权限
|
||||
$db->restoreDB();
|
||||
|
||||
r(strpos($execution->updateUserViewTest(5), ',5,')) && p() && e('2'); // 默认情况下的用户是否有执行的可视权限
|
||||
|
||||
@@ -4,7 +4,7 @@ include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
|
||||
/**
|
||||
|
||||
title=测试 programModel::getStakeholdersByPrograms();
|
||||
title=测试 programModel::accessDenied();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
|
||||
@@ -2,24 +2,35 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
|
||||
su('admin');
|
||||
|
||||
$user = zdTable('user');
|
||||
$user->gen(300);
|
||||
|
||||
$userGroup = zdTable('usergroup');
|
||||
$userGroup->gen(100);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel->authorize();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取用户的权限,返回权限列表,是否有备注权限 >> 1
|
||||
获取用户的权限,返回权限列表,是否有激活测试单权限 >> 1
|
||||
获取空用户名的权限,返回空 >> 0
|
||||
获取用户的权限,返回权限列表,是否有产品首页权限 >> 1
|
||||
获取游客的权限,返回权限列表,是否有任务详情的权限 >> 1
|
||||
获取不存在的用户的可访问项目,返回空 >> 0
|
||||
获取空的用户的权限,返回空 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$user = new userTest();
|
||||
$rights = $user->authorizeTest('test2');
|
||||
$user = new userTest();
|
||||
|
||||
r($rights['rights']) && p('action:comment') && e('1'); //获取用户的权限,返回权限列表,是否有备注权限
|
||||
r($rights['rights']) && p('testtask:activate') && e('1'); //获取用户的权限,返回权限列表,是否有激活测试单权限
|
||||
r($user->authorizeTest('sadf!!@#a')) && p('projects') && e(''); //获取不存在的用户的权限,返回空
|
||||
r($user->authorizeTest('')) && p('') && e('0'); //获取空用户名的权限,返回空
|
||||
$normalUser = $user->authorizeTest('test10');
|
||||
$guest = $user->authorizeTest('guest');
|
||||
$notExistsUser = $user->authorizeTest('sadf!!@#a');
|
||||
|
||||
r($normalUser['rights']) && p('product:index') && e('1'); //获取用户的权限,返回权限列表,是否有产品首页权限
|
||||
r($guest['rights']) && p('task:view') && e('1'); //获取游客的权限,返回权限列表,是否有任务详情的权限
|
||||
r($notExistsUser['projects']) && p('') && e('0'); //获取不存在的用户的可访问项目,返回空
|
||||
r($user->authorizeTest('')) && p('') && e('0'); //获取空的用户的权限,返回空
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
zdTable('user')->gen(1);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel->batchCreate();
|
||||
@@ -23,9 +24,26 @@ $normalUser['realname'] = array(1 => '新测试用户1', 2 => '新测试用户2'
|
||||
$normalUser['visions'] = array(1 => array('rnd'), 2 => array('rnd','lite'), 3 => array('lite'));
|
||||
$normalUser['role'] = array(1 => 'qa', 2 => 'dev', 3 => 'pm');
|
||||
$normalUser['email'] = array(1 => 'testasd@163.com', 2 => '', 3 => '11773@qq.com');
|
||||
$normalUser['password'] = array(1 => 'e10adc3949ba59abbe56e057f20f883e', 2 => 'e10adc3949ba59abbe56e057f20f883e', 3 => 'e10adc3949ba59abbe56e057f20f883e');
|
||||
$normalUser['password'] = array(1 => 'Zentao123@', 2 => 'Zentao123@', 3 => 'Zentao123@');
|
||||
$normalUser['dept'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['join'] = array(1 => '2023-01-01', 2 => '2023-01-01', 3 => '2023-01-01');
|
||||
$normalUser['type'] = array(1 => 'inside', 2 => 'inside', 3 => 'inside');
|
||||
$normalUser['group'] = array(1 => array(), 2 => array(), 3 => array());
|
||||
$normalUser['gender'] = array(1 => 'm', 2 => 'm', 3 => 'm');
|
||||
$normalUser['compnay'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['commiter'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['skype'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['qq'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['dingding'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['weixin'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['mobile'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['slack'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['whatsapp'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['phone'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['address'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['zipcode'] = array(1 => '', 2 => '', 3 => '');
|
||||
$normalUser['ditto'] = array(1 => '', 2 => '', 3 => '');
|
||||
|
||||
r($user->batchCreateUserTest($normalUser)) && p('0:account') && e('newtestuser1'); //获取插入的第一个用户的account
|
||||
zdTable('user')->gen(1);
|
||||
r($user->batchCreateUserTest($normalUser)) && p('2:realname') && e('新测试用户3'); //获取插入的最后一个用户的realname
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,9 +2,10 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
zdTable('user')->gen(15);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel->batchEdit();
|
||||
@@ -18,14 +19,26 @@ pid=1
|
||||
|
||||
$user = new userTest();
|
||||
$normalUser = array();
|
||||
$normalUser['account'] = array(998 => 'newtestuser1', 999 => 'newtestuser2', 1000 => 'newtestuser3');
|
||||
$normalUser['realname'] = array(998 => '新测试用户1', 999 => '新测试用户2', 1000 => '新测试用户3');
|
||||
$normalUser['visions'] = array(998 => 'rnd', 999 => 'rnd,lite', 1000 => 'lite');
|
||||
$normalUser['role'] = array(998 => 'qa', 999 => 'dev', 1000 => 'pm');
|
||||
$normalUser['email'] = array(998 => 'testasd@163.com', 999 => '', 1000 => '11773@qq.com');
|
||||
$normalUser['password'] = array(998 => 'e10adc3949ba59abbe56e057f20f883e', 999 => 'e10adc3949ba59abbe56e057f20f883e', 1000 => 'e10adc3949ba59abbe56e057f20f883e');
|
||||
$normalUser['account'] = array(8 => 'newtestuser1', 9 => 'newtestuser2', 10 => 'newtestuser3');
|
||||
$normalUser['realname'] = array(8 => '新测试用户1', 9 => '新测试用户2', 10 => '新测试用户3');
|
||||
$normalUser['commiter'] = array(8 => 'user1', 9 => 'user2', 10 => 'user3');
|
||||
$normalUser['email'] = array(8 => 'testasd@163.com', 9 => '', 10 => '11773@qq.com');
|
||||
$normalUser['type'] = array(8 => 'inside', 9 => 'inside', 10 => 'outside');
|
||||
$normalUser['join'] = array(8 => '0000-00-00', 9 => '0000-00-00', 10 => '0000-00-00');
|
||||
$normalUser['skype'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['qq'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['dingding'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['weixin'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['mobile'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['slack'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['whatsapp'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['phone'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['address'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['zipcode'] = array(8 => '', 9 => '', 10 => '');
|
||||
$normalUser['visions'] = array(8 => array('rnd'), 9 => array('rnd', 'lite'), 10 => array('lite'));
|
||||
$normalUser['dept'] = array(8 => '1', 9 => '1', 10 => '1');
|
||||
$normalUser['role'] = array(8 => 'qa', 9 => 'dev', 10 => 'pm');
|
||||
$normalUser['password'] = array(8 => 'e10adc3949ba59abbe56e057f20f883e', 9 => 'e10adc3949ba59abbe56e057f20f883e', 10 => 'e10adc3949ba59abbe56e057f20f883e');
|
||||
|
||||
r($user->batchEditUserTest($normalUser)) && p('998:account') && e('newtestuser1'); //获取编辑后的第一个用户的account
|
||||
r($user->batchEditUserTest($normalUser)) && p('1000:realname') && e('新测试用户3'); //获取编辑的最后一个用户的真实姓名
|
||||
|
||||
$db->restoreDB();
|
||||
r($user->batchEditUserTest($normalUser)) && p('8:account') && e('newtestuser1'); //获取编辑后的第一个用户的account
|
||||
r($user->batchEditUserTest($normalUser)) && p('10:realname') && e('新测试用户3'); //获取编辑的最后一个用户的真实姓名
|
||||
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
$now = date('Y-m-d H:i:s', time() - 20 * 60);
|
||||
$now = str_replace(array('-', ':'), array(), $now);
|
||||
|
||||
$user = zdTable('user');
|
||||
$user->id->range('1-10');
|
||||
$user->account->range('admin,user1,user2,user3,user4,user5,user6,user7,user8,user9');
|
||||
$user->password->range('a0933c1218a4e745bacdcf572b10eba7');
|
||||
$user->realname->range('1-10')->prefix('用户');
|
||||
$user->locked->range("$now:2m")->type('timestamp')->format('YY/MM/DD hh:mm:ss');
|
||||
$user->gen(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel->cleanLocked();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取user2账号的锁定状态 >> unlocked
|
||||
获取user7账号的锁定状态 >> locked
|
||||
|
||||
*/
|
||||
|
||||
$user = new userTest();
|
||||
$userLocked = $user->checkLockedTest('user2');
|
||||
$unlockedUser = $user->checkLockedTest('user7');
|
||||
|
||||
r($userLocked) && p() && e('unlocked'); //获取user2账号的锁定状态
|
||||
r($unlockedUser) && p() && e('locked'); //获取user7账号的锁定状态
|
||||
@@ -2,9 +2,10 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
zdTable('user')->gen(10);
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel->checkPassword();
|
||||
@@ -12,8 +13,8 @@ cid=1
|
||||
pid=1
|
||||
|
||||
正常的用户密码 >> 无报错
|
||||
两次密码不相同的情况 >> 两次密码应该相同。
|
||||
密码强度小于系统设定 >> 您的密码强度小于系统设定。
|
||||
两次密码不相同的情况 >> 两次密码应该相同。<br/>
|
||||
密码强度小于系统设定 >> 密码必须6位及以上,且包含大小写字母、数字。<br/>
|
||||
使用常见简单密码,给出错误提示 >> 密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。
|
||||
|
||||
*/
|
||||
@@ -31,11 +32,10 @@ $differentPassword = $normalUser;
|
||||
$differentPassword['password2'] = '!@#!@#asfasf';
|
||||
|
||||
$simplePassword = $normalUser;
|
||||
$simplePassword['password1'] = '123456';
|
||||
$simplePassword['password2'] = '123456';
|
||||
$simplePassword['password1'] = 'e10adc3949ba59abbe56e057f20f883e';
|
||||
$simplePassword['password2'] = 'e10adc3949ba59abbe56e057f20f883e';
|
||||
|
||||
r($user->checkPasswordTest($normalUser)) && p('password') && e('无报错'); //正常的用户密码
|
||||
r($user->checkPasswordTest($differentPassword)) && p('password:0') && e('两次密码应该相同。'); //两次密码不相同的情况
|
||||
r($user->checkPasswordTest($weakPassword)) && p('password1:0') && e('您的密码强度小于系统设定。'); //密码强度小于系统设定
|
||||
r($user->checkPasswordTest($simplePassword)) && p('password1:0') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示
|
||||
$db->restoreDB();
|
||||
r($user->checkPasswordTest($differentPassword)) && p('password1:0') && e('两次密码应该相同。<br/>'); //两次密码不相同的情况
|
||||
r($user->checkPasswordTest($weakPassword)) && p('password1:0') && e('密码必须6位及以上,且包含大小写字母、数字。<br/>'); //密码强度小于系统设定
|
||||
r($user->checkPasswordTest($simplePassword)) && p('password1') && e('密码不能使用【123456,password,12345,12345678,qwerty,123456789,1234,1234567,abc123,111111,123123】这些常用弱口令。'); //使用常见简单密码,给出错误提示
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user