* Add auto test of bug.
This commit is contained in:
@@ -626,6 +626,27 @@ class bugTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get by Sonarqube id.
|
||||
*
|
||||
* @param int $sonarqubeID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function getBySonarqubeIDTest($sonarqubeID)
|
||||
{
|
||||
$array = $this->objectModel->getBySonarqubeID($sonarqubeID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return count($array);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get bug list of a plan.
|
||||
*
|
||||
@@ -1522,6 +1543,28 @@ class bugTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get bug info from a result.
|
||||
*
|
||||
* @param int $runID
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getBugInfoFromResultTest($resultID, $caseID = 0)
|
||||
{
|
||||
$array = $this->objectModel->getBugInfoFromResult($resultID, $caseID);
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return isset($array['title']) ? $array['title'] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get report data of bugs per execution.
|
||||
*
|
||||
@@ -1911,6 +1954,32 @@ class bugTest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get toList and ccList.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getToAndCcListTest($bugID)
|
||||
{
|
||||
$bug = $this->objectModel->getByID($bugID);
|
||||
$array = $this->objectModel->getToAndCcList($bug);
|
||||
|
||||
$account = '';
|
||||
foreach($array as $value) $account .= ',' . $value;
|
||||
$account = trim($account, ',');
|
||||
|
||||
if(dao::isError())
|
||||
{
|
||||
return dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $account;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test get project list.
|
||||
*
|
||||
|
||||
@@ -5,29 +5,41 @@ include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getExecutionBugs();
|
||||
title=bugModel->getBugInfoFromResult();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取执行ID为101的bug >> BUG3,BUG2,BUG1
|
||||
测试获取执行ID为102的bug >> BUG6,BUG5,BUG4
|
||||
测试获取执行ID为103的bug >> BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7
|
||||
测试获取执行ID为104的bug >> BUG12,BUG11,BUG10
|
||||
测试获取执行ID为105的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13
|
||||
测试获取执行ID为106的bug >> BUG18,BUG17,bug16
|
||||
测试获取不存在的执行的bug >> 0
|
||||
测试获取runID为0 caseID为2的bug >> 这个是测试用例2
|
||||
测试获取runID为0 caseID为6的bug >> 这个是测试用例6
|
||||
测试获取runID为0 caseID为10的bug >> 这个是测试用例10
|
||||
测试获取runID为2 caseID为2的bug >> 这个是测试用例2
|
||||
测试获取runID为2 caseID为6的bug >> 这个是测试用例6
|
||||
测试获取runID为2 caseID为10的bug >> 这个是测试用例10
|
||||
测试获取runID为6 caseID为2的bug >> 这个是测试用例2
|
||||
测试获取runID为6 caseID为6的bug >> 这个是测试用例6
|
||||
测试获取runID为6 caseID为10的bug >> 这个是测试用例10
|
||||
测试获取runID为10 caseID为2的bug >> 这个是测试用例2
|
||||
测试获取runID为10 caseID为6的bug >> 这个是测试用例6
|
||||
测试获取runID为10 caseID为10的bug >> 这个是测试用例10
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$executionIDList = array('101', '102', '103', '104', '105', '106', '1000001');
|
||||
$runIDList = array('0', '2', '6', '10');
|
||||
$caseIDList = array('0', '2', '6', '10');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getExecutionBugsTest($executionIDList[0])) && p() && e('BUG3,BUG2,BUG1'); // 测试获取执行ID为101的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[1])) && p() && e('BUG6,BUG5,BUG4'); // 测试获取执行ID为102的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[2])) && p() && e('BUG9,bug8,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 测试获取执行ID为103的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[3])) && p() && e('BUG12,BUG11,BUG10'); // 测试获取执行ID为104的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[4])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,BUG14,BUG13'); // 测试获取执行ID为105的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[5])) && p() && e('BUG18,BUG17,bug16'); // 测试获取执行ID为106的bug
|
||||
r($bug->getExecutionBugsTest($executionIDList[6])) && p() && e('0'); // 测试获取不存在的执行的bug
|
||||
|
||||
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为0 caseID为2的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为0 caseID为6的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[0], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为0 caseID为10的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为2 caseID为2的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为2 caseID为6的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[1], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为2 caseID为10的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为6 caseID为2的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为6 caseID为6的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[2], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为6 caseID为10的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[1])) && p() && e('这个是测试用例2'); // 测试获取runID为10 caseID为2的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[2])) && p() && e('这个是测试用例6'); // 测试获取runID为10 caseID为6的bug
|
||||
r($bug->getBugInfoFromResultTest($runIDList[3], $caseIDList[3])) && p() && e('这个是测试用例10'); // 测试获取runID为10 caseID为10的bug
|
||||
|
||||
23
test/model/bug/getbysonarqubeid.php
Executable file
23
test/model/bug/getbysonarqubeid.php
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getBySonarqubeID();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取sonarqubeID为0的bug issueKey数量 >> 0
|
||||
获取sonarqubeID为2的bug issueKey数量 >> 1
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$sonarqubeIDList = array('0', '2');
|
||||
|
||||
$bug=new bugTest();
|
||||
|
||||
r($bug->getBySonarqubeIDTest($sonarqubeIDList[0])) && p() && e('0'); //获取sonarqubeID为0的bug issueKey数量
|
||||
r($bug->getBySonarqubeIDTest($sonarqubeIDList[1])) && p() && e('1'); //获取sonarqubeID为2的bug issueKey数量
|
||||
67
test/model/bug/getcasebugs.php
Executable file
67
test/model/bug/getcasebugs.php
Executable file
@@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getCaseBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取runID为0 caseID为2的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为0 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为0 caseID为10的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为0 caseID不存在的bug >> 0
|
||||
测试获取runID为2 caseID为0的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为2 caseID为2的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为2 caseID为6的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为2 caseID为10的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为2 caseID不存在的bug >> 测试单转Bug1,测试单转Bug11
|
||||
测试获取runID为6 caseID为0的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为6 caseID为2的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为6 caseID为6的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为6 caseID为10的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为6 caseID不存在的bug >> SonarQube_Bug2,SonarQube_Bug12
|
||||
测试获取runID为10 caseID为0的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为10 caseID为2的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为10 caseID为6的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为10 caseID为10的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为10 caseID不存在的bug >> 测试单转Bug3,测试单转Bug13
|
||||
测试获取runID为不存在 caseID为0的bug >> 0
|
||||
测试获取runID为不存在 caseID为2的bug >> 0
|
||||
测试获取runID为不存在 caseID为6的bug >> 0
|
||||
测试获取runID为不存在 caseID为10的bug >> 0
|
||||
测试获取runID为不存在 caseID不存在的bug >> 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$runIDList = array('0', '2', '6', '10', '1000001');
|
||||
$caseIDList = array('0', '2', '6', '10', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[1])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为0 caseID为2的bug
|
||||
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[2])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为0 caseID为6的bug
|
||||
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[3])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为0 caseID为10的bug
|
||||
r($bug->getCaseBugsTest($runIDList[0], $caseIDList[4])) && p() && e('0 '); // 测试获取runID为0 caseID不存在的bug
|
||||
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[0])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为0的bug
|
||||
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[1])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为2的bug
|
||||
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[2])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为6的bug
|
||||
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[3])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID为10的bug
|
||||
r($bug->getCaseBugsTest($runIDList[1], $caseIDList[4])) && p() && e('测试单转Bug1,测试单转Bug11'); // 测试获取runID为2 caseID不存在的bug
|
||||
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[0])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为0的bug
|
||||
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[1])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为2的bug
|
||||
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[2])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为6的bug
|
||||
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[3])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID为10的bug
|
||||
r($bug->getCaseBugsTest($runIDList[2], $caseIDList[4])) && p() && e('SonarQube_Bug2,SonarQube_Bug12'); // 测试获取runID为6 caseID不存在的bug
|
||||
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[0])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为0的bug
|
||||
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[1])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为2的bug
|
||||
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[2])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为6的bug
|
||||
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[3])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID为10的bug
|
||||
r($bug->getCaseBugsTest($runIDList[3], $caseIDList[4])) && p() && e('测试单转Bug3,测试单转Bug13'); // 测试获取runID为10 caseID不存在的bug
|
||||
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[0])) && p() && e('0'); // 测试获取runID为不存在 caseID为0的bug
|
||||
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[1])) && p() && e('0'); // 测试获取runID为不存在 caseID为2的bug
|
||||
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[2])) && p() && e('0'); // 测试获取runID为不存在 caseID为6的bug
|
||||
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[3])) && p() && e('0'); // 测试获取runID为不存在 caseID为10的bug
|
||||
r($bug->getCaseBugsTest($runIDList[4], $caseIDList[4])) && p() && e('0'); // 测试获取runID为不存在 caseID不存在的bug
|
||||
@@ -9,10 +9,10 @@ title=bugModel->getDataOfBugsPerActivatedCount();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取bug激活次数数据 >> 激活次数:0,300
|
||||
获取bug激活次数数据 >> 激活次数:0,315
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,300'); // 获取bug激活次数数据
|
||||
r($bug->getDataOfBugsPerActivatedCountTest()) && p('0:name,value') && e('激活次数:0,315'); // 获取bug激活次数数据
|
||||
|
||||
@@ -9,9 +9,9 @@ title=bugModel->getDataOfBugsPerAssignedTo();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取用户admin数据 >> admin,80
|
||||
获取用户dev1数据 >> 开发1,80
|
||||
获取用户test1数据 >> 测试1,80
|
||||
获取用户admin数据 >> admin,85
|
||||
获取用户dev1数据 >> 开发1,85
|
||||
获取用户test1数据 >> 测试1,85
|
||||
获取用户closed数据 >> Closed,20
|
||||
|
||||
*/
|
||||
@@ -19,6 +19,6 @@ pid=1
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('admin:name,value') && e('admin,80'); // 获取用户admin数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('dev1,80'); // 获取用户dev1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('test1,80'); // 获取用户test1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('closed,20'); // 获取用户closed数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('dev1:name,value') && e('开发1,85'); // 获取用户dev1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('test1:name,value') && e('测试1,85'); // 获取用户test1数据
|
||||
r($bug->getDataOfBugsPerAssignedToTest()) && p('closed:name,value') && e('Closed,20'); // 获取用户closed数据
|
||||
|
||||
@@ -11,7 +11,7 @@ pid=1
|
||||
|
||||
获取主干bug数 >> 主干,291
|
||||
获取bug数 >> ,3
|
||||
获取迭代版本版本1bug数 >> 迭代版本版本1,6
|
||||
获取项目版本版本1bug数 >> 项目版本版本1,6
|
||||
|
||||
*/
|
||||
|
||||
@@ -19,4 +19,4 @@ pid=1
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('trunk:name,value') && e('主干,291'); // 获取主干bug数
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('0:name,value') && e(',3'); // 获取bug数
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取迭代版本版本1bug数
|
||||
r($bug->getDataOfBugsPerBuildTest()) && p('1:name,value') && e('迭代版本版本1,6'); // 获取项目版本版本1bug数
|
||||
|
||||
@@ -9,9 +9,9 @@ title=bugModel->getDataOfBugsPerExecution();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取执行101数据 >> 迭代1,3,迭代1
|
||||
获取执行102数据 >> 迭代2,3,迭代2
|
||||
获取执行103数据 >> 迭代3,3,迭代3
|
||||
获取执行101数据 >> 迭代1,4,迭代1
|
||||
获取执行102数据 >> 迭代2,4,迭代2
|
||||
获取执行103数据 >> 迭代3,4,迭代3
|
||||
获取执行131数据 >> 阶段31,3,阶段31
|
||||
获取执行132数据 >> 阶段32,3,阶段32
|
||||
获取执行133数据 >> 阶段33,3,阶段33
|
||||
@@ -23,9 +23,9 @@ pid=1
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,3,迭代1'); // 获取执行101数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,3,迭代2'); // 获取执行102数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('103:name,value,title') && e('迭代3,3,迭代3'); // 获取执行103数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('101:name,value,title') && e('迭代1,4,迭代1'); // 获取执行101数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('102:name,value,title') && e('迭代2,4,迭代2'); // 获取执行102数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('103:name,value,title') && e('迭代3,4,迭代3'); // 获取执行103数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('131:name,value,title') && e('阶段31,3,阶段31'); // 获取执行131数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('132:name,value,title') && e('阶段32,3,阶段32'); // 获取执行132数据
|
||||
r($bug->getDataOfBugsPerExecutionTest()) && p('133:name,value,title') && e('阶段33,3,阶段33'); // 获取执行133数据
|
||||
|
||||
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerModule();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取module0数据 >> /,291
|
||||
获取module0数据 >> /,306
|
||||
获取module1821数据 >> /产品模块1,1
|
||||
获取module1822数据 >> /产品模块2,1
|
||||
获取module1823数据 >> /产品模块3,1
|
||||
@@ -25,13 +25,13 @@ pid=1
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,291'); // 获取module0数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1821,1'); // 获取module1821数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1822:name,value') && e('/产品模块1822,1'); // 获取module1822数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1823:name,value') && e('/产品模块1823,1'); // 获取module1823数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1825:name,value') && e('/产品模块1825,1'); // 获取module1825数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模块1826,1'); // 获取module1826数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块1827,1'); // 获取module1827数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块1831,1'); // 获取module1831数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块1832,1'); // 获取module1832数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块1833,1'); // 获取module1833数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('0:name,value') && e('/,306'); // 获取module0数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1821:name,value') && e('/产品模块1,1'); // 获取module1821数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1822:name,value') && e('/产品模块2,1'); // 获取module1822数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1823:name,value') && e('/产品模块3,1'); // 获取module1823数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1825:name,value') && e('/产品模块5,1'); // 获取module1825数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1826:name,value') && e('/产品模块6,1'); // 获取module1826数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1827:name,value') && e('/产品模块7,1'); // 获取module1827数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1831:name,value') && e('/产品模块11,1'); // 获取module1831数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1832:name,value') && e('/产品模块12,1'); // 获取module1832数据
|
||||
r($bug->getDataOfBugsPerModuleTest()) && p('1833:name,value') && e('/产品模块13,1'); // 获取module1833数据
|
||||
|
||||
@@ -9,16 +9,16 @@ title=bugModel->getDataOfBugsPerPri();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取pri为1的数据 >> 优先级:1,75
|
||||
获取pri为2的数据 >> 优先级:2,75
|
||||
获取pri为3的数据 >> 优先级:3,75
|
||||
获取pri为4的数据 >> 优先级:4,75
|
||||
获取pri为1的数据 >> 优先级:1,79
|
||||
获取pri为2的数据 >> 优先级:2,79
|
||||
获取pri为3的数据 >> 优先级:3,79
|
||||
获取pri为4的数据 >> 优先级:4,78
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,75'); // 获取pri为1的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,75'); // 获取pri为2的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,75'); // 获取pri为3的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,75'); // 获取pri为4的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('1:name,value') && e('优先级:1,79'); // 获取pri为1的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('2:name,value') && e('优先级:2,79'); // 获取pri为2的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('3:name,value') && e('优先级:3,79'); // 获取pri为3的数据
|
||||
r($bug->getDataOfBugsPerPriTest()) && p('4:name,value') && e('优先级:4,78'); // 获取pri为4的数据
|
||||
|
||||
@@ -9,16 +9,16 @@ title=bugModel->getDataOfBugsPerSeverity();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取严重程度1数据 >> 1,75
|
||||
获取严重程度2数据 >> 2,75
|
||||
获取严重程度3数据 >> 3,75
|
||||
获取严重程度4数据 >> 4,75
|
||||
获取严重程度1数据 >> 1,79
|
||||
获取严重程度2数据 >> 2,79
|
||||
获取严重程度3数据 >> 3,79
|
||||
获取严重程度4数据 >> 4,78
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,75'); // 获取严重程度1数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,75'); // 获取严重程度2数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,75'); // 获取严重程度3数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,75'); // 获取严重程度4数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('1:name,value') && e('1,79'); // 获取严重程度1数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('2:name,value') && e('2,79'); // 获取严重程度2数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('3:name,value') && e('3,79'); // 获取严重程度3数据
|
||||
r($bug->getDataOfBugsPerSeverityTest()) && p('4:name,value') && e('4,78'); // 获取严重程度4数据
|
||||
|
||||
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerStatus();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取状态为active的数据 >> 激活,150
|
||||
获取状态为active的数据 >> 激活,165
|
||||
获取状态为resolved的数据 >> 已解决,90
|
||||
获取状态为closed的数据 >> 已关闭,60
|
||||
|
||||
@@ -17,6 +17,6 @@ pid=1
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,150'); // 获取状态为active的数据
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('active:name,value') && e('激活,165'); // 获取状态为active的数据
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('resolved:name,value') && e('已解决,90'); // 获取状态为resolved的数据
|
||||
r($bug->getDataOfBugsPerStatusTest()) && p('closed:name,value') && e('已关闭,60'); // 获取状态为closed的数据
|
||||
|
||||
@@ -9,7 +9,7 @@ title=bugModel->getDataOfBugsPerType();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取类型为codeerror的数据 >> 代码错误,34
|
||||
获取类型为codeerror的数据 >> 代码错误,49
|
||||
获取类型为config的数据 >> 配置相关,34
|
||||
获取类型为install的数据 >> 安装部署,34
|
||||
获取类型为security的数据 >> 安全相关,33
|
||||
@@ -23,7 +23,7 @@ pid=1
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,34'); // 获取类型为codeerror的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('codeerror:name,value') && e('代码错误,49'); // 获取类型为codeerror的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('config:name,value') && e('配置相关,34'); // 获取类型为config的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('install:name,value') && e('安装部署,34'); // 获取类型为install的数据
|
||||
r($bug->getDataOfBugsPerTypeTest()) && p('security:name,value') && e('安全相关,33'); // 获取类型为security的数据
|
||||
|
||||
@@ -9,10 +9,10 @@ title=bugModel->getDataOfOpenedBugsPerDay();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取创建的数据 >> 300
|
||||
获取创建的数据 >> 315
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('300'); // 获取创建的数据
|
||||
r($bug->getDataOfOpenedBugsPerDayTest()) && p('0:value') && e('315'); // 获取创建的数据
|
||||
|
||||
@@ -9,10 +9,10 @@ title=bugModel->getDataOfOpenedBugsPerUser();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
获取admin创建的数据 >> admin,300
|
||||
获取admin创建的数据 >> admin,315
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,300'); // 获取admin创建的数据
|
||||
r($bug->getDataOfOpenedBugsPerUserTest()) && p('admin:name,value') && e('admin,315'); // 获取admin创建的数据
|
||||
|
||||
@@ -9,27 +9,27 @@ title=bugModel->getProductLeftBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取buildID为11 productID为1的bug >> 0
|
||||
测试获取buildID为12 productID为41的bug >> 0
|
||||
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为14 productID为41的bug >> BUG121,BUG122,BUG123
|
||||
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为16 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取不存在的build的bug >> 0
|
||||
测试获取不存在的product的bug >> 0
|
||||
测试获取buildID为11 productID为1的bug >> BUG1,BUG2,BUG3,测试单转Bug1,测试单转Bug11,SonarQube_Bug12,测试单转Bug13,SonarQube_Bug14,测试单转Bug15
|
||||
测试获取buildID为12 productID为2的bug >> BUG4,BUG5,BUG6,SonarQube_Bug2
|
||||
测试获取buildID为13 productID为3的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,bug8,BUG9,测试单转Bug3
|
||||
测试获取buildID为14 productID为4的bug >> BUG10,BUG11,BUG12,SonarQube_Bug4
|
||||
测试获取buildID为15 productID为5的bug >> BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5
|
||||
测试获取buildID为16 productID为6的bug >> bug16,BUG17,BUG18,SonarQube_Bug6
|
||||
测试获取不存在的build的bug >> 0
|
||||
测试获取不存在的product的bug >> 0
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$buildIDList = array('1', '2', '3', '4', '5', '6', '1000001');
|
||||
$productIDList = array('1', '41', '1000001');
|
||||
$buildIDList = array('11', '12', '13', '14', '15', '16', '1000001');
|
||||
$productIDList = array('1', '2', '3', '4', '5', '6', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[0])) && p() && e('0'); // 测试获取buildID为11 productID为1的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[1])) && p() && e('0'); // 测试获取buildID为12 productID为41的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[2], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为13 productID为1的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[3], $productIDList[1])) && p() && e('BUG121,BUG122,BUG123'); // 测试获取buildID为14 productID为41的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[4], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[5], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3'); // 测试获取buildID为16 productID为1的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[6], $productIDList[0])) && p() && e('0'); // 测试获取不存在的build的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[2])) && p() && e('0'); // 测试获取不存在的product的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[0], $productIDList[0])) && p() && e('BUG1,BUG2,BUG3,测试单转Bug1,测试单转Bug11,SonarQube_Bug12,测试单转Bug13,SonarQube_Bug14,测试单转Bug15'); // 测试获取buildID为11 productID为1的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[1])) && p() && e('BUG4,BUG5,BUG6,SonarQube_Bug2'); // 测试获取buildID为12 productID为2的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[2], $productIDList[2])) && p() && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7,bug8,BUG9,测试单转Bug3'); // 测试获取buildID为13 productID为3的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[3], $productIDList[3])) && p() && e('BUG10,BUG11,BUG12,SonarQube_Bug4'); // 测试获取buildID为14 productID为4的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[4], $productIDList[4])) && p() && e('BUG13,BUG14,缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15,测试单转Bug5'); // 测试获取buildID为15 productID为5的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[5], $productIDList[5])) && p() && e('bug16,BUG17,BUG18,SonarQube_Bug6'); // 测试获取buildID为16 productID为6的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[6], $productIDList[1])) && p() && e('0'); // 测试获取不存在的build的bug
|
||||
r($bug->getProductLeftBugsTest($buildIDList[1], $productIDList[6])) && p() && e('0'); // 测试获取不存在的product的bug
|
||||
|
||||
@@ -9,25 +9,24 @@ title=bugModel->getProjectBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取项目ID为11的bug >> BUG3;BUG2;BUG1
|
||||
测试获取项目ID为12的bug >> BUG6;BUG5;BUG4
|
||||
测试获取项目ID为13的bug >> BUG9;bug8;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7
|
||||
测试获取项目ID为14的bug >> BUG12;BUG11;BUG10
|
||||
测试获取项目ID为15的bug >> 缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14;BUG13
|
||||
测试获取项目ID为16的bug >> BUG18;BUG17;bug16
|
||||
测试获取项目ID为11的bug >> 测试单转Bug1;BUG3;BUG2
|
||||
测试获取项目ID为12的bug >> SonarQube_Bug2;BUG6;BUG5
|
||||
测试获取项目ID为13的bug >> 测试单转Bug3;BUG9;bug8
|
||||
测试获取项目ID为14的bug >> SonarQube_Bug4;BUG12;BUG11
|
||||
测试获取项目ID为15的bug >> 测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14
|
||||
测试获取项目ID为16的bug >> SonarQube_Bug6;BUG18;BUG17
|
||||
测试获取不存在的项目的bug >> 0
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$projectIDList = array('11', '12', '13', '14', '15', '16', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getProjectBugsTest($projectIDList[0])) && p('0:title;1:title;2:title') && e('BUG3;BUG2;BUG1'); // 测试获取项目ID为11的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[1])) && p('0:title;1:title;2:title') && e('BUG6;BUG5;BUG4'); // 测试获取项目ID为12的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[2])) && p('0:title;1:title;2:title') && e('BUG9;bug8;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();7'); // 测试获取项目ID为13的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[3])) && p('0:title;1:title;2:title') && e('BUG12;BUG11;BUG10'); // 测试获取项目ID为14的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[4])) && p('0:title;1:title;2:title') && e('缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14;BUG13'); // 测试获取项目ID为15的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[5])) && p('0:title;1:title;2:title') && e('BUG18;BUG17;bug16'); // 测试获取项目ID为16的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[0])) && p('0:title;1:title;2:title') && e('测试单转Bug1;BUG3;BUG2'); // 测试获取项目ID为11的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[1])) && p('0:title;1:title;2:title') && e('SonarQube_Bug2;BUG6;BUG5 '); // 测试获取项目ID为12的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[2])) && p('0:title;1:title;2:title') && e('测试单转Bug3;BUG9;bug8'); // 测试获取项目ID为13的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[3])) && p('0:title;1:title;2:title') && e('SonarQube_Bug4;BUG12;BUG11'); // 测试获取项目ID为14的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[4])) && p('0:title;1:title;2:title') && e('测试单转Bug5;缺陷!@()(){}|+=%^&*$#测试bug名称到底可以有多长!@#¥%&*":.<>。?/();15;BUG14'); // 测试获取项目ID为15的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[5])) && p('0:title;1:title;2:title') && e('SonarQube_Bug6;BUG18;BUG17'); // 测试获取项目ID为16的bug
|
||||
r($bug->getProjectBugsTest($projectIDList[6])) && p('0:title;1:title;2:title') && e('0'); // 测试获取不存在的项目的bug
|
||||
|
||||
@@ -9,23 +9,23 @@ title=bugModel->getReleaseBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取buildID为11 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为12 productID为41的bug >> 0
|
||||
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为14 productID为41的bug >> BUG121,BUG122,BUG123
|
||||
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为16 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为11 productID为2的bug >> BUG4,BUG5,BUG6
|
||||
测试获取buildID为12 productID为2的bug >> 0
|
||||
测试获取buildID为13 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为14 productID为2的bug >> BUG4,BUG5,BUG6
|
||||
测试获取buildID为15 productID为1的bug >> BUG1,BUG2,BUG3
|
||||
测试获取buildID为16 productID为2的bug >> BUG4,BUG5,BUG6
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$buildIDList = array('1', '2', '3', '4', '5', '6', '1000001');
|
||||
$productIDList = array('1', '41');
|
||||
$buildIDList = array('11', '12', '13', '14', '15', '16');
|
||||
$productIDList = array('1', '2');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getReleaseBugsTest($buildIDList[0], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为11 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[1], $productIDList[1])) && p('') && e('0'); // 测试获取buildID为12 productID为41的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[2], $productIDList[0])) && p('') && e('BUG121,BUG122,BUG123'); // 测试获取buildID为13 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[3], $productIDList[1])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为14 productID为41的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[4], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为16 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[0], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为11 productID为2的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[1], $productIDList[1])) && p('') && e('0'); // 测试获取buildID为12 productID为2的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[2], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为13 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[3], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为14 productID为2的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[4], $productIDList[0])) && p('') && e('BUG1,BUG2,BUG3'); // 测试获取buildID为15 productID为1的bug
|
||||
r($bug->getReleaseBugsTest($buildIDList[5], $productIDList[1])) && p('') && e('BUG4,BUG5,BUG6'); // 测试获取buildID为16 productID为2的bug
|
||||
|
||||
@@ -9,12 +9,12 @@ title=bugModel->getStoryBugCounts();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取关联storyID为2的bug数量 >> 3
|
||||
测试获取关联storyID为6的bug数量 >> 3
|
||||
测试获取关联storyID为10的bug数量 >> 3
|
||||
测试获取关联storyID为14的bug数量 >> 3
|
||||
测试获取关联storyID为18的bug数量 >> 3
|
||||
测试获取关联storyID为22的bug数量 >> 3
|
||||
测试获取关联storyID为2的bug数量 >> 4
|
||||
测试获取关联storyID为6的bug数量 >> 4
|
||||
测试获取关联storyID为10的bug数量 >> 4
|
||||
测试获取关联storyID为14的bug数量 >> 4
|
||||
测试获取关联storyID为18的bug数量 >> 4
|
||||
测试获取关联storyID为22的bug数量 >> 4
|
||||
测试获取关联storyID不存在的bug数量 >> 0
|
||||
|
||||
*/
|
||||
@@ -23,10 +23,10 @@ pid=1
|
||||
$storyIDList = array('2', '6', '10', '14', '18', '22', '1000001');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[0])) && p() && e('3'); // 测试获取关联storyID为2的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[1])) && p() && e('3'); // 测试获取关联storyID为6的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('3'); // 测试获取关联storyID为10的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('3'); // 测试获取关联storyID为14的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('3'); // 测试获取关联storyID为18的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('3'); // 测试获取关联storyID为22的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[0])) && p() && e('4'); // 测试获取关联storyID为2的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[1])) && p() && e('4'); // 测试获取关联storyID为6的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[2])) && p() && e('4'); // 测试获取关联storyID为10的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[3])) && p() && e('4'); // 测试获取关联storyID为14的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[4])) && p() && e('4'); // 测试获取关联storyID为18的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[5])) && p() && e('4'); // 测试获取关联storyID为22的bug数量
|
||||
r($bug->getStoryBugCountsTest($storyIDList, $storyIDList[6])) && p() && e('0'); // 测试获取关联storyID不存在的bug数量
|
||||
|
||||
28
test/model/bug/gettoandcclist.php
Executable file
28
test/model/bug/gettoandcclist.php
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php'; su('admin');
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/bug.class.php';
|
||||
|
||||
/**
|
||||
|
||||
title=bugModel->getToAndCcList();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取bug1的联系人 >> admin,admin
|
||||
测试获取bug2的联系人 >> admin,admin
|
||||
测试获取bug3的联系人 >> admin,admin
|
||||
测试获取bug51的联系人 >> dev1,admin
|
||||
测试获取bug81的联系人 >> test1,admin
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$bugIDList = array('1', '2', '3', '51', '81');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getToAndCcListTest($bugIDList[0])) && p() && e('admin,admin'); // 测试获取bug1的联系人
|
||||
r($bug->getToAndCcListTest($bugIDList[1])) && p() && e('admin,admin'); // 测试获取bug2的联系人
|
||||
r($bug->getToAndCcListTest($bugIDList[2])) && p() && e('admin,admin'); // 测试获取bug3的联系人
|
||||
r($bug->getToAndCcListTest($bugIDList[3])) && p() && e('dev1,admin'); // 测试获取bug51的联系人
|
||||
r($bug->getToAndCcListTest($bugIDList[4])) && p() && e('test1,admin'); // 测试获取bug81的联系人
|
||||
@@ -9,10 +9,10 @@ title=bugModel->getUserBugPairs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取用户admin的bug >> 80
|
||||
测试获取用户test1的bug >> 80
|
||||
测试获取用户admin的bug >> 85
|
||||
测试获取用户test1的bug >> 85
|
||||
测试获取用户test2的bug >> 0
|
||||
测试获取用户dev1的bug >> 50
|
||||
测试获取用户dev1的bug >> 55
|
||||
测试获取用户po1的bug >> 0
|
||||
|
||||
*/
|
||||
@@ -21,8 +21,8 @@ pid=1
|
||||
$accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('80'); // 测试获取用户admin的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('50'); // 测试获取用户test1的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[0])) && p() && e('85'); // 测试获取用户admin的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[1])) && p() && e('55'); // 测试获取用户test1的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('50'); // 测试获取用户dev1的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug
|
||||
r($bug->getUserBugPairsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug
|
||||
|
||||
@@ -9,10 +9,10 @@ title=bugModel->getUserBugs();
|
||||
cid=1
|
||||
pid=1
|
||||
|
||||
测试获取用户admin的bug >> 80
|
||||
测试获取用户test1的bug >> 80
|
||||
测试获取用户admin的bug >> 85
|
||||
测试获取用户test1的bug >> 85
|
||||
测试获取用户test2的bug >> 0
|
||||
测试获取用户dev1的bug >> 50
|
||||
测试获取用户dev1的bug >> 55
|
||||
测试获取用户po1的bug >> 0
|
||||
|
||||
*/
|
||||
@@ -21,8 +21,8 @@ pid=1
|
||||
$accountIDList = array('admin', 'test1', 'test2', 'dev1', 'po1');
|
||||
|
||||
$bug=new bugTest();
|
||||
r($bug->getUserBugsTest($accountIDList[0])) && p() && e('80'); // 测试获取用户admin的bug
|
||||
r($bug->getUserBugsTest($accountIDList[1])) && p() && e('50'); // 测试获取用户test1的bug
|
||||
r($bug->getUserBugsTest($accountIDList[0])) && p() && e('85'); // 测试获取用户admin的bug
|
||||
r($bug->getUserBugsTest($accountIDList[1])) && p() && e('55'); // 测试获取用户test1的bug
|
||||
r($bug->getUserBugsTest($accountIDList[2])) && p() && e('0'); // 测试获取用户test2的bug
|
||||
r($bug->getUserBugsTest($accountIDList[3])) && p() && e('50'); // 测试获取用户dev1的bug
|
||||
r($bug->getUserBugsTest($accountIDList[3])) && p() && e('55'); // 测试获取用户dev1的bug
|
||||
r($bug->getUserBugsTest($accountIDList[4])) && p() && e('0'); // 测试获取用户po1的bug
|
||||
|
||||
Reference in New Issue
Block a user