From d9d2eea3b96c93ee4b9f2683b9b08346ad4e2374 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Tue, 22 Mar 2022 15:01:20 +0800 Subject: [PATCH] * Add auto test of bug. --- test/class/bug.class.php | 69 +++++++++++++++++++ test/model/bug/getbuginfofromresult.php | 44 +++++++----- test/model/bug/getbysonarqubeid.php | 23 +++++++ test/model/bug/getcasebugs.php | 67 ++++++++++++++++++ .../bug/getdataofbugsperactivatedcount.php | 4 +- test/model/bug/getdataofbugsperassignedto.php | 12 ++-- test/model/bug/getdataofbugsperbuild.php | 4 +- test/model/bug/getdataofbugsperexecution.php | 12 ++-- test/model/bug/getdataofbugspermodule.php | 22 +++--- test/model/bug/getdataofbugsperpri.php | 16 ++--- test/model/bug/getdataofbugsperseverity.php | 16 ++--- test/model/bug/getdataofbugsperstatus.php | 4 +- test/model/bug/getdataofbugspertype.php | 4 +- test/model/bug/getdataofopenedbugsperday.php | 4 +- test/model/bug/getdataofopenedbugsperuser.php | 4 +- test/model/bug/getproductleftbugs.php | 36 +++++----- test/model/bug/getprojectbugs.php | 27 ++++---- test/model/bug/getreleasebugs.php | 28 ++++---- test/model/bug/getstorybugcounts.php | 24 +++---- test/model/bug/gettoandcclist.php | 28 ++++++++ test/model/bug/getuserbugpairs.php | 12 ++-- test/model/bug/getuserbugs.php | 12 ++-- 22 files changed, 335 insertions(+), 137 deletions(-) create mode 100755 test/model/bug/getbysonarqubeid.php create mode 100755 test/model/bug/getcasebugs.php create mode 100755 test/model/bug/gettoandcclist.php diff --git a/test/class/bug.class.php b/test/class/bug.class.php index 6e9777b89f..c7929bd28d 100644 --- a/test/class/bug.class.php +++ b/test/class/bug.class.php @@ -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. * diff --git a/test/model/bug/getbuginfofromresult.php b/test/model/bug/getbuginfofromresult.php index 5147c28e72..78a8965cc5 100755 --- a/test/model/bug/getbuginfofromresult.php +++ b/test/model/bug/getbuginfofromresult.php @@ -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 diff --git a/test/model/bug/getbysonarqubeid.php b/test/model/bug/getbysonarqubeid.php new file mode 100755 index 0000000000..e18c0b9e8a --- /dev/null +++ b/test/model/bug/getbysonarqubeid.php @@ -0,0 +1,23 @@ +#!/usr/bin/env php +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数量 diff --git a/test/model/bug/getcasebugs.php b/test/model/bug/getcasebugs.php new file mode 100755 index 0000000000..bdb29c6fbe --- /dev/null +++ b/test/model/bug/getcasebugs.php @@ -0,0 +1,67 @@ +#!/usr/bin/env php +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 diff --git a/test/model/bug/getdataofbugsperactivatedcount.php b/test/model/bug/getdataofbugsperactivatedcount.php index 739a8f941d..3686205170 100755 --- a/test/model/bug/getdataofbugsperactivatedcount.php +++ b/test/model/bug/getdataofbugsperactivatedcount.php @@ -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激活次数数据 diff --git a/test/model/bug/getdataofbugsperassignedto.php b/test/model/bug/getdataofbugsperassignedto.php index 502b8e2d33..be5d2d698a 100755 --- a/test/model/bug/getdataofbugsperassignedto.php +++ b/test/model/bug/getdataofbugsperassignedto.php @@ -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数据 diff --git a/test/model/bug/getdataofbugsperbuild.php b/test/model/bug/getdataofbugsperbuild.php index 0134f8e00a..a5375fc40b 100755 --- a/test/model/bug/getdataofbugsperbuild.php +++ b/test/model/bug/getdataofbugsperbuild.php @@ -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数 diff --git a/test/model/bug/getdataofbugsperexecution.php b/test/model/bug/getdataofbugsperexecution.php index 77b6b2b7cc..c14d156fba 100755 --- a/test/model/bug/getdataofbugsperexecution.php +++ b/test/model/bug/getdataofbugsperexecution.php @@ -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数据 diff --git a/test/model/bug/getdataofbugspermodule.php b/test/model/bug/getdataofbugspermodule.php index d873788b4b..ea96a1736f 100755 --- a/test/model/bug/getdataofbugspermodule.php +++ b/test/model/bug/getdataofbugspermodule.php @@ -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数据 diff --git a/test/model/bug/getdataofbugsperpri.php b/test/model/bug/getdataofbugsperpri.php index 2ddad468aa..d61b01fed3 100755 --- a/test/model/bug/getdataofbugsperpri.php +++ b/test/model/bug/getdataofbugsperpri.php @@ -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的数据 diff --git a/test/model/bug/getdataofbugsperseverity.php b/test/model/bug/getdataofbugsperseverity.php index 714db1ef40..d0026761f2 100755 --- a/test/model/bug/getdataofbugsperseverity.php +++ b/test/model/bug/getdataofbugsperseverity.php @@ -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数据 diff --git a/test/model/bug/getdataofbugsperstatus.php b/test/model/bug/getdataofbugsperstatus.php index 9853562ea6..9333cbc923 100755 --- a/test/model/bug/getdataofbugsperstatus.php +++ b/test/model/bug/getdataofbugsperstatus.php @@ -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的数据 diff --git a/test/model/bug/getdataofbugspertype.php b/test/model/bug/getdataofbugspertype.php index ce8dc819e3..b5093bbf4c 100755 --- a/test/model/bug/getdataofbugspertype.php +++ b/test/model/bug/getdataofbugspertype.php @@ -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的数据 diff --git a/test/model/bug/getdataofopenedbugsperday.php b/test/model/bug/getdataofopenedbugsperday.php index 81b4484f33..f1c700da29 100755 --- a/test/model/bug/getdataofopenedbugsperday.php +++ b/test/model/bug/getdataofopenedbugsperday.php @@ -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'); // 获取创建的数据 diff --git a/test/model/bug/getdataofopenedbugsperuser.php b/test/model/bug/getdataofopenedbugsperuser.php index 2fcddec550..56149d9049 100755 --- a/test/model/bug/getdataofopenedbugsperuser.php +++ b/test/model/bug/getdataofopenedbugsperuser.php @@ -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创建的数据 diff --git a/test/model/bug/getproductleftbugs.php b/test/model/bug/getproductleftbugs.php index 3aad98a71b..de8198f0bb 100755 --- a/test/model/bug/getproductleftbugs.php +++ b/test/model/bug/getproductleftbugs.php @@ -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 diff --git a/test/model/bug/getprojectbugs.php b/test/model/bug/getprojectbugs.php index a62cca874b..1e15ac68a2 100755 --- a/test/model/bug/getprojectbugs.php +++ b/test/model/bug/getprojectbugs.php @@ -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 diff --git a/test/model/bug/getreleasebugs.php b/test/model/bug/getreleasebugs.php index 22f68e339f..ef36931934 100755 --- a/test/model/bug/getreleasebugs.php +++ b/test/model/bug/getreleasebugs.php @@ -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 diff --git a/test/model/bug/getstorybugcounts.php b/test/model/bug/getstorybugcounts.php index ed005c5922..56fd8de803 100755 --- a/test/model/bug/getstorybugcounts.php +++ b/test/model/bug/getstorybugcounts.php @@ -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数量 diff --git a/test/model/bug/gettoandcclist.php b/test/model/bug/gettoandcclist.php new file mode 100755 index 0000000000..eb74942821 --- /dev/null +++ b/test/model/bug/gettoandcclist.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php +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的联系人 diff --git a/test/model/bug/getuserbugpairs.php b/test/model/bug/getuserbugpairs.php index 67a897ee3a..a557540af0 100755 --- a/test/model/bug/getuserbugpairs.php +++ b/test/model/bug/getuserbugpairs.php @@ -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 diff --git a/test/model/bug/getuserbugs.php b/test/model/bug/getuserbugs.php index 25a233bdd1..a80e06f3ef 100755 --- a/test/model/bug/getuserbugs.php +++ b/test/model/bug/getuserbugs.php @@ -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