Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -8,4 +8,8 @@ if($this->config->edition != 'open')
|
||||
$lang->resource->company->allTodo = 'allTodo';
|
||||
$lang->resource->company->effort = 'companyEffort';
|
||||
$lang->resource->company->alleffort = 'allEffort';
|
||||
$lang->resource->sms = new stdclass();
|
||||
$lang->resource->sms->index = 'index';
|
||||
$lang->resource->sms->test = 'test';
|
||||
$lang->resource->sms->reset = 'reset';
|
||||
}
|
||||
@@ -8,4 +8,8 @@ if($this->config->edition != 'open')
|
||||
$lang->resource->company->allTodo = 'allTodo';
|
||||
$lang->resource->company->effort = 'companyEffort';
|
||||
$lang->resource->company->alleffort = 'allEffort';
|
||||
$lang->resource->sms = new stdclass();
|
||||
$lang->resource->sms->index = 'index';
|
||||
$lang->resource->sms->test = 'test';
|
||||
$lang->resource->sms->reset = 'reset';
|
||||
}
|
||||
@@ -35,11 +35,7 @@ class control extends baseControl
|
||||
|
||||
$this->app->setOpenApp();
|
||||
|
||||
if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api'))
|
||||
{
|
||||
$this->setPreference();
|
||||
$this->forceUpgrade();
|
||||
}
|
||||
if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api')) $this->setPreference();
|
||||
|
||||
if(!isset($this->config->bizVersion)) return false;
|
||||
|
||||
@@ -127,39 +123,6 @@ class control extends baseControl
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If change the edition, trigger the upgrade process.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function forceUpgrade()
|
||||
{
|
||||
$installedVersion = $this->loadModel('setting')->getVersion();
|
||||
|
||||
/* Means open source upgrade to biz or max. */
|
||||
if(is_numeric($installedVersion[0]) and $this->config->edition != 'open')
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.version', $this->config->version);
|
||||
$this->loadModel('effort')->convertEstToEffort();
|
||||
$this->loadModel('upgrade')->importBuildinModules();
|
||||
$this->upgrade->addSubStatus();
|
||||
}
|
||||
|
||||
/* Max only has new system mode. */
|
||||
if($installedVersion[0] != 'm' and $this->config->edition == 'max')
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.version', $this->config->version);
|
||||
if($this->config->systemMode == 'classic' and $this->app->getModuleName() != 'upgrade')
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', 'new');
|
||||
$this->locate(helper::createLink('upgrade', 'mergeTips'));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。
|
||||
* 调用父类的loadModel方法来避免这个错误。
|
||||
|
||||
@@ -72,7 +72,7 @@ body.menu-hide {padding-left: 0;}
|
||||
#flodNav .dropdown-submenu:focus > a, #flodNav .dropdown-submenu:hover > a {background-color: rgba(0,0,0,.2);}
|
||||
#poweredBy {width: 40%; position: absolute; top: 4px; right: 0; padding: 0;}
|
||||
|
||||
#globalSearchDiv {width: 52%; float: right; margin-right: 4px;}
|
||||
#globalSearchDiv {width: 200px; float: right; margin-right: 4px;}
|
||||
#globalSearchDiv .input-group {width: 194px; float: right; margin-top: 2px;}
|
||||
#searchbox .dropdown-menu.show-quick-go.with-active {min-width: 270px;}
|
||||
#searchbox .dropdown-menu.show-quick-go > li {padding: 0 5px;}
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
<?php
|
||||
class bugTest
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
global $tester;
|
||||
$this->objectModel = $tester->loadModel('bug');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test create a bug.
|
||||
*
|
||||
* @param array $param
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function createObject($param = array())
|
||||
{
|
||||
$createFields['title'] = '测试创建bug';
|
||||
$createFields['type'] = 'codeerror';
|
||||
$createFields['product'] = 1;
|
||||
$createFields['execution'] = 101;
|
||||
$createFields['openedBuild'] = 'trunk';
|
||||
$createFields['pri'] = 3;
|
||||
$createFields['severity'] = 3;
|
||||
$createFields['status'] = 'active';
|
||||
$createFields['deadline'] = '2021-03-19';
|
||||
$createFields['openedBy'] = 'admin';
|
||||
$createFields['openedDate'] = '2021-03-19';
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$object = $this->objectModel->create();
|
||||
$objectID = $object['id'];
|
||||
unset($_POST);
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$object = $this->objectModel->getByID($objectID);
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
public function batchCreateObject($productID, $param = array())
|
||||
{
|
||||
$modules = array('0', '0', '0');
|
||||
$executions = array('101', '101', '0');
|
||||
$openedBuilds = array('', '', '');
|
||||
$title = array('', '', '');
|
||||
$deadlines = array('0000-00-00', '0000-00-00', '0000-00-00');
|
||||
$stepses = array('', '', '');
|
||||
$types = array('', '', '');
|
||||
$severities = array(3, 3, 3);
|
||||
$oses = array('', '', '');
|
||||
$browsers = array('', '', '');
|
||||
$pris = array(3, 3, 3);
|
||||
$color = array('', '', '');
|
||||
$keywords = array('', '', '');
|
||||
|
||||
$createFields['modules'] = $modules;
|
||||
$createFields['executions'] = $executions;
|
||||
$createFields['openedBuilds'] = $openedBuilds;
|
||||
$createFields['title'] = $title;
|
||||
$createFields['deadlines'] = $deadlines;
|
||||
$createFields['stepses'] = $stepses;
|
||||
$createFields['types'] = $types;
|
||||
$createFields['severities'] = $severities;
|
||||
$createFields['oses'] = $oses;
|
||||
$createFields['browsers'] = $browsers;
|
||||
$createFields['pris'] = $pris;
|
||||
$createFields['color'] = $color;
|
||||
$createFields['keywords'] = $keywords;
|
||||
|
||||
foreach($createFields as $field => $defaultValue) $_POST[$field] = $defaultValue;
|
||||
|
||||
foreach($param as $key => $value) $_POST[$key] = $value;
|
||||
|
||||
$object = $this->objectModel->batchCreate($productID);
|
||||
|
||||
$bug = array();
|
||||
if(is_array($object))
|
||||
{
|
||||
foreach($object as $bugID => $actionID)
|
||||
{
|
||||
$bug[] = $this->objectModel->getByID($bugID);
|
||||
}
|
||||
}
|
||||
|
||||
unset($_POST);
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return empty($bug) ? $object : $bug;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test create bug from gitlab issue.
|
||||
*
|
||||
* @param array $bug
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function createBugFromGitlabIssueTest($bug, $executionID)
|
||||
{
|
||||
$objectID = $this->objectModel->createBugFromGitlabIssue($bug, $executionID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$object = $objectID ? $this->objectModel->getById($objectID) : 0;
|
||||
return $object;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get bugs.
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getBugsTest($product, $branch, $browseType, $module)
|
||||
{
|
||||
global $tester;
|
||||
|
||||
/* Load pager. */
|
||||
$tester->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 20 ,1);
|
||||
|
||||
$projectID = 0;
|
||||
$sort = 'id_desc';
|
||||
$queryID = 0;
|
||||
$executions = $tester->loadModel('execution')->getPairs($projectID, 'all', 'empty|withdelete');
|
||||
|
||||
$bugs = $this->objectModel->getBugs($product, $executions, $branch, $browseType, $module, $queryID, $sort, $pager, $projectID);
|
||||
|
||||
$title = '';
|
||||
foreach($bugs as $bug) $title .= ',' . $bug->title;
|
||||
$title = trim($title, ',');
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $title;
|
||||
}
|
||||
}
|
||||
}
|
||||
+785
-13
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ class taskTest
|
||||
*/
|
||||
public function createObject($param = array(), $executionID = '')
|
||||
{
|
||||
$assignedTo = array('');
|
||||
$assignedTo = array('');
|
||||
$createFields = array('module' => '', 'story' => '', 'name' => '', 'type' => '', 'assignedTo' => $assignedTo,
|
||||
'pri' => 3, 'estimate' => '', 'estStarted' => '2021-01-10', 'deadline' => '2021-03-19', 'desc' => '');
|
||||
|
||||
|
||||
@@ -427,4 +427,221 @@ class userTest
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test authorize user.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function authorizeTest($account)
|
||||
{
|
||||
$user = $this->objectModel->authorize($account);
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test login user.
|
||||
*
|
||||
* @param object $user
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function loginTest($user)
|
||||
{
|
||||
$user = $this->objectModel->login($user);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $user;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get groups by user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $password
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getGroupsTest($account)
|
||||
{
|
||||
$groups = $this->objectModel->getGroups($account);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $groups;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get groups by visions.
|
||||
*
|
||||
* @param string $visions
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getGroupsByVisionsTest($visions)
|
||||
{
|
||||
$groups = $this->objectModel->getGroupsByVisions($visions);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $groups;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get my objects.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $type
|
||||
* @param string $status
|
||||
* @param string $orderBy
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getObjectsTest($account, $type, $status, $orderBy)
|
||||
{
|
||||
$myObjects = $this->objectModel->getObjects($account, $type, $status, $orderBy);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $myObjects;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get contact list.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $params
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getContactListsTest($account = '', $params = '')
|
||||
{
|
||||
$contacts = $this->objectModel->getContactLists($account, $params);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $contacts;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get list by account method.
|
||||
*
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getListByAccountTest($account)
|
||||
{
|
||||
return $this->objectModel->getListByAccount($account);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get parent stage authed users.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getParentStageAuthedUsersTest($stageID)
|
||||
{
|
||||
return $this->objectModel->getParentStageAuthedUsers($stageID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get contact list by id.
|
||||
*
|
||||
* @param int $listID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getContactListByIDTest($listID)
|
||||
{
|
||||
return $this->objectModel->getContactListByID($listID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get contact user pairs.
|
||||
*
|
||||
* @param array $accountList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getContactUserPairsTest($accountList)
|
||||
{
|
||||
return $this->objectModel->getContactListByID($listID);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test create contact list.
|
||||
*
|
||||
* @param string $listName
|
||||
* @param array $userList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createContactListTest($listName = '', $userList = array())
|
||||
{
|
||||
$listID = $this->objectModel->createContactList($listName, $userList);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $listID;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test update contact list.
|
||||
*
|
||||
* @param int $listID
|
||||
* @param string $listName
|
||||
* @param array $userList
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateContactListTest($listID = 0, $listName = '', $userList = array())
|
||||
{
|
||||
$this->objectModel->updateContactList($listID, $listName, $userList);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->objectModel->getContactListByID($listID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,11 +38,11 @@ fields:
|
||||
- field: path2
|
||||
prefix: ","
|
||||
range: 101-700
|
||||
- field: path3
|
||||
range: []
|
||||
postfix: ","
|
||||
- field: acl
|
||||
range: open{4},private{4}
|
||||
- field: openedVersion
|
||||
range: "16.5"
|
||||
- field: whitelist
|
||||
froms:
|
||||
- from: common.user.v1.yaml
|
||||
|
||||
@@ -37,10 +37,10 @@ fields:
|
||||
range: 41-70
|
||||
- field: path2
|
||||
prefix: ","
|
||||
postfix: ","
|
||||
range: 131-160
|
||||
- field: path6
|
||||
prefix: ","
|
||||
range: [701-730]
|
||||
range: 701-730
|
||||
postfix: ","
|
||||
- field: acl
|
||||
range: open{4},private{4}
|
||||
@@ -64,6 +64,8 @@ fields:
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: openedVersion
|
||||
range: "16.5"
|
||||
- field: whitelist
|
||||
froms:
|
||||
- from: common.user.v1.yaml
|
||||
|
||||
@@ -42,6 +42,8 @@ fields:
|
||||
prefix: "项目集描述"
|
||||
- field: acl
|
||||
range: open{4},private{4}
|
||||
- field: openedVersion
|
||||
range: "16.5"
|
||||
- field: whitelist
|
||||
froms:
|
||||
- from: common.user.v1.yaml
|
||||
|
||||
@@ -79,5 +79,7 @@ fields:
|
||||
range: open,private,custom
|
||||
- field: order
|
||||
range: 5-10000:5
|
||||
- field: openedVersion
|
||||
range: "16.5"
|
||||
- field: deleted
|
||||
range: 0
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
title: table zt_usercontact
|
||||
desc: "用户联系人"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
note: "ID"
|
||||
range: 1-10000
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: account
|
||||
note: "用户名"
|
||||
fields:
|
||||
- field: account1
|
||||
range: user,dev,test,admin
|
||||
- field: account2
|
||||
range: 1-20,1-20,1-20,""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: listName
|
||||
note: "列表名称"
|
||||
range: 1-10000
|
||||
prefix: "联系人列表"
|
||||
postfix: ""
|
||||
format: ""
|
||||
- field: userList
|
||||
note: "用户列表"
|
||||
fields:
|
||||
- field: userList1
|
||||
range: user,dev,test
|
||||
- field: userList2
|
||||
range: 20-30,20-30,20-30
|
||||
postfix: ","
|
||||
- field: userList3
|
||||
range: user,dev,test
|
||||
- field: userList4
|
||||
range: 40-50,40-5040-50
|
||||
format: ""
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
$builder = new stdclass();
|
||||
|
||||
$builder->company = array('rows' => 1, 'extends' => array('company'));
|
||||
$builder->user = array('rows' => 1000, 'extends' => array('user'));
|
||||
$builder->todo = array('rows' => 2000, 'extends' => array('todo'));
|
||||
$builder->effort = array('rows' => 100, 'extends' => array('effort'));
|
||||
$builder->usergroup = array('rows' => 600, 'extends' => array('usergroup'));
|
||||
$builder->dept = array('rows' => 100, 'extends' => array('dept'));
|
||||
$builder->action = array('rows' => 100, 'extends' => array('action'));
|
||||
$builder->company = array('rows' => 1, 'extends' => array('company'));
|
||||
$builder->user = array('rows' => 1000, 'extends' => array('user'));
|
||||
$builder->todo = array('rows' => 2000, 'extends' => array('todo'));
|
||||
$builder->effort = array('rows' => 100, 'extends' => array('effort'));
|
||||
$builder->usergroup = array('rows' => 600, 'extends' => array('usergroup'));
|
||||
$builder->usercontact = array('rows' => 61, 'extends' => array('usercontact'));
|
||||
$builder->dept = array('rows' => 100, 'extends' => array('dept'));
|
||||
$builder->action = array('rows' => 100, 'extends' => array('action'));
|
||||
|
||||
$builder->program = array('rows' => 10, 'extends' => array('project', 'program'));
|
||||
$builder->project = array('rows' => 90, 'extends' => array('project', 'project'));
|
||||
|
||||
@@ -89,6 +89,8 @@ class Processor
|
||||
$users['user2'] = array('account' => 'noprogram1', 'realname' => '不在项目集1用户');
|
||||
|
||||
foreach($users as $account => $user) $this->dao->update(TABLE_USER)->data($user)->where('account')->eq($account)->exec();
|
||||
|
||||
$this->dao->update(TABLE_USERCONTACT)->set('account')->eq('admin')->where('account')->like('admin%')->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Executable
+48
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->batchCreate();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试正常批量创建bug1 >> 批量bug一,trunk,3,codeerror,3,3,1,101
|
||||
测试正常批量创建bug2 >> 批量bug五,trunk,codeerror,3,3,1,101
|
||||
测试正常批量创建bug3 >> 批量bug九,1,config,3,3,1,0
|
||||
测试短时间内重复批量创建bug >> 0
|
||||
测试异常创建bug >> <html><meta charset='utf-8'/><style>body{background:white}</style><script>alert('『影响版本』不能为空。')
|
||||
|
||||
|
||||
*/
|
||||
|
||||
$productID = 1;
|
||||
|
||||
$title = array('批量bug一','批量bug二','批量bug三');
|
||||
$openedBuild = array(array('trunk', '3'), array('trunk'), array('1'));
|
||||
$type = array('codeerror','ditto','config');
|
||||
$severity = array('3','2','1');
|
||||
$normal_create1 = array('title' => $title, 'types' => $type, 'openedBuilds' => $openedBuild, 'severity' => $severity);
|
||||
|
||||
$title = array('批量bug四','批量bug五','批量bug六');
|
||||
$normal_create2 = array('title' => $title, 'types' => $type, 'openedBuilds' => $openedBuild, 'severity' => $severity);
|
||||
|
||||
|
||||
$title = array('批量bug七','批量bug八','批量bug九');
|
||||
$normal_create3 = array('title' => $title, 'types' => $type, 'openedBuilds' => $openedBuild, 'severity' => $severity);
|
||||
|
||||
$title = array('异常一','异常二','异常三');
|
||||
$openedBuild = array(array('trunk'), array(''), array('1'));
|
||||
$exception_create = array('title' => $title, 'openedBuilds' => $openedBuild);
|
||||
|
||||
$bug = new bugTest();
|
||||
r($bug->batchCreateObject($productID, $normal_create1)) && p('0:title,openedBuild,type,severity,pri,product,execution') && e('批量bug一,trunk,3,codeerror,3,3,1,101'); // 测试正常批量创建bug1
|
||||
r($bug->batchCreateObject($productID, $normal_create2)) && p('1:title,openedBuild,type,severity,pri,product,execution') && e('批量bug五,trunk,codeerror,3,3,1,101'); // 测试正常批量创建bug2
|
||||
r($bug->batchCreateObject($productID, $normal_create3)) && p('2:title,openedBuild,type,severity,pri,product,execution') && e('批量bug九,1,config,3,3,1,0'); // 测试正常批量创建bug3
|
||||
r($bug->batchCreateObject($productID, $normal_create1)) && p() && e('0'); // 测试短时间内重复批量创建bug
|
||||
r($bug->batchCreateObject($productID, $exception_create)) && p() && e("<html><meta charset='utf-8'/><style>body{background:white}</style><script>alert('『影响版本』不能为空。')"); // 测试异常创建bug
|
||||
|
||||
system("./ztest init");
|
||||
Executable
+55
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->create();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试正常的创建代码错误bug >> 代码错误bug一
|
||||
测试正常的创建配置相关bug >> 1
|
||||
测试正常的创建安装部署bug >> 101
|
||||
测试正常的创建安全相关bug >> security
|
||||
测试正常的创建性能问题bug >> 3
|
||||
测试正常的创建标准规范bug >> active
|
||||
测试正常的创建测试脚本bug >> admin
|
||||
测试正常的创建设计缺陷bug >> 3
|
||||
测试正常的创建其他bug >> 2021-03-19
|
||||
测试不输入名称创建bug >> 『Bug标题』不能为空。
|
||||
测试不输入影响版本创建bug >> 『影响版本』不能为空。
|
||||
测试指派人bug >> user92
|
||||
|
||||
*/
|
||||
|
||||
$b_codeerror = array('title' => '代码错误bug一', 'type' => 'codeerror');
|
||||
$b_config = array('title' => '配置相关bug一', 'type' => 'config');
|
||||
$b_install = array('title' => '安装部署bug一', 'type' => 'install');
|
||||
$b_security = array('title' => '安全相关bug一', 'type' => 'security');
|
||||
$b_performance = array('title' => '性能问题bug一', 'type' => 'performance');
|
||||
$b_standard = array('title' => '标准规范bug一', 'type' => 'standard');
|
||||
$b_automation = array('title' => '测试脚本bug一', 'type' => 'automation');
|
||||
$b_designdefect = array('title' => '设计缺陷bug一', 'type' => 'designdefect');
|
||||
$b_others = array('title' => '其他bug一', 'type' => 'others');
|
||||
$b_notitle = array('title' => '', 'type' => 'codeerror');
|
||||
$b_nobuild = array('title' => '没有影响版本', 'type' => 'codeerror', 'openedBuild' => '');
|
||||
$b_assign = array('title' => '指派人user92', 'type' => 'codeerror', 'assignedTo' => 'user92');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->createObject($b_codeerror)) && p('title') && e('代码错误bug一'); // 测试正常的创建代码错误bug
|
||||
r($bug->createObject($b_config)) && p('product') && e('1'); // 测试正常的创建配置相关bug
|
||||
r($bug->createObject($b_install)) && p('execution') && e('101'); // 测试正常的创建安装部署bug
|
||||
r($bug->createObject($b_security)) && p('type') && e('security'); // 测试正常的创建安全相关bug
|
||||
r($bug->createObject($b_performance)) && p('pri') && e('3'); // 测试正常的创建性能问题bug
|
||||
r($bug->createObject($b_standard)) && p('status') && e('active'); // 测试正常的创建标准规范bug
|
||||
r($bug->createObject($b_automation)) && p('openedBy') && e('admin'); // 测试正常的创建测试脚本bug
|
||||
r($bug->createObject($b_designdefect)) && p('severity') && e('3'); // 测试正常的创建设计缺陷bug
|
||||
r($bug->createObject($b_others)) && p('deadline') && e('2021-03-19'); // 测试正常的创建其他bug
|
||||
r($bug->createObject($b_notitle)) && p('title:0') && e('『Bug标题』不能为空。'); // 测试不输入名称创建bug
|
||||
r($bug->createObject($b_nobuild)) && p('openedBuild:0') && e('『影响版本』不能为空。'); // 测试不输入影响版本创建bug
|
||||
r($bug->createObject($b_assign)) && p('assignedTo') && e('user92'); // 测试指派人bug
|
||||
|
||||
system("./ztest init");
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->createBugFromGitlabIssue ();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试正常的创建来源于gitlab issue的bug title >> 问题1
|
||||
测试短时间内重复创建来源于gitlab issue的bug >> 0
|
||||
测试正常的创建来源于gitlab issue的bug execution >> 101
|
||||
测试正常的创建来源于gitlab issue的bug pri >> 3
|
||||
测试正常的创建来源于gitlab issue的bug severity >> 3
|
||||
测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。
|
||||
|
||||
*/
|
||||
|
||||
$executionID = 101;
|
||||
|
||||
$bug1 = new stdclass();
|
||||
$bug1->title = '问题1';
|
||||
$bug1->execution = $executionID;
|
||||
|
||||
|
||||
$bug2 = new stdclass();
|
||||
$bug2->title = '问题2';
|
||||
$bug2->execution = $executionID;
|
||||
|
||||
$bug3 = new stdclass();
|
||||
$bug3->title = '问题3';
|
||||
$bug3->execution = $executionID;
|
||||
|
||||
$bug4 = new stdclass();
|
||||
$bug4->title = '问题4';
|
||||
$bug4->execution = $executionID;
|
||||
|
||||
$bug5 = new stdclass();
|
||||
$bug5->title = '';
|
||||
$bug5->execution = $executionID;
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('title') && e('问题1'); // 测试正常的创建来源于gitlab issue的bug title
|
||||
r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('task') && e('0'); // 测试短时间内重复创建来源于gitlab issue的bug
|
||||
r($bug->createBugFromGitlabIssueTest($bug2, $executionID)) && p('execution') && e($executionID); // 测试正常的创建来源于gitlab issue的bug execution
|
||||
r($bug->createBugFromGitlabIssueTest($bug3, $executionID)) && p('pri') && e('3'); // 测试正常的创建来源于gitlab issue的bug pri
|
||||
r($bug->createBugFromGitlabIssueTest($bug4, $executionID)) && p('severity') && e('3'); // 测试正常的创建来源于gitlab issue的bug severity
|
||||
r($bug->createBugFromGitlabIssueTest($bug5, $executionID)) && p('title:0') && e('『Bug标题』不能为空。'); // 测试创建没有标题 来源于gitlab issue的异常bug
|
||||
|
||||
system("./ztest init");
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 >> BUG3,BUG2,BUG1
|
||||
查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1
|
||||
查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1
|
||||
查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> 0
|
||||
查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 >> BUG3,BUG2,BUG1
|
||||
查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175
|
||||
查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175
|
||||
查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 >> 0
|
||||
查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*'":.<>。?/();175
|
||||
查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 >> 0
|
||||
查询不存在的产品的全部bug的标题拼接 >> 0
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array('1', '59', '1000001');
|
||||
$branchList = array('0', 'trunk', '37', '1000001');
|
||||
$browseTypeList = array('all', 'unclosed');
|
||||
$moduleIDList = array('0', '1821', '2053', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
|
||||
r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1
|
||||
r($bug->getBugsTest($productIDList[0], $branchList[1], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[1])) && p('title') && e('0'); // 查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[0], $branchList[0], $browseTypeList[0], $moduleIDList[3])) && p('title') && e('BUG3,BUG2,BUG1'); // 查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59
|
||||
r($bug->getBugsTest($productIDList[1], $branchList[1], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[1], $branchList[2], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[1], $moduleIDList[0])) && p('title') && e('BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*\'":.<>。?/();175'); // 查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[1], $branchList[0], $browseTypeList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接
|
||||
r($bug->getBugsTest($productIDList[2], $branchList[0], $browseTypeList[0], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品的全部bug的标题拼接
|
||||
|
||||
system("./ztest init");
|
||||
+7
-7
@@ -10,12 +10,12 @@ title=测试executionModel->addProjectMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷项目根据执行添加团队信息 >> po82,研发
|
||||
瀑布项目根据执行添加团队信息 >> test22,测试
|
||||
看板项目根据执行添加团队信息 >> test52,测试
|
||||
敏捷项目根据执行添加团队信息统计 >> 2
|
||||
瀑布项目根据执行添加团队信息统计 >> 1
|
||||
看板项目根据执行添加团队信息统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
@@ -30,4 +30,4 @@ r($execution->addProjectMembersTest($projectIDList[2], $executionIDList[2], $cou
|
||||
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'); // 看板项目根据执行添加团队信息统计
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/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->buildBurnDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行燃尽图数据 >> 7/1
|
||||
瀑布执行燃尽图数据 >> [0,0,0,0,0,0,0,0,0,0,0]
|
||||
看板执行燃尽图数据 >> [20,18,16,14,12,10,8,6,4,2,0]
|
||||
结果统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('101', '131', '161');
|
||||
$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('[20,18,16,14,12,10,8,6,4,2,0]'); // 看板执行燃尽图数据
|
||||
r($execution->buildBurnDataTest($executionIDList[0], $count[1])) && p() && e('3'); // 结果统计
|
||||
@@ -10,12 +10,8 @@ title=测试executionModel->computeBurnTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
正常初始化 >> project600
|
||||
初始化后数据统计 >> 516
|
||||
|
||||
*/
|
||||
|
||||
@@ -23,4 +19,4 @@ $count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->computeBurnTest($count[0])) && p('700:executionName') && e('project600'); // 正常初始化
|
||||
r($execution->computeBurnTest($count[1])) && p() && e('516'); // 初始化后数据统计
|
||||
r($execution->computeBurnTest($count[1])) && p() && e('516'); // 初始化后数据统计
|
||||
@@ -17,7 +17,7 @@ pid=1
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('601','146', '617', '121');
|
||||
$executionIDList = array('101','131', '161');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->fixFirstTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
不传入withLeft >> 26
|
||||
敏捷执行更新首日剩余工时 >> 26
|
||||
瀑布执行更新首日剩余工时 >> 17
|
||||
|
||||
*/
|
||||
|
||||
@@ -28,4 +25,4 @@ $waterfallEstimate = array('estimate' => '17', 'withLeft' => '1');
|
||||
$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'); // 瀑布执行更新首日剩余工时
|
||||
r($execution->fixFirstTest($executionIDList[1], $waterfallEstimate)) && p('0:left') && e('17'); // 瀑布执行更新首日剩余工时
|
||||
@@ -10,14 +10,9 @@ title=测试executionModel->fixOrderTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
重置order >> 15
|
||||
|
||||
*/
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->fixOrderTest()) && p('101:order') && e('15'); // 重置order
|
||||
r($execution->fixOrderTest()) && p('101:order') && e('15'); // 重置order
|
||||
+32
@@ -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';
|
||||
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'); // 正常产品分支统计
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->getBurnDataFlotTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行查询统计 >> 2
|
||||
瀑布执行查询统计 >> 2
|
||||
看板执行查询统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
+7
-7
@@ -10,12 +10,12 @@ title=测试executionModel->getCanCopyObjectsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷项目数据查询 >> 迭代1
|
||||
瀑布项目数据查询 >> 阶段35
|
||||
看板项目数据查询 >> 看板61
|
||||
敏捷项目数据统计 >> 8
|
||||
瀑布项目数据统计 >> 9
|
||||
看板项目数据统计 >> 7
|
||||
|
||||
*/
|
||||
|
||||
@@ -28,4 +28,4 @@ r($execution->getCanCopyObjectsTest($projectIDList[1], $count[0])) && p('135') &
|
||||
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'); // 看板项目数据统计
|
||||
r($execution->getCanCopyObjectsTest($projectIDList[2], $count[1])) && p() && e('7'); // 看板项目数据统计
|
||||
@@ -10,12 +10,11 @@ title=测试executionModel->getDateListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
去除工作日日期列表 >> 01/03/2022
|
||||
去除工作日日期列表统计 >> 5
|
||||
未去除工作日日期列表 >> 01/01/2022
|
||||
未去除工作日日期列表统计 >> 7
|
||||
日期输入错误查询 >> 无数据
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,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('无数据'); // 日期输入错误查询
|
||||
+3
-7
@@ -10,12 +10,8 @@ title=测试executionModel->getKanbanColorListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
看板状态颜色查询 >> #7EC5FF
|
||||
看板状态颜色数量统计 >> 6
|
||||
|
||||
*/
|
||||
|
||||
@@ -23,4 +19,4 @@ $count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanColorListTest($count[0])) && p('wait') && e('#7EC5FF'); // 看板状态颜色查询
|
||||
r($execution->getKanbanColorListTest($count[1])) && p() && e('6'); // 看板状态颜色数量统计
|
||||
r($execution->getKanbanColorListTest($count[1])) && p() && e('6'); // 看板状态颜色数量统计
|
||||
+3
-7
@@ -10,12 +10,8 @@ title=测试executionModel->getKanbanColumnsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
看板列查询 >> wait
|
||||
看板列查询统计 >> 6
|
||||
|
||||
*/
|
||||
|
||||
@@ -23,4 +19,4 @@ $count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanColumnsTest($count[0])[0]) && p() && e('wait'); // 看板列查询
|
||||
r($execution->getKanbanColumnsTest($count[1])) && p() && e('6'); // 看板列查询统计
|
||||
r($execution->getKanbanColumnsTest($count[1])) && p() && e('6'); // 看板列查询统计
|
||||
+7
-7
@@ -10,12 +10,12 @@ title=测试executionModel->getKanbanGroupDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行查询 >> 子任务6,101
|
||||
瀑布执行查询 >> 更多任务93,131
|
||||
看板执行查询 >> 开发任务71,161
|
||||
敏捷执行查询统计 >> 11
|
||||
瀑布执行查询统计 >> 4
|
||||
看板执行查询统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,4 +29,4 @@ r($execution->getKanbanGroupDataTest($executionIDList[1], $count[0])) && p('693:
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[2], $count[0])) && p('61:name,execution') && e('开发任务71,161'); // 看板执行查询
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[0], $count[1])) && p() && e('11'); // 敏捷执行查询统计
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[1], $count[1])) && p() && e('4'); // 瀑布执行查询统计
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计
|
||||
r($execution->getKanbanGroupDataTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计
|
||||
+3
-7
@@ -10,12 +10,8 @@ title=测试executionModel->getKanbanSettingTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
看板设置查询 >> #7EC5FF
|
||||
看板设置查询统计 >> 6
|
||||
|
||||
*/
|
||||
|
||||
@@ -23,4 +19,4 @@ $count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanSettingTest($count[0])) && p('colorList:wait') && e('#7EC5FF'); // 看板设置查询
|
||||
r($execution->getKanbanSettingTest($count[1])) && p() && e('6'); // 看板设置查询统计
|
||||
r($execution->getKanbanSettingTest($count[1])) && p() && e('6'); // 看板设置查询统计
|
||||
+3
-7
@@ -10,12 +10,8 @@ title=测试executionModel->getKanbanStatusListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
看板状态列表查询 >> 未开始
|
||||
看板状态列表数量统计 >> 7
|
||||
|
||||
*/
|
||||
|
||||
@@ -23,4 +19,4 @@ $count = array('0', '1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanStatusListTest($count[0])) && p('wait') && e('未开始');// 看板状态列表查询
|
||||
r($execution->getKanbanStatusListTest($count[1])) && p() && e('7'); // 看板状态列表数量统计
|
||||
r($execution->getKanbanStatusListTest($count[1])) && p() && e('7'); // 看板状态列表数量统计
|
||||
+4
-7
@@ -10,12 +10,9 @@ title=测试executionModel->getKanbanStatusMapTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
看板tesk查询 >> start
|
||||
看板bug查询 >> resolve
|
||||
看板统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
@@ -24,4 +21,4 @@ $count = array('0', '1');
|
||||
$execution = new executionTest();
|
||||
r($execution->getKanbanStatusMapTest($count[0])["task"]) && p('wait:doing') && e('start'); // 看板tesk查询
|
||||
r($execution->getKanbanStatusMapTest($count[0])["bug"]) && p('wait:done') && e('resolve'); // 看板bug查询
|
||||
r($execution->getKanbanStatusMapTest($count[1])) && p() && e('2'); // 看板统计
|
||||
r($execution->getKanbanStatusMapTest($count[1])) && p() && e('2'); // 看板统计
|
||||
@@ -10,12 +10,12 @@ title=测试executionModel->getKanbanTasksTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行查询 >> 子任务6,101
|
||||
瀑布执行查询 >> 更多任务93,131
|
||||
看板执行查询 >> 开发任务71,161
|
||||
敏捷执行查询统计 >> 11
|
||||
瀑布执行查询统计 >> 4
|
||||
看板执行查询统计 >> 4
|
||||
|
||||
*/
|
||||
|
||||
@@ -28,4 +28,4 @@ r($execution->getKanbanTasksTest($executionIDList[1], $count[0])) && p('693:name
|
||||
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'); // 看板执行查询统计
|
||||
r($execution->getKanbanTasksTest($executionIDList[2], $count[1])) && p() && e('4'); // 看板执行查询统计
|
||||
+4
-7
@@ -10,12 +10,9 @@ title=测试executionModel->getMembers2ImportTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
正常数据查询 >> po82,研发
|
||||
无效数据查询 >> 无数据
|
||||
正常数据查询统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
@@ -27,4 +24,4 @@ $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'); // 正常数据查询统计
|
||||
r($execution->getMembers2ImportTest($executionID, $accountList, $count[1])) && p() && e('2'); // 正常数据查询统计
|
||||
+5
-7
@@ -10,12 +10,10 @@ title=测试executionModel->getMembersByIdListTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
批量查询敏捷执行team >> 101,po82,研发主管82
|
||||
批量查询瀑布执行team >> 131,test22,开发22
|
||||
批量查询看板执行team >> 161,test52,开发52
|
||||
批量查询执行team统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
@@ -26,4 +24,4 @@ $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统计
|
||||
r($execution->getMembersByIdListTest($executionIDList, $count[1])) && p() && e('3'); // 批量查询执行team统计
|
||||
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/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->getPlansTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
全部执行计划查询 >> 长名称
|
||||
执行计划查询 >> 1.1 [2021-05-23 ~ 2021-09-23]
|
||||
全部执行计划查询 >> 2
|
||||
|
||||
*/
|
||||
|
||||
$productIDList = array('1', '21', '41');
|
||||
$executionIDList = array('0','101');
|
||||
$count = array('0','1');
|
||||
|
||||
$execution = new executionTest();
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[0])) && p('1:3') && e('长名称'); // 全部执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[1], $count[0])) && p('1:2') && e('1.1 [2021-05-23 ~ 2021-09-23]'); // 执行计划查询
|
||||
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
#!/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->getStageLinkProductPairsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行产品查询 >> 多平台产品91
|
||||
瀑布执行产品查询 >> 已关闭的正常产品31
|
||||
看板执行产品查询 >> 已关闭的多分支产品61
|
||||
敏捷执行产品统计 >> 3
|
||||
瀑布执行产品统计 >> 3
|
||||
看板执行产品统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
$sprintIDList = array('101', '102', '103');
|
||||
$stageIDList = array('131', '132', '133');
|
||||
$kanbanIDList = array('161', '162', '163');
|
||||
$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'); // 看板执行产品统计
|
||||
@@ -10,12 +10,12 @@ title=测试executionModel->getTeamMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行查看team >> 101,execution,482
|
||||
瀑布执行查看team >> 131,execution,开发22
|
||||
看板执行查看team >> 161,execution,开发52
|
||||
敏捷执行team统计 >> 2
|
||||
瀑布执行team统计 >> 1
|
||||
看板执行team统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
@@ -28,4 +28,4 @@ r($execution->getTeamMembersTest($executionIDList[1], $count[0])) && p('test22:r
|
||||
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[2], $count[1])) && p() && e('1'); // 看板执行team统计
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->getTeams2ImportTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
无效数据查询 >> 无数据
|
||||
正常数据查询 >> 迭代91
|
||||
正常数据查询统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
@@ -26,4 +23,4 @@ $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[1], $executionID, $count[1])) && p() && e('1'); // 正常数据查询统计
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->getTeamSkipTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
正常跳过 >> 901,admin,研发
|
||||
begin与end一致 >> 无跳转数据
|
||||
end与begin一致 >> 无跳转数据
|
||||
|
||||
*/
|
||||
|
||||
@@ -26,4 +23,4 @@ $end = 'user92';
|
||||
$execution = new executionTest();
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $end)) && p('admin:root,account,role') && e('901,admin,研发'); // 正常跳过
|
||||
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
|
||||
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
|
||||
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致
|
||||
+5
-7
@@ -10,12 +10,10 @@ title=测试executionModel->getTotalEstimateTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行预计工时统计 >> 48
|
||||
瀑布执行预计工时统计 >> 17
|
||||
看板执行预计工时统计 >> 20
|
||||
无执行预计工时统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
@@ -25,4 +23,4 @@ $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('')) && p() && e('0'); // 无执行预计工时统计
|
||||
Executable
+32
@@ -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';
|
||||
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'); // 正常产品分支统计
|
||||
@@ -10,12 +10,30 @@ title=测试executionModel->isClickableTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
wait状态执行start按钮检查 >> 检查通过
|
||||
wait状态执行close按钮检查 >> 检查通过
|
||||
wait状态执行suspend按钮检查 >> 检查通过
|
||||
wait状态执行putoff按钮检查 >> 检查通过
|
||||
wait状态执行activate按钮检查 >> 检查不通过
|
||||
wait状态执行delete按钮检查 >> 检查通过
|
||||
doing状态执行start按钮检查 >> 检查不通过
|
||||
doing状态执行close按钮检查 >> 检查通过
|
||||
doing状态执行suspend按钮检查 >> 检查通过
|
||||
doing状态执行putoff按钮检查 >> 检查通过
|
||||
doing状态执行activate按钮检查 >> 检查不通过
|
||||
doing状态执行delete按钮检查 >> 检查通过
|
||||
suspended状态执行start按钮检查 >> 检查不通过
|
||||
suspended状态执行close按钮检查 >> 检查通过
|
||||
suspended状态执行suspend按钮检查 >> 检查不通过
|
||||
suspended状态执行putoff按钮检查 >> 检查不通过
|
||||
suspended状态执行activate按钮检查 >> 检查通过
|
||||
suspended状态执行delete按钮检查 >> 检查不通过
|
||||
closed状态执行start按钮检查 >> 检查不通过
|
||||
closed状态执行close按钮检查 >> 检查不通过
|
||||
closed状态执行suspend按钮检查 >> 检查不通过
|
||||
closed状态执行putoff按钮检查 >> 检查不通过
|
||||
closed状态执行activate按钮检查 >> 检查通过
|
||||
closed状态执行delete按钮检查 >> 检查不通过
|
||||
|
||||
*/
|
||||
|
||||
@@ -55,4 +73,4 @@ r($execution->isClickableTest($closedExecution, $actionList[1])) && p() && e(
|
||||
r($execution->isClickableTest($closedExecution, $actionList[2])) && p() && e('检查不通过'); // closed状态执行suspend按钮检查
|
||||
r($execution->isClickableTest($closedExecution, $actionList[3])) && p() && e('检查不通过'); // closed状态执行putoff按钮检查
|
||||
r($execution->isClickableTest($closedExecution, $actionList[4])) && p() && e('检查通过'); // closed状态执行activate按钮检查
|
||||
r($execution->isClickableTest($closedExecution, $actionList[5])) && p() && e('检查不通过'); // closed状态执行delete按钮检查
|
||||
r($execution->isClickableTest($closedExecution, $actionList[5])) && p() && e('检查不通过'); // closed状态执行delete按钮检查
|
||||
@@ -34,4 +34,4 @@ r($execution->linkStoryTest($executionIDList[0], $count[1], $story)) && p()
|
||||
r($execution->linkStoryTest($executionIDList[1], $count[1], $story)) && p() && e('3'); // 瀑布执行关联需求统计
|
||||
r($execution->linkStoryTest($executionIDList[2], $count[1], $story)) && p() && e('3'); // 看板执行关联需求统计
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
@@ -10,12 +10,8 @@ title=测试executionModel->manageMembersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
团队管理 >> 101,execution,dev10
|
||||
团队人员管理统计 >> 3
|
||||
|
||||
*/
|
||||
|
||||
@@ -32,4 +28,4 @@ $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[1], $manageMembers)) && p() && e('3'); // 团队人员管理统计
|
||||
@@ -10,12 +10,10 @@ title=测试executionModel->processBurnDataTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行查询统计 >> 29
|
||||
瀑布执行查询统计 >> 60
|
||||
看板执行查询统计 >> 60
|
||||
错误时间查询统计 >> 0
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,4 +27,4 @@ $execution = new executionTest();
|
||||
r($execution->processBurnDataTest($executionIDList[0], $itemCounts[0], $begin[0], $end[0], $count[1])) && p() && e('29'); // 敏捷执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('60'); // 瀑布执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('60'); // 看板执行查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计
|
||||
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/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->setTreePathTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
子阶段设置path >> 41,131,,41,131,701,
|
||||
子阶段设置path >> 11,11,,11,101,
|
||||
子阶段设置path >> 41,41,,41,131,
|
||||
|
||||
*/
|
||||
|
||||
$executionIDList = array('701', '101', '131');
|
||||
|
||||
$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
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->summaryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行任务统计 >> 本页共 <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> 工时。
|
||||
|
||||
*/
|
||||
|
||||
@@ -24,4 +21,4 @@ $executionIDList = array('101', '131', '161');
|
||||
$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[2])) && p() && e('本页共 <strong>4</strong> 个任务,未开始 <strong>2</strong>,进行中 <strong>1</strong>,总预计 <strong>20</strong> 工时,已消耗 <strong>15</strong> 工时,剩余 <strong>20</strong> 工时。'); // 看板执行任务统计
|
||||
@@ -10,12 +10,9 @@ title=测试executionModel->unlinkCasesTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行解除关联用例 >> 0
|
||||
瀑布执行解除关联用例 >> 0
|
||||
看板执行解除关联用例 >> 0
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,4 +26,4 @@ r($execution->unlinkCasesTest($executionIDList[0], $products[0], $stories[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'); // 看板执行解除关联用例
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
@@ -10,12 +10,11 @@ title=测试executionModel->unlinkMemberTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联用例 >> 101,1,1
|
||||
瀑布执行关联用例 >> 131,43,169
|
||||
看板执行关联用例 >> 161,68,269
|
||||
敏捷执行关联用例统计 >> 4
|
||||
瀑布执行关联用例统计 >> 4
|
||||
看板执行关联用例统计 >> 4
|
||||
敏捷执行解除团队成员 >> po82,研发
|
||||
敏捷执行解除团队成员后统计 >> 1
|
||||
瀑布执行解除团队成员 >> 0
|
||||
看板执行解除团队成员 >> test52,测试
|
||||
看板执行解除团队成员后统计 >> 1
|
||||
|
||||
*/
|
||||
|
||||
@@ -29,4 +28,4 @@ r($execution->unlinkMemberTest($executionIDList[0], $accountList[0], $count[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('test52,测试'); // 看板执行解除团队成员
|
||||
r($execution->unlinkMemberTest($executionIDList[2], $accountList[2], $count[1])) && p() && e('1'); // 看板执行解除团队成员后统计
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
@@ -10,12 +10,12 @@ title=测试executionModel->unlinkStoryTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
敏捷执行关联需求 >> 101,1,4
|
||||
瀑布执行关联需求 >> 131,1,4
|
||||
看板执行关联需求 >> 161,1,4
|
||||
敏捷执行关联需求统计 >> 3
|
||||
瀑布执行关联需求统计 >> 3
|
||||
看板执行关联需求统计 >> 3
|
||||
敏捷执行解除关联需求 >> 101,81,324
|
||||
瀑布执行解除关联需求 >> 131,1,4
|
||||
看板执行解除关联需求 >> 161,1,4
|
||||
敏捷执行关联需求统计 >> 2
|
||||
瀑布执行关联需求统计 >> 2
|
||||
看板执行关联需求统计 >> 2
|
||||
|
||||
*/
|
||||
|
||||
@@ -34,4 +34,4 @@ r($execution->unlinkStoryTest($executionIDList[0], $count[1], $stories[0], $stor
|
||||
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'); // 看板执行关联需求统计
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
@@ -16,7 +16,7 @@ pid=1
|
||||
测试修改迭代项目为看板项目 >> project,41,71
|
||||
测试修改迭代code >> code,project31,code修改
|
||||
测试修改迭代工作日 >> days,0,5
|
||||
测试修改迭代类型 >> Lifetime,,long
|
||||
测试修改迭代类型 >> lifetime,,long
|
||||
测试修改迭代状态为wait >> status,wait,doing
|
||||
测试修改迭代状态为closed >> status,doing,closed
|
||||
测试修改名称为空 >> 『阶段名称』不能为空。
|
||||
@@ -56,4 +56,4 @@ r($execution->updateObject($executionIDList[1], $noName)) && p('name:0')
|
||||
r($execution->updateObject($executionIDList[1], $noCode)) && p('code:0') && e('『迭代代号』不能为空。'); // 测试修改code为空
|
||||
r($execution->updateObject($executionIDList[1], $noChange)) && p() && e('没有数据更新'); // 测试无修改
|
||||
|
||||
system("./ztest init");
|
||||
system("./ztest init");
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=userModel->authorizeTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$user = new userTest();
|
||||
$rights = $user->authorizeTest('test2');
|
||||
|
||||
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'); //获取空用户名的权限,返回空
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getContactListByIDTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$user = new userTest();
|
||||
|
||||
r($user->getContactListByIDTest(1)) && p() && e('0'); //
|
||||
r($user->getContactListByIDTest(2)) && p() && e('0'); //
|
||||
r($user->getContactListByIDTest(1000)) && p() && e('0'); //
|
||||
r($user->getContactListByIDTest(false)) && p() && e('0'); //
|
||||
r($user->getContactListByIDTest(null)) && p() && e('0'); //
|
||||
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getContactListsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
$adminContactList1 = $user->getContactListsTest('admin', 'withempty|withnote');
|
||||
$adminContactList2 = $user->getContactListsTest('admin', '');
|
||||
$test2ContactList = $user->getContactListsTest('test2');
|
||||
$emptyContactList = $user->getContactListsTest('', '');
|
||||
|
||||
r($adminContactList) && p() && e('0'); // 获取admin的联系人列表
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=userModel->getContactUserPairsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
$accountList = array('admin', 'test2');
|
||||
|
||||
r($user->getContactUserPairsTest($accountList)) && p('') && e(''); //
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getGroupsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
|
||||
r($user->getGroupsTest('admin')) && p() && e('0'); // 获取admin所在的分组,为空
|
||||
r(count($user->getGroupsTest('test2'))) && p() && e('1'); // 通过test2所在的分组数量,1个
|
||||
r($user->getGroupsTest('')) && p() && e('0'); // 传空用户名,返回空
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getGroupsByVisionsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
|
||||
r(count($user->getGroupsByVisionsTest(array('rnd')))) && p() && e('14'); // 获取系统中所有研发界面分组的数量
|
||||
r(count($user->getGroupsByVisionsTest(array('lite')))) && p() && e('3'); // 获取系统中所有迅捷界面分组的数量
|
||||
r($user->getGroupsByVisionsTest(array())) && p() && e('0'); // 传空Visions,返回空数组
|
||||
r(count($user->getGroupsByVisionsTest(array('rnd','lite')))) && p() && e('17'); // 获取系统中所有用户分组的数量
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getListByAccount();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
$adminContactList = $user->getListByAccountTest('admin');
|
||||
$test2ContactList = $user->getListByAccountTest('test2');
|
||||
$emptyContactList = $user->getListByAccountTest('');
|
||||
|
||||
r($adminContactList) && p() && e('0'); // 获取admin的联系人列表
|
||||
r($test2ContactList) && p() && e('0'); // 获取admin的联系人列表
|
||||
r($emptyContactList) && p() && e('0'); // 获取admin的联系人列表
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getObjectsTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
$adminProjects = $user->getObjectsTest('admin', 'project', 'all', 'id_desc');
|
||||
$adminDoneProjects = $user->getObjectsTest('admin', 'project', 'done', 'id_desc');
|
||||
$adminExecutions = $user->getObjectsTest('admin', 'execution', 'all', 'id_desc');
|
||||
$test2Projects = $user->getObjectsTest('test2', 'project', 'all', 'id_desc');
|
||||
$emptyUser = $user->getObjectsTest('', 'execution', 'all', 'id_desc');
|
||||
|
||||
r($adminProjects) && p('11:name') && e('项目1'); //获取admin的所属项目列表,取ID为11的项目名字
|
||||
r($adminProjects) && p('11:type') && e('project'); //获取admin的所属项目列表,取ID为11的项目类型
|
||||
r($adminExecutions) && p('120:name') && e('迭代20'); //获取admin的所属执行列表,取ID为120的项目名字
|
||||
r($adminDoneProjects) && p('') && e('0'); //获取admin的已完成的所属项目列表,返回空
|
||||
r($test2Projects) && p('') && e('0'); //获取test2用户的所属项目列表,返回空
|
||||
r($emptyUser) && p('') && e('0'); //传入一个空用户名字段,返回空
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=测试 userModel::getParentStageAuthedUsersTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
$user = new userTest();
|
||||
|
||||
r($user->getParentStageAuthedUsersTest(0)) && p() && e('0'); //传入ID为0的情况获取有权限的用户
|
||||
r($user->getParentStageAuthedUsersTest(131)) && p('wwccss') && e('wwccss'); //传入一个阶段ID获取有权限的用户
|
||||
r($user->getParentStageAuthedUsersTest(1)) && p() && e('0'); //传入一个项目集ID获取有权限的用户
|
||||
r($user->getParentStageAuthedUsersTest(161)) && p('wwccss') && e('wwccss'); //传入一个看板类型的项目ID获取有权限的用户
|
||||
@@ -13,6 +13,7 @@ pid=1
|
||||
*/
|
||||
|
||||
$user = new userTest();
|
||||
$user->identifyTest('admin', '78302615c8b79cac8df6d2607f8a83ee');
|
||||
|
||||
system("./ztest init");
|
||||
r($user->identifyTest('admin', '78302615c8b79cac8df6d2607f8a83ee')) && p('realname') && e('admin'); //用户名密码皆正确,返回验证登录的用户
|
||||
r($user->identifyTest('asdjaf12', '78302615c8b79cac8df6d2607f8a83ee')) && p() && e('0'); //验证一个不存在的用户,返回空
|
||||
r($user->identifyTest('', '')) && p() && e('0'); //验证一个不传用户名和密码的用户,返回空
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/user.class.php';
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
|
||||
title=userModel->loginTest();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
*/
|
||||
|
||||
$userClass = new userTest();
|
||||
|
||||
$admin = new stdclass();
|
||||
$admin->id = 1;
|
||||
$admin->account = 'admin';
|
||||
$admin = $userClass->loginTest($admin);
|
||||
|
||||
$emptyAccount = new stdclass();
|
||||
$emptyAccount->id = 0;
|
||||
$emptyAccount->account = '';
|
||||
$emptyAccount = $userClass->loginTest($emptyAccount);
|
||||
|
||||
r($admin) && p('admin') && e('1'); //使用admin登录,返回此用户为超级管理员
|
||||
r(count($admin->rights)) && p() && e('3'); //使用Admin登录,返回权限列表的数量
|
||||
r(count($emptyAccount->group)) && p() && e('0'); //使用空账号登录,返回权限列表数量为0
|
||||
@@ -37,6 +37,9 @@ switch($argv[1])
|
||||
case 'user':
|
||||
ztfRun('model/user');
|
||||
break;
|
||||
case 'bug':
|
||||
ztfRun('model/bug');
|
||||
break;
|
||||
case 'model':
|
||||
ztfRun('model');
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user