Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into sgm_usercase

This commit is contained in:
sgm0422
2022-03-17 13:52:05 +08:00
31 changed files with 1140 additions and 89 deletions

View File

@@ -60,4 +60,3 @@ INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`)
INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'defaultCurrency', 'CNY');
ALTER TABLE `zt_apistruct` CHANGE `desc` `desc` text COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `type`;
ALTER TABLE `zt_review` ADD `doc` mediumint NULL AFTER `template`;

View File

@@ -46,6 +46,14 @@ class bugTest
}
}
/**
* Test batch create bugs.
*
* @param int $productID
* @param array $param
* @access public
* @return object
*/
public function batchCreateObject($productID, $param = array())
{
$modules = array('0', '0', '0');
@@ -108,7 +116,7 @@ class bugTest
* @param array $bug
* @param int $executionID
* @access public
* @return int
* @return object|int
*/
public function createBugFromGitlabIssueTest($bug, $executionID)
{
@@ -129,7 +137,7 @@ class bugTest
* Test get bugs.
*
* @access public
* @return int
* @return string
*/
public function getBugsTest($product, $branch, $browseType, $module)
{
@@ -149,6 +157,463 @@ class bugTest
$title = '';
foreach($bugs as $bug) $title .= ',' . $bug->title;
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test check delay bug.
*
* @param object $bug
* @param string $status
* @access public
* @return object
*/
public function checkDelayBugTest($bug, $status)
{
$bug->status = $status;
$bug->deadline = $bug->deadline ? date('Y-m-d',strtotime("$bug->deadline day")) : '0000-00-00';
$bug->resolvedDate = $bug->resolvedDate ? date('Y-m-d',strtotime("$bug->resolvedDate day")) : '0000-00-00';
$object = $this->objectModel->checkDelayBug($bug);
if(!isset($object->delay)) $object->delay = 0;
if(dao::isError())
{
return dao::getError();
}
else
{
return $object;
}
}
/**
* Test check delay bugs.
*
* @param string $productIDList
* @access public
* @return string
*/
public function checkDelayedBugsTest($productID)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
/* Load pager. */
$tester->app->loadClass('pager', $static = true);
$pager = new pager(0, 20 ,1);
$bugs = $this->objectModel->getAllBugs($productID, 0, 0, $executions, 'id_asc', $pager, 0);
$bugs = $this->objectModel->checkDelayedBugs($bugs);
$delay = '';
foreach($bugs as $bug)
{
$delay .= ',' . (!isset($bug->delay) ? 0 : $bug->delay);
}
$delay = trim($delay, ',');
if(dao::isError())
{
return dao::getError();
}
else
{
return $delay;
}
}
/**
* Test get bugs of a module.
*
* @param string $productIDList
* @param string $moduleIDList
* @access public
* @return string
*/
public function getModuleBugsTest($productIDList, $moduleIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getModuleBugs($productIDList, 'all', $moduleIDList, $executions);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get all bugs.
*
* @param string $productIDList
* @param string $moduleIDList
* @access public
* @return string
*/
public function getAllBugsTest($productIDList, $moduleIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getAllBugs($productIDList, 'all', $moduleIDList, $executions, 'id_desc');
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs of assign to me.
*
* @param string $productIDList
* @param string $moduleIDList
* @access public
* @return string
*/
public function getByAssigntomeTest($productIDList, $moduleIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByAssigntome($productIDList, 'all', $moduleIDList, $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs of opened by me.
*
* @param string $productIDList
* @param string $moduleIDList
* @access public
* @return string
*/
public function getByOpenedbymeTest($productIDList, $moduleIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByOpenedbyme($productIDList, 'all', $moduleIDList, $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs of resolved by me.
*
* @param string $productIDList
* @access public
* @return string
*/
public function getByResolvedbymeTest($productIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByResolvedbyme($productIDList, 'all', '0', $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs of nobody to do.
*
* @param string $productIDList
* @access public
* @return string
*/
public function getByAssigntonullTest($productIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByAssigntonull($productIDList, 'all', '0', $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get unconfirmed bugs.
*
* @param string $productIDList
* @param string $modules
* @access public
* @return string
*/
public function getUnconfirmedTest($productIDList, $modules)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getUnconfirmed($productIDList, 'all', $modules, $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs the overdueBugs is active or unclosed.
*
* @param string $productIDList
* @param string $modules
* @access public
* @return string
*/
public function getOverdueBugsTest($productIDList, $modules)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getOverdueBugs($productIDList, 'all', $modules, $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs the status is active or unclosed.
*
* @param string $productIDList
* @param string $modules
* @access public
* @return string
*/
public function getByStatusTest($productIDList, $modules, $status)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByStatus($productIDList, 'all', $modules, $executions, $status, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get unclosed bugs for long time.
*
* @param string $productIDList
* @param string $modules
* @access public
* @return string
*/
public function getByLonglifebugsTest($productIDList, $modules)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByLonglifebugs($productIDList, 'all', $modules, $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get postponed bugs.
*
* @param string $productIDList
* @access public
* @return string
*/
public function getByPostponedbugsTest($productIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByPostponedbugs($productIDList, 'all', '0', $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{
return dao::getError();
}
else
{
return $title;
}
}
/**
* Test get bugs need confirm.
*
* @param string $productIDList
* @access public
* @return string
*/
public function getByNeedconfirmTest($productIDList)
{
global $tester;
$executions = $tester->loadModel('execution')->getPairs('0', 'all', 'empty|withdelete');
$bugs = $this->objectModel->getByNeedconfirm($productIDList, 'all', '0', $executions, 'id_desc', null, 0);
$title = '';
foreach($bugs as $bug)
{
$title .= ',' . $bug->title;
}
$title = trim($title, ',');
$title = str_replace("'", '', $title);
if(dao::isError())
{

View File

@@ -1263,6 +1263,7 @@ class executionTest
public function getTeamSkipTest($taskID, $begin, $end)
{
global $tester;
$teams = $tester->dao->select('*')->from(TABLE_TEAM)->where('root')->eq($taskID)->andWhere('type')->eq('task')->orderBy('order')->fetchAll('account');
$object = $this->objectModel->getTeamSkip($teams, $begin, $end);
@@ -1591,8 +1592,12 @@ class executionTest
*/
public function getBurnDataFlotTest($executionID = 0, $count)
{
$date = date("Y-m-d");
$object = $this->objectModel->getBurnDataFlot($executionID, $burnBy = 'left');
$todayData = array();
foreach ($object[$date] as $key => $value) $todayData[$key] = $value;
if(dao::isError())
{
$error = dao::getError();
@@ -1600,7 +1605,7 @@ class executionTest
}
elseif($count == "1")
{
return count($object);
return sizeof($todayData);
}
else
{

View File

@@ -11,13 +11,13 @@ fields:
- field: branch
range: 0
- field: module
range: 0
range: 1821-1823,1825-1827,1831-1833,0{1000000}
- field: execution
range: 101-700{3}
- field: plan
range: 0
- field: story
range: 0
range: 2-400:4
- field: storyVersion
range: 1
- field: task
@@ -57,7 +57,7 @@ fields:
- field: color
range: [#3da7f5,#75c941,#2dbdb2,#797ec9,#ffaf38,#ff4e3e]
- field: confirmed
range: [0,1]:R
range: 0,1
- field: activatedCount
range: 0
- field: mailto
@@ -77,8 +77,11 @@ fields:
type: timestamp
format: "YYYY-MM-DD"
- field: deadline
range: "(+2w):60"
range: "(-1M)-(+1w):-1D"
type: timestamp
prefix: ""
postfix: ""
loop: 0
format: "YYYY-MM-DD"
- field: resolvedBy
range: []{50},$assignedTo{30},admin{20}
@@ -87,7 +90,12 @@ fields:
- field: resolvedBuild
range: []{55},trunk{15},[]{25},trunk{5}
- field: resolvedDate
range:
range: "(+1w)-(-2w):-1D"
type: timestamp
prefix: ""
postfix: ""
loop: 0
format: "YYYY-MM-DD"
- field: closedBy
range: []{80},admin{20}
- field: closedDate

View File

@@ -260,7 +260,7 @@ fields:
format: ""
- field: version
note: "版本号"
range: 1
range: 2{100},1{300}
prefix: ""
postfix: ""
loop: 0

36
test/data/userview.yaml Normal file
View File

@@ -0,0 +1,36 @@
title: table zt_userview
desc: "可访问权限"
author: automated export
version: "1.0"
fields:
- field: account
note: "用户名"
fields:
- field: account1
range: test{100},dev{100},td{100},top{100}
- field: account2
range: 1-100,1-100,1-100,1-100
- field: programs
note: "项目集"
range: 1-10
prefix: ","
postfix: ""
format: ""
- field: products
note: "产品"
range: 1-100
prefix: ","
postfix: ""
format: ""
- field: projects
note: "项目"
range: 11-100
prefix: ","
postfix: ""
format: ""
- field: sprints
note: "迭代"
range: 101-700
prefix: ","
postfix: ""
format: ""

View File

@@ -7,6 +7,7 @@ $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->userview = array('rows' => 400, 'extends' => array('userview'));
$builder->dept = array('rows' => 100, 'extends' => array('dept'));
$builder->action = array('rows' => 100, 'extends' => array('action'));

View File

@@ -91,6 +91,37 @@ class Processor
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();
$productIDList = $this->dao->select('id')->from(TABLE_PRODUCT)->fetchAll();
$projectIDList = $this->dao->select('id')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchAll();
$sprintIDList = $this->dao->select('id')->from(TABLE_EXECUTION)->where('type')->in('sprint,stage,kanban')->fetchAll();
$product = array();
$project = array();
$sprint = array();
foreach($productIDList as $productID) $product[] = $productID->id;
foreach($projectIDList as $projectID) $project[] = $projectID->id;
foreach($sprintIDList as $sprintID) $sprint[] = $sprintID->id;
$products = ",".join(",",$product);
$projects = ",".join(",",$project);
$sprints = ",".join(",",$sprint);
$userViews = new stdclass();
$userViews->account = 'admin';
$userViews->programs = ',1,2,3,4,5,6,7,8,9,10';
$userViews->products = $products;
$userViews->projects = $projects;
$userViews->sprints = $sprints;
$this->dao->insert(TABLE_USERVIEW)->data($userViews)->exec();
$guestViews = new stdclass();
$guestViews->account = 'guest';
$guestViews->programs = '';
$guestViews->products = '';
$guestViews->projects = '';
$guestViews->sprints = '';
$this->dao->insert(TABLE_USERVIEW)->data($guestViews)->exec();
}
/**

View File

@@ -0,0 +1,68 @@
#!/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->checkDelayBug();
cid=1
pid=1
检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期 >> 1
检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期 >> 1
检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期 >> 1
检查deadline在3天前 resolvedDate在1天前 状态为未解决的bug是否延期 >> 2
检查deadline在3天前 resolvedDate在1天前 状态为已解决的bug是否延期 >> 2
检查deadline在3天前 resolvedDate在1天前 状态为已关闭的bug是否延期 >> 2
检查deadline在3天前 resolvedDate在4天前 状态为未解决的bug是否延期 >> 0
检查deadline在3天前 resolvedDate在4天前 状态为已解决的bug是否延期 >> 0
检查deadline在3天前 resolvedDate在4天前 状态为已关闭的bug是否延期 >> 0
检查deadline在3天后 resolvedDate在4天后 状态为未解决的bug是否延期 >> 1
检查deadline在3天后 resolvedDate在4天后 状态为已解决的bug是否延期 >> 1
检查deadline在3天后 resolvedDate在4天后 状态为已关闭的bug是否延期 >> 1
检查deadline在3天后 resolvedDate在4天前 状态为未解决的bug是否延期 >> 0
检查deadline在3天后 resolvedDate在4天前 状态为已解决的bug是否延期 >> 0
检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期 >> 0
*/
$bug1 = new stdclass();
$bug1->deadline = '-1';
$bug1->resolvedDate = '0';
$bug2 = new stdclass();
$bug2->deadline = '-3';
$bug2->resolvedDate = '-1';
$bug3 = new stdclass();
$bug3->deadline = '-3';
$bug3->resolvedDate = '-4';
$bug4 = new stdclass();
$bug4->deadline = '3';
$bug4->resolvedDate = '4';
$bug5 = new stdclass();
$bug5->deadline = '3';
$bug5->resolvedDate = '-4';
$statusList = array('active', 'resolved', 'closed');
$bug = new bugTest();
r($bug->checkDelayBugTest($bug1, $statusList[0])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为未解决的bug是否延期
r($bug->checkDelayBugTest($bug1, $statusList[1])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为已解决的bug是否延期
r($bug->checkDelayBugTest($bug1, $statusList[2])) && p('delay') && e('1'); // 检查deadline在1天前 resolvedDate不存在 状态为已关闭的bug是否延期
r($bug->checkDelayBugTest($bug2, $statusList[0])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为未解决的bug是否延期
r($bug->checkDelayBugTest($bug2, $statusList[1])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为已解决的bug是否延期
r($bug->checkDelayBugTest($bug2, $statusList[2])) && p('delay') && e('2'); // 检查deadline在3天前 resolvedDate在1天前 状态为已关闭的bug是否延期
r($bug->checkDelayBugTest($bug3, $statusList[0])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为未解决的bug是否延期
r($bug->checkDelayBugTest($bug3, $statusList[1])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为已解决的bug是否延期
r($bug->checkDelayBugTest($bug3, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天前 resolvedDate在4天前 状态为已关闭的bug是否延期
r($bug->checkDelayBugTest($bug4, $statusList[0])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为未解决的bug是否延期
r($bug->checkDelayBugTest($bug4, $statusList[1])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为已解决的bug是否延期
r($bug->checkDelayBugTest($bug4, $statusList[2])) && p('delay') && e('1'); // 检查deadline在3天后 resolvedDate在4天后 状态为已关闭的bug是否延期
r($bug->checkDelayBugTest($bug5, $statusList[0])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为未解决的bug是否延期
r($bug->checkDelayBugTest($bug5, $statusList[1])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已解决的bug是否延期
r($bug->checkDelayBugTest($bug5, $statusList[2])) && p('delay') && e('0'); // 检查deadline在3天后 resolvedDate在4天前 状态为已关闭的bug是否延期

View File

@@ -0,0 +1,32 @@
#!/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->checkDelayedBugs();
cid=1
pid=1
检查deadline在resolvedDate前 状态为未解决的bug是否延期 >> 35,33,31
检查deadline在resolvedDate后 状态为未解决的bug是否延期 >> 0,0,0
检查deadline在resolvedDate前 状态为已解决的bug是否延期 >> 10,8,6
检查deadline在resolvedDate后 状态为已解决的bug是否延期 >> 0,0,0
检查deadline在resolvedDate前 状态为已关闭的bug是否延期 >> 6,4,2
检查deadline在resolvedDate后 状态为已关闭的bug是否延期 >> 0,0,0
*/
$productIDList = array('1', '7','18', '20', '28', '33');
$bug = new bugTest();
r($bug->checkDelayedBugsTest($productIDList[0])) && p('delay') && e('35,33,31'); // 检查deadline在resolvedDate前 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[1])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为未解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[2])) && p('delay') && e('10,8,6'); // 检查deadline在resolvedDate前 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[3])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已解决的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[4])) && p('delay') && e('6,4,2'); // 检查deadline在resolvedDate前 状态为已关闭的bug是否延期
r($bug->checkDelayedBugsTest($productIDList[5])) && p('delay') && e('0,0,0'); // 检查deadline在resolvedDate后 状态为已关闭的bug是否延期

View File

@@ -10,12 +10,12 @@ 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标题』不能为空。
测试正常的创建来源于gitlab issue的bugtitle >> 问题1
测试正常的创建来源于gitlab issue的bug的execution >> 101
测试正常的创建来源于gitlab issue的bug的pri >> 3
测试正常的创建来源于gitlab issue的bug的severity >> 3
测试创建没有标题 来源于gitlab issue的异常bug >> 『Bug标题』不能为空。
测试短时间内重复创建来源于gitlab issue的bug >> 0
*/
@@ -43,11 +43,11 @@ $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($bug1, $executionID)) && p('title') && e('问题1'); // 测试正常的创建来源于gitlab issue的bugtitle
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
r($bug->createBugFromGitlabIssueTest($bug1, $executionID)) && p('task') && e('0'); // 测试短时间内重复创建来源于gitlab issue的bug
system("./ztest init");

38
test/model/bug/getallbugs.php Executable file
View File

@@ -0,0 +1,38 @@
#!/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->getAllBugs();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0
查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1
查询产品1 3与模块1821, 1825下的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下的bug >> 0
查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0
查询不存在的产品10001 与模块1821, 1825下的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1831,1000001', '1821, 1825', '1000001');
$bug=new bugTest();
r($bug->getAllBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getAllBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug
r($bug->getAllBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug
r($bug->getAllBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getAllBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下的bug
r($bug->getAllBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug
r($bug->getAllBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getAllBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug
r($bug->getAllBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug

View File

@@ -13,12 +13,12 @@ pid=1
查询正常产品 没有分支 查看全部 没有模块的全部bug的标题拼接1 >> BUG3,BUG2,BUG1
查询正常产品 不存在的分支主干 查看全部 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1
查询正常产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG3,BUG2,BUG1
查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> 0
查询正常产品 没有分支 查看全部 模块1821的全部bug的标题拼接 >> BUG1
查询正常产品 没有分支 查看全部 模块不存在的全部bug的标题拼接 >> BUG3,BUG2,BUG1
查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*'":.<>。?/;175
查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*'":.<>。?/;175
查询多分支产品 没有分支 查看全部 没有模块的全部bug的标题拼接59 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;175
查询多分支产品 主干 查看全部 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;175
查询多分支产品 分支37 查看全部 没有模块的全部bug的标题拼接 >> 0
查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*'":.<>。?/;175
查询多分支产品 没有分支 查看未关闭 没有模块的全部bug的标题拼接 >> BUG177,bug176,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;175
查询多分支产品 没有分支 查看全部 模块2053的全部bug的标题拼接 >> 0
查询不存在的产品的全部bug的标题拼接 >> 0
@@ -34,13 +34,11 @@ $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[1])) && p('title') && e('BUG1'); // 查询正常产品 没有分支 查看全部 模块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[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[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");

View File

@@ -0,0 +1,38 @@
#!/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->getByAssigntome();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下指派给我的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0
查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1
查询产品1 3与模块1821, 1825下指派给我的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下指派给我的bug >> 0
查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug >> 0
查询不存在的产品10001 与模块1821, 1825下指派给我的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下指派给我的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1831,1000001', '1821, 1825', '1000001');
$bug=new bugTest();
r($bug->getByAssigntomeTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下指派给我的bug
r($bug->getByAssigntomeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下指派给我的bug

View File

@@ -0,0 +1,25 @@
#!/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->getByAssigntonull();
cid=1
pid=1
查询产品1 581 58 不存在的产品10001下由我创建的bug >> BUG174,BUG173,BUG172,BUG93,BUG92,BUG91
查询产品1 58下由我创建的bug >> BUG174,BUG173,BUG172
查询不存在的产品10001下由我创建的bug >> 0
*/
$productIDList = array('1,31,58,1000001', '1,58', '1000001');
$bug=new bugTest();
r($bug->getByAssigntonullTest($productIDList[0])) && p('title') && e('BUG174,BUG173,BUG172,BUG93,BUG92,BUG91'); // 查询产品1 581 58 不存在的产品10001下由我创建的bug
r($bug->getByAssigntonullTest($productIDList[1])) && p('title') && e('BUG174,BUG173,BUG172'); // 查询产品1 58下由我创建的bug
r($bug->getByAssigntonullTest($productIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001下由我创建的bug

View File

@@ -0,0 +1,44 @@
#!/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->getByLonglifebugs();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0
查询产品1 2 3 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1
查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> bug8,BUG1
查询产品1 3与模块1821, 1825下长时间未关闭的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug >> 0
查询产品13 不存在的产品10001下长时间未关闭的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG2,BUG1
查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug >> 0
查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug >> 0
查询不存在的产品10001下长时间未关闭的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0');
$bug=new bugTest();
r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('bug8,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1'); // 查询产品1 2 3 不存在的产品10001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG2,BUG1'); // 查询产品13 不存在的产品10001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下长时间未关闭的bug
r($bug->getByLonglifebugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下长时间未关闭的bug

View File

@@ -0,0 +1,38 @@
#!/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->getByOpenedbyme();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我创建的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0
查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1
查询产品1 3与模块1821, 1825下由我创建的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下由我创建的bug >> 0
查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug >> 0
查询不存在的产品10001 与模块1821, 1825下由我创建的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下由我创建的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1831,1000001', '1821, 1825', '1000001');
$bug=new bugTest();
r($bug->getByOpenedbymeTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下由我创建的bug
r($bug->getByOpenedbymeTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下由我创建的bug

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
su('admin');
/**
title=bugModel->getByPostponedbugs();
cid=1
pid=1
查询产品25 32 48 100001下被延期的bug >> BUG94,BUG75,BUG74,BUG73
查询产品25下被延期的bug >> BUG75,BUG74,BUG73
查询产品32下被延期的bug >> BUG94
查询产品1下被延期的bug >> 0
查询不存在的产品10001下被延期的bug >> 0
*/
$productIDList = array('25,32,48,1000001', '25' , '32', '1', '1000001');
$bug=new bugTest();
r($bug->getByPostponedBugsTest($productIDList[0])) && p('title') && e('BUG94,BUG75,BUG74,BUG73'); // 查询产品25 32 48 100001下被延期的bug
r($bug->getByPostponedBugsTest($productIDList[1])) && p('title') && e('BUG75,BUG74,BUG73'); // 查询产品25下被延期的bug
r($bug->getByPostponedBugsTest($productIDList[2])) && p('title') && e('BUG94'); // 查询产品32下被延期的bug
r($bug->getByPostponedBugsTest($productIDList[3])) && p('title') && e('0'); // 查询产品1下被延期的bug
r($bug->getByPostponedBugsTest($productIDList[4])) && p('title') && e('0'); // 查询不存在的产品10001下被延期的bug

View File

@@ -0,0 +1,27 @@
#!/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->getByResolvedbyme();
cid=1
pid=1
查询产品1 29 98 不存在的产品10001 下由我解决的bug >> BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;87,BUG86,BUG85
查询产品1 98下由我解决的bug >> BUG294,BUG293,BUG292
查询产品29下由我解决的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;87,BUG86,BUG85
查询不存在的产品10001 下由我解决的bug >> 0
*/
$productIDList = array('1,29,98,1000001', '1,98', '29', '1000001');
$bug=new bugTest();
r($bug->getByResolvedbymeTest($productIDList[0])) && p('title') && e('BUG294,BUG293,BUG292,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;87,BUG86,BUG85'); // 查询产品1 29 98 不存在的产品10001 下由我解决的bug
r($bug->getByResolvedbymeTest($productIDList[1])) && p('title') && e('BUG294,BUG293,BUG292'); // 查询产品1 98下由我解决的bug
r($bug->getByResolvedbymeTest($productIDList[2])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;87,BUG86,BUG85'); // 查询产品29下由我解决的bug
r($bug->getByResolvedbymeTest($productIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001 下由我解决的bug

75
test/model/bug/getbystatus.php Executable file
View File

@@ -0,0 +1,75 @@
#!/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->getByStatus();
cid=1
pid=1
查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> bug8,BUG1
查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> bug8,BUG1
查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0
查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> BUG1
查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> BUG1
查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0
查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0
查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0
查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0
查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> BUG1
查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> BUG1
查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0
查询产品1 与模块1821状态为unclosed下未确认的bug >> BUG1
查询产品1 与模块1821状态为unresolved下未确认的bug >> BUG1
查询产品1 与模块1821状态为toclosed下未确认的bug >> 0
查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0
查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0
查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0
查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug >> 0
查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug >> 0
查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug >> 0
查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug >> 0
查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug >> 0
查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug >> 0
查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug >> 0
查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug >> 0
查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug >> 0
*/
$productIDList = array('1,3,1000001', '1', '1000001');
$moduleIDList = array('1821,1832,1000001', '1821', '1000001', '0');
$statusList = array('unclosed', 'unresolved', 'toclosed');
$bug=new bugTest();
r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[1])) && p('title') && e('bug8,BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 3 不存在的产品10001 与模块1821状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与模块1821状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[0], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询产品1 3 不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询产品1 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[0])) && p('title') && e('BUG1'); // 查询产品1 与模块1821状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[1])) && p('title') && e('BUG1'); // 查询产品1 与模块1821状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询产品1 与模块1821状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[1], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询产品1 与不存在的模块1000001 状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[0], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1832 不存在的模块1000001 状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[1], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821状态为toclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unclosed下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为unresolved下未确认的bug
r($bug->getByStatusTest($productIDList[2], $moduleIDList[2], $statusList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001 状态为toclosed下未确认的bug

View File

@@ -0,0 +1,38 @@
#!/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->getModuleBugs();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug >> 0
查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1
查询产品1 3与模块1821, 1825下的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下的bug >> 0
查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug >> 0
查询不存在的产品10001 与模块1821, 1825下的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1831,1000001', '1821, 1825', '1000001');
$bug=new bugTest();
r($bug->getModuleBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getModuleBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下的bug
r($bug->getModuleBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下的bug
r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG1'); // 查询产品1 3与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下的bug
r($bug->getModuleBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下的bug
r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1831 不存在的模块1000001下的bug
r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下的bug
r($bug->getModuleBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下的bug

View File

@@ -0,0 +1,44 @@
#!/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->getOverdueBugs();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug >> BUG4,BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0
查询产品1 2 3 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1
查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> bug8,BUG1
查询产品1 3与模块1821, 1825下过期未解决的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下过期未解决的bug >> 0
查询产品13 不存在的产品10001下过期未解决的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG2,BUG1
查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug >> 0
查询不存在的产品10001 与模块1821, 1825下过期未解决的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug >> 0
查询不存在的产品10001下过期未解决的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0');
$bug=new bugTest();
r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[0])) && p('title') && e('bug8,BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG4,BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG6,BUG5,BUG4,BUG3,BUG2,BUG1'); // 查询产品1 2 3 不存在的产品10001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[0])) && p('title') && e('bug8,BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG2,BUG1'); // 查询产品13 不存在的产品10001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下过期未解决的bug
r($bug->getOverdueBugsTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下过期未解决的bug

View File

@@ -0,0 +1,44 @@
#!/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->getUnconfirmed();
cid=1
pid=1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1
查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug >> BUG1
查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0
查询产品1 2 3 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG5,BUG3,BUG1
查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> BUG1
查询产品1 3与模块1821, 1825下未确认的bug >> BUG1
查询产品1 3与模块不存在的模块1000001下未确认的bug >> 0
查询产品13 不存在的产品10001下未确认的bug >> BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG1
查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug >> 0
查询不存在的产品10001 与模块1821, 1825下未确认的bug >> 0
查询不存在的产品10001 与不存在的模块1000001下未确认的bug >> 0
查询不存在的产品10001下未确认的bug >> 0
*/
$productIDList = array('1,2,3,1000001', '1,3', '1000001');
$moduleIDList = array('1821,1825,1832,1000001', '1821, 1825', '1000001', '0');
$bug=new bugTest();
r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[0])) && p('title') && e('BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 2 3 不存在的产品10001 与模块1821, 1825下未确认的bug
r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 2 3 不存在的产品10001 与不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[0], $moduleIDList[3])) && p('title') && e('BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG5,BUG3,BUG1'); // 查询产品1 2 3 不存在的产品10001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[0])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[1])) && p('title') && e('BUG1'); // 查询产品1 3与模块1821, 1825下未确认的bug
r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[2])) && p('title') && e('0'); // 查询产品1 3与模块不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[1], $moduleIDList[3])) && p('title') && e('BUG9,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长@#¥%&*":.<>。?/;7,BUG3,BUG1'); // 查询产品13 不存在的产品10001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[0])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825, 1832 不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[1])) && p('title') && e('0'); // 查询不存在的产品10001 与模块1821, 1825下未确认的bug
r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[2])) && p('title') && e('0'); // 查询不存在的产品10001 与不存在的模块1000001下未确认的bug
r($bug->getUnconfirmedTest($productIDList[2], $moduleIDList[3])) && p('title') && e('0'); // 查询不存在的产品10001下未确认的bug

View File

@@ -10,9 +10,9 @@ title=测试executionModel->getBurnDataFlotTest();
cid=1
pid=1
敏捷执行查询统计 >> 2
瀑布执行查询统计 >> 2
看板执行查询统计 >> 1
敏捷执行查询统计 >> 3
瀑布执行查询统计 >> 3
看板执行查询统计 >> 3
*/
@@ -20,6 +20,6 @@ $executionIDList = array('101', '131', '161');
$count = array('0','1');
$execution = new executionTest();
r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('2'); // 敏捷执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('2'); // 瀑布执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('1'); // 看板执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[0], $count[1])) && p() && e('3'); // 敏捷执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[1], $count[1])) && p() && e('3'); // 瀑布执行查询统计
r($execution->getBurnDataFlotTest($executionIDList[2], $count[1])) && p() && e('3'); // 看板执行查询统计

View File

@@ -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->getKanbanGroupDataTest();
cid=1
pid=1
敏捷执行查询 >> 子任务6,101
瀑布执行查询 >> 更多任务93,131
看板执行查询 >> 开发任务71,161
敏捷执行查询统计 >> 11
瀑布执行查询统计 >> 4
看板执行查询统计 >> 4
*/
$executionIDList = array('101', '131', '161');
$count = array('0', '1');
$execution = new executionTest();
var_dump($execution->getKanbanGroupDataTest($executionIDList[0], $count[0]));die;
r($execution->getKanbanGroupDataTest($executionIDList[0], $count[0])) && p('906:name,execution') && e('子任务6,101'); // 敏捷执行查询
r($execution->getKanbanGroupDataTest($executionIDList[1], $count[0])) && p('693:name,execution') && e('更多任务93,131'); // 瀑布执行查询
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'); // 看板执行查询统计

View File

@@ -11,7 +11,7 @@ cid=1
pid=1
全部执行计划查询 >> 长名称
执行计划查询 >> 1.1 [2021-05-23 ~ 2021-09-23]
执行计划查询 >> 1.1
全部执行计划查询 >> 2
*/
@@ -21,6 +21,6 @@ $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'); // 全部执行计划查询
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'); // 执行计划查询
r($execution->getPlansTest($productIDList, $executionIDList[0], $count[1])) && p() && e('2'); // 全部执行计划查询

View File

@@ -34,7 +34,7 @@ doing任务查询统计 >> 1
undone任务查询统计 >> 3
done任务查询统计 >> 1
根据查询条件查询任务统计 >> 1
根据模块查询任务统计 >> 2
根据模块查询任务统计 >> 8
name_asc,id_asc排序查询统计 >> 4
id_asc排序查询统计 >> 4
pri_desc,id_desc排序查询统计 >> 4
@@ -74,7 +74,7 @@ r($execution->getTasksTest($productIDList[0],$executionIDList[1],$browseType[3],
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('2'); // 根据模块查询任务统计
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排序查询统计

View File

@@ -10,17 +10,17 @@ title=测试executionModel->getTeamSkipTest();
cid=1
pid=1
正常跳过 >> 901,admin,研发
正常跳过 >> 901,user92,研发
begin与end一致 >> 无跳转数据
end与begin一致 >> 无跳转数据
*/
$taskID = 901;
$begin = 'admin';
$end = 'user92';
$begin = 'user92';
$end = 'user93';
$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, $begin, $end)) && p('user92:root,account,role') && e('901,user92,研发'); // 正常跳过
r($execution->getTeamSkipTest($taskID, $begin, $begin)) && p() && e('无跳转数据'); // begin与end一致
r($execution->getTeamSkipTest($taskID, $end, $end)) && p() && e('无跳转数据'); // end与begin一致

View File

@@ -11,8 +11,8 @@ cid=1
pid=1
敏捷执行查询统计 >> 29
瀑布执行查询统计 >> 60
看板执行查询统计 >> 60
瀑布执行查询统计 >> 59
看板执行查询统计 >> 62
错误时间查询统计 >> 0
*/
@@ -25,6 +25,6 @@ $count = array('0','1');
$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[1], $itemCounts[1], $begin[0], $end[0], $count[1])) && p() && e('59'); // 瀑布执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[0], $end[0], $count[1])) && p() && e('62'); // 看板执行查询统计
r($execution->processBurnDataTest($executionIDList[2], $itemCounts[2], $begin[1], $end[1], $count[1])) && p() && e('0'); // 错误时间查询统计

View File

@@ -10,7 +10,7 @@ title=测试executionModel->statRelatedDataTest();
cid=1
pid=1
敏捷执行数据统计 >> 3
敏捷执行数据统计 >> 2
瀑布执行数据统计 >> 4
看板执行数据统计 >> 3
@@ -19,6 +19,6 @@ pid=1
$executionIDList = array('101', '131', '161');
$execution = new executionTest();
r($execution->statRelatedDataTest($executionIDList[0])) && p('storyCount') && e('3'); // 敏捷执行数据统计
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'); // 看板执行数据统计

View File

@@ -11,7 +11,7 @@ cid=1
pid=1
测试重复迭代code >> 『迭代代号』已经有『project1』这条记录了。如果您确定该记录已删除请到后台-系统-数据-回收站还原。
测试修改迭代名称 >> name,迭代1,任务名修改
测试修改迭代名称 >> name,迭代1,迭代名修改
测试修改迭代项目为瀑布项目 >> project,11,41
测试修改迭代项目为看板项目 >> project,41,71
测试修改迭代code >> code,project31,code修改
@@ -44,7 +44,7 @@ $repeatcode = array('name' => '迭代名修改1');
$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], $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