* Code for stort test.

This commit is contained in:
孙广明
2022-03-28 17:36:54 +08:00
parent 21d4a48642
commit b81a361d26
100 changed files with 491 additions and 202 deletions
-117
View File
@@ -501,123 +501,6 @@ class storyTest
return $this->objectModel->getByList($storyIdList);
}
public function getByFieldTest($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy = '', $pager = null, $operator = 'equal')
{
$objects = $this->objectModel->getByField($productID, $branch, $modules, $fieldName, $fieldValue, $type = 'story', $orderBy = '', $pager = null, $operator = 'equal');
if(dao::isError()) return dao::getError();
return $objects;
}
public function get2BeClosedTest($productID, $branch, $modules, $type = 'story', $orderBy = '', $pager = null)
{
$objects = $this->objectModel->get2BeClosed($productID, $branch, $modules, $type = 'story', $orderBy = '', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getBySearchTest($productID, $branch = '', $queryID = 0, $orderBy = '', $executionID = '', $type = 'story', $excludeStories = '', $pager = null)
{
$objects = $this->objectModel->getBySearch($productID, $branch = '', $queryID = 0, $orderBy = '', $executionID = '', $type = 'story', $excludeStories = '', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getBySQLTest($productID, $sql, $orderBy, $pager = null, $type = 'story')
{
$objects = $this->objectModel->getBySQL($productID, $sql, $orderBy, $pager = null, $type = 'story');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getExecutionStoriesTest($executionID = 0, $productID = 0, $branch = 0, $orderBy = 't1.`order`_desc', $type = 'byModule', $param = 0, $storyType = 'story', $excludeStories = '', $pager = null)
{
$objects = $this->objectModel->getExecutionStories($executionID = 0, $productID = 0, $branch = 0, $orderBy = 't1.`order`_desc', $type = 'byModule', $param = 0, $storyType = 'story', $excludeStories = '', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getExecutionStoryPairsTest($executionID = 0, $productID = 0, $branch = 'all', $moduleIdList = 0, $type = 'full', $status = 'all')
{
$objects = $this->objectModel->getExecutionStoryPairs($executionID = 0, $productID = 0, $branch = 'all', $moduleIdList = 0, $type = 'full', $status = 'all');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getPlanStoriesTest($planID, $status = 'all', $orderBy = 'id_desc', $pager = null)
{
$objects = $this->objectModel->getPlanStories($planID, $status = 'all', $orderBy = 'id_desc', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getPlanStoryPairsTest($planID, $status = 'all', $orderBy = 'id_desc', $pager = null)
{
$objects = $this->objectModel->getPlanStoryPairs($planID, $status = 'all', $orderBy = 'id_desc', $pager = null);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getStoriesByPlanIdListTest($planIdList = '')
{
$objects = $this->objectModel->getStoriesByPlanIdList($planIdList = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getParentStoryPairsTest($productID, $append = '')
{
$objects = $this->objectModel->getParentStoryPairs($productID, $append = '');
if(dao::isError()) return dao::getError();
return $objects;
}
public function getUserStoriesTest($account, $type = 'assignedTo', $orderBy = 'id_desc', $pager = null, $storyType = 'story', $includeLibStories = true)
{
$objects = $this->objectModel->getUserStories($account, $type = 'assignedTo', $orderBy = 'id_desc', $pager = null, $storyType = 'story', $includeLibStories = true);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getUserStoryPairsTest($account, $limit = 10, $type = 'story', $skipProductIDList = array())
{
$objects = $this->objectModel->getUserStoryPairs($account, $limit = 10, $type = 'story', $skipProductIDList = array());
if(dao::isError()) return dao::getError();
return $objects;
}
public function getIdListWithTaskTest($executionID)
{
$objects = $this->objectModel->getIdListWithTask($executionID);
if(dao::isError()) return dao::getError();
return $objects;
}
public function getTeamMembersTest($storyID, $actionType)
{
$objects = $this->objectModel->getTeamMembers($storyID, $actionType);
+10 -1
View File
@@ -8,6 +8,15 @@ title=测试 storyModel->activate();
cid=1
pid=1
查看激活之前的需求状态 >> active
查看激活之前的需求状态 >> closed
查看激活之前的需求状态 >> changed
查看激活之前的需求状态 >> draft
查看激活之后的需求状态 >> active
查看激活之后的需求状态 >> active
查看激活之后的需求状态 >> active
查看激活之后的需求状态 >> active
*/
global $tester;
@@ -38,4 +47,4 @@ r($afterActivate63) && p('status') && e('active'); //查看激活之后的需
r($afterActivate100) && p('status') && e('active'); //查看激活之后的需求状态
r($afterActivate301) && p('status') && e('active'); //查看激活之后的需求状态
system("./ztest init");
system("./ztest init");
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->assign();
cid=1
pid=1
指派需求,查看返回的指派人信息 >> 2,test2
指派需求,查看返回的指派人信息 >> 4,
指派需求,查看返回的指派人信息 >> 5,user10
指派需求,查看返回的指派人信息 >> 10,admin
指派需求,查看返回的指派人信息 >> 100,user50
指派需求,查看返回的指派人信息 >> 101,pm1
*/
$story = new storyTest();
@@ -20,4 +27,4 @@ r($story->assignTest(10, 'admin')) && p('id,assignedTo') && e('10,admin'); /
r($story->assignTest(100, 'user50')) && p('id,assignedTo') && e('100,user50'); //指派需求,查看返回的指派人信息
r($story->assignTest(101, 'pm1')) && p('id,assignedTo') && e('101,pm1'); //指派需求,查看返回的指派人信息
system("./ztest init");
system("./ztest init");
+9 -1
View File
@@ -9,6 +9,14 @@ title=测试 storyModel->batchAssignTo();
cid=1
pid=1
批量指派6个需求,查看修改成功的需求数量 >> 6
批量指派6个需求,查看修改成功的需求指派人 >> test20
批量指派6个需求,查看修改成功的需求指派人 >> test20
批量指派6个需求,查看修改成功的需求指派人 >> test20
批量指派6个需求,查看修改成功的需求指派人 >> test20
批量指派6个需求,查看修改成功的需求指派人 >> test20
批量指派6个需求,查看修改成功的需求指派人 >> test20
*/
$story = new storyTest();
@@ -26,4 +34,4 @@ r($stories) && p('4:assignedTo') && e('test20'); // 批量指派6个需
r($stories) && p('5:assignedTo') && e('test20'); // 批量指派6个需求,查看修改成功的需求指派人
r($stories) && p('6:assignedTo') && e('test20'); // 批量指派6个需求,查看修改成功的需求指派人
system("./ztest init");
system("./ztest init");
+6 -1
View File
@@ -9,6 +9,11 @@ title=测试 storyModel->batchChangeBranch();
cid=1
pid=1
批量修改需求的所属分支,判断被修改分支需求的数量 >> 3
批量修改需求的所属分支,判断需求2修改后的分支ID >> 2
批量修改需求的所属分支,判断需求4修改后的分支ID >> 2
批量修改需求的所属分支,判断需求6修改后的分支ID >> 2
*/
$story = new storyTest();
@@ -20,4 +25,4 @@ r(count($stories)) && p() && e('3'); // 批量修改需求的所属分
r($stories) && p('2:branch') && e('2'); // 批量修改需求的所属分支,判断需求2修改后的分支ID
r($stories) && p('4:branch') && e('2'); // 批量修改需求的所属分支,判断需求4修改后的分支ID
r($stories) && p('6:branch') && e('2'); // 批量修改需求的所属分支,判断需求6修改后的分支ID
system("./ztest init");
system("./ztest init");
+9 -1
View File
@@ -9,6 +9,14 @@ title=测试 storyModel->batchChangeModule();
cid=1
pid=1
批量修改6个需求的模块,查看被修改模块的需求数量 >> 6
批量修改6个需求的模块,查看需求1修改后的模块ID >> 1366
批量修改6个需求的模块,查看需求2修改后的模块ID >> 1366
批量修改6个需求的模块,查看需求3修改后的模块ID >> 1366
批量修改6个需求的模块,查看需求4修改后的模块ID >> 1366
批量修改6个需求的模块,查看需求5修改后的模块ID >> 1366
批量修改6个需求的模块,查看需求6修改后的模块ID >> 1366
*/
$story = new storyTest();
@@ -22,4 +30,4 @@ r($stories) && p('3:module') && e('1366'); // 批量修改6个需求的
r($stories) && p('4:module') && e('1366'); // 批量修改6个需求的模块,查看需求4修改后的模块ID
r($stories) && p('5:module') && e('1366'); // 批量修改6个需求的模块,查看需求5修改后的模块ID
r($stories) && p('6:module') && e('1366'); // 批量修改6个需求的模块,查看需求6修改后的模块ID
system("./ztest init");
system("./ztest init");
+16 -1
View File
@@ -9,6 +9,21 @@ title=测试 storyModel->batchChangePlan();
cid=1
pid=1
批量修改6个需求的计划,查看被修改计划的需求数量 >> 6
批量修改6个需求的计划,查看被修改计划的需求数量 >> 6
批量修改6个需求的计划,查看需求1修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求2修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求3修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求4修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求5修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求6修改后的计划ID >> ,1366
批量修改6个需求的计划,查看需求1修改后的计划ID >> ,1366,1400
批量修改6个需求的计划,查看需求2修改后的计划ID >> ,1366,1400
批量修改6个需求的计划,查看需求3修改后的计划ID >> ,1366,1400
批量修改6个需求的计划,查看需求4修改后的计划ID >> ,1366,1400
批量修改6个需求的计划,查看需求5修改后的计划ID >> ,1366,1400
批量修改6个需求的计划,查看需求6修改后的计划ID >> ,1366,1400
*/
$story = new storyTest();
@@ -30,4 +45,4 @@ r($stories2) && p('3:plan') && e(',1366,1400'); // 批量修改6个需
r($stories2) && p('4:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求4修改后的计划ID
r($stories2) && p('5:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求5修改后的计划ID
r($stories2) && p('6:plan') && e(',1366,1400'); // 批量修改6个需求的计划,查看需求6修改后的计划ID
system("../../ztest init");
system("../../ztest init");
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->batchChangeStage();
cid=1
pid=1
批量修改6个需求的阶段,查看被修改阶段的需求数量 >> 5
批量修改6个需求的阶段,查看需求101修改后的阶段 >> developing
批量修改6个需求的阶段,查看需求102修改后的阶段 >> developing
批量修改6个需求的阶段,查看需求104修改后的阶段 >> developing
批量修改6个需求的阶段,查看需求110修改后的阶段 >> developing
批量修改6个需求的阶段,查看需求114修改后的阶段 >> developing
*/
$story = new storyTest();
@@ -21,4 +28,4 @@ r($result) && p('102:stage') && e('developing'); // 批量修改6个需
r($result) && p('106:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求104修改后的阶段
r($result) && p('110:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求110修改后的阶段
r($result) && p('114:stage') && e('developing'); // 批量修改6个需求的阶段,查看需求114修改后的阶段
system("./ztest init");
system("./ztest init");
+9 -1
View File
@@ -9,6 +9,14 @@ title=测试 storyModel->batchClose();
cid=1
pid=1
批量关闭6个需求,查看被关闭的需求数量 >> 6
批量关闭需求,查看需求1被关闭后的字段 >> closed,closed,done,0
批量关闭需求,查看需求2被关闭后的字段 >> closed,closed,willnotdo,0
批量关闭需求,查看需求3被关闭后的字段 >> closed,closed,putoff,0
批量关闭需求,查看需求4被关闭后的字段 >> closed,closed,duplicate,8
批量关闭需求,查看需求5被关闭后的字段 >> closed,closed,cancel,0
批量关闭需求,查看需求6被关闭后的字段 >> closed,closed,bydesign,0
*/
$story = new storyTest();
@@ -30,4 +38,4 @@ r($stories) && p('3:status,stage,closedReason,duplicateStory') && e('clos
r($stories) && p('4:status,stage,closedReason,duplicateStory') && e('closed,closed,duplicate,8'); // 批量关闭需求,查看需求4被关闭后的字段
r($stories) && p('5:status,stage,closedReason,duplicateStory') && e('closed,closed,cancel,0'); // 批量关闭需求,查看需求5被关闭后的字段
r($stories) && p('6:status,stage,closedReason,duplicateStory') && e('closed,closed,bydesign,0'); // 批量关闭需求,查看需求6被关闭后的字段
system("./ztest init");
system("./ztest init");
+6 -1
View File
@@ -9,6 +9,11 @@ title=测试 storyModel->batchCreate();
cid=1
pid=1
插入两条软件需求,判断返回的需求总量 >> 2
插入两条用户需求,判断返回的需求总量 >> 2
插入两条软件需求,判断返回的title、type等信息 >> 测试需求1,story,1,测试需求描述1,1,planned,2221
插入两条用户需求,判断返回的title、type等信息 >> 测试需求2,requirement,2,测试需求描述2,2,planned,2222
*/
$story = new storyTest();
@@ -28,4 +33,4 @@ r(count($result1)) && p() && e('2'); // 插入两条软件需求,判断返回
r(count($result2)) && p() && e('2'); // 插入两条用户需求,判断返回的需求总量
r($result1) && p('401:title,type,pri,spec,estimate,stage,module') && e('测试需求1,story,1,测试需求描述1,1,planned,2221'); // 插入两条软件需求,判断返回的title、type等信息
r($result2) && p('404:title,type,pri,spec,estimate,stage,module') && e('测试需求2,requirement,2,测试需求描述2,2,planned,2222'); // 插入两条用户需求,判断返回的title、type等信息
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->batchGetStoryStage();
cid=1
pid=1
*/
$story = new storyTest();
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->batchReview();
cid=1
pid=1
批量评审传入三个ID,查看被评审的需求数量 >> 2
批量评审需求,查看被评审后的需求状态、阶段等信息 >> active,projected,done
批量评审传入三个ID,查看被评审的需求数量 >> 2
批量评审需求,查看被评审后的需求状态、阶段等信息 >> closed,closed,bydesign
批量评审传入三个ID,查看被评审的需求数量 >> 2
批量评审需求,查看被评审后的需求状态、阶段等信息 >> active,projected,cancel
*/
$story = new storyTest();
@@ -27,4 +34,4 @@ r(count($review2)) && p() && e('2');
r($review2) && p('308:status,stage,closedReason') && e('closed,closed,bydesign'); // 批量评审需求,查看被评审后的需求状态、阶段等信息
r(count($review3)) && p() && e('2'); // 批量评审传入三个ID,查看被评审的需求数量
r($review3) && p('314:status,stage,closedReason') && e('active,projected,cancel'); // 批量评审需求,查看被评审后的需求状态、阶段等信息
system("./ztest init");
system("./ztest init");
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->batchToTask();
cid=1
pid=1
6个需求批量转任务,查看转化后的数量 >> 5
查看从需求转化过来的任务的名称、状态、优先级等字段 >> 11,101,软件需求66,wait,0,test,
查看从需求转化过来的任务的名称、状态、优先级等字段 >> 11,101,软件需求68,wait,0,test,
查看从需求转化过来的任务的名称、状态、优先级等字段 >> 11,101,软件需求70,wait,0,test,
查看从需求转化过来的任务的名称、状态、优先级等字段 >> 11,101,软件需求102,wait,0,test,
查看从需求转化过来的任务的名称、状态、优先级等字段 >> 11,101,软件需求220,wait,0,test,
*/
$story = new storyTest();
@@ -25,4 +32,4 @@ r($tasks) && p('912:project,execution,name,status,pri,type,assignedTo')
r($tasks) && p('913:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求70,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段
r($tasks) && p('914:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求102,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段
r($tasks) && p('915:project,execution,name,status,pri,type,assignedTo') && e('11,101,软件需求220,wait,0,test,'); //查看从需求转化过来的任务的名称、状态、优先级等字段
system("./ztest init");
system("./ztest init");
+6 -1
View File
@@ -9,6 +9,11 @@ title=测试 storyModel->batchUpdate();
cid=1
pid=1
更新两条软件需求,判断返回的需求总量 >> 2
更新两条用户需求,判断返回的需求总量 >> 2
更新两条软件需求,判断返回的title、type等信息 >> 测试软件需求2,story,3,测试来源备注2,3,2223
更新两条用户需求,判断返回的title、type等信息 >> 测试用户需求2,requirement,3,测试来源备注2,3,2221
*/
$story = new storyTest();
@@ -46,4 +51,4 @@ r(count($result1)) && p() && e('2'); // 更新两条软件需求,判断返回
r(count($result2)) && p() && e('2'); // 更新两条用户需求,判断返回的需求总量
r($result1) && p('14:title,type,pri,sourceNote,estimate,module') && e('测试软件需求2,story,3,测试来源备注2,3,2223'); // 更新两条软件需求,判断返回的title、type等信息
r($result2) && p('15:title,type,pri,sourceNote,estimate,module') && e('测试用户需求2,requirement,3,测试来源备注2,3,2221'); // 更新两条用户需求,判断返回的title、type等信息
system("./ztest init");
system("./ztest init");
+5 -1
View File
@@ -9,6 +9,10 @@ title=测试 storyModel->change();
cid=1
pid=1
不勾选【不需要评审】,不传入由谁评审时的变更,给出提示 >> 『由谁评审』不能为空。
变更时不填写需求名称,给出提示 >> 『研发需求名称』不能为空。
正常变更需求,判断返回的status、title等信息 >> changed,测试需求1变更标题,测试需求1的变更描述,测试需求1的变更验收标准,1,admin,3
*/
$story = new storyTest();
@@ -31,4 +35,4 @@ $result3 = $story->changeTest(26, $story3);
r($result1[0]) && p() && e('『由谁评审』不能为空。'); // 不勾选【不需要评审】,不传入由谁评审时的变更,给出提示
r($result2) && p('title:0') && e('『研发需求名称』不能为空。'); // 变更时不填写需求名称,给出提示
r($result3) && p('status,title,spec,verify,estimate,lastEditedBy,version') && e('changed,测试需求1变更标题,测试需求1的变更描述,测试需求1的变更验收标准,1,admin,3'); // 正常变更需求,判断返回的status、title等信息
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->checkForceReview();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->checkNeedConfirm();
cid=1
pid=1
*/
$story = new storyTest();
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->close();
cid=1
pid=1
关闭一个用户需求,查看变更的字段1 >> assigedTo,,closed
关闭一个用户需求,查看变更的字段2 >> status,active,closed
关闭一个用户需求,查看变更的字段3 >> stage,wait,closed
关闭一个软件需求,查看变更的字段1 >> closedReason,subdivided,willnotdo
关闭一个软件需求,查看变更的字段2 >> assignedTo,,closed
关闭一个软件需求,查看变更的字段3 >> status,active,closed
*/
$story = new storyTest();
@@ -21,4 +28,4 @@ r($changes1) && p('2:field,old,new') && e('stage,wait,closed'); // 关闭一
r($changes2) && p('0:field,old,new') && e('closedReason,subdivided,willnotdo'); // 关闭一个软件需求,查看变更的字段1
r($changes2) && p('1:field,old,new') && e('assignedTo,,closed'); // 关闭一个软件需求,查看变更的字段2
r($changes2) && p('2:field,old,new') && e('status,active,closed'); // 关闭一个软件需求,查看变更的字段3
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->computeEstimate();
cid=1
pid=1
*/
$story = new storyTest();
+6 -1
View File
@@ -9,6 +9,11 @@ title=测试 storyModel->create();
cid=1
pid=1
不勾选由谁评审并且不传入评审人的情况,报错 >> 『由谁评审』不能为空。
不勾选由谁评审传入评审人的情况,正常插入 >> 0,projected,1
勾选由谁评审,不传入executionID的情况,阶段为wait >> 测试需求3,2,wait
勾选由谁评审,传入executionID和fromBug的情况,阶段为projected >> 『研发需求名称』不能为空。
*/
$story = new storyTest();
@@ -42,4 +47,4 @@ r($result1[0]) && p() && e('『由谁评审』不能为
r($result2) && p('fromBug,stage,product') && e('0,projected,1'); //不勾选由谁评审传入评审人的情况,正常插入
r($result3) && p('title,fromBug,stage') && e('测试需求3,2,wait'); //勾选由谁评审,不传入executionID的情况,阶段为wait
r($result4) && p('title:0') && e('『研发需求名称』不能为空。'); //勾选由谁评审,传入executionID和fromBug的情况,阶段为projected
system("./ztest init");
system("./ztest init");
@@ -9,6 +9,10 @@ title=测试 storyModel->createStoryFromGitlabIssue();
cid=1
pid=1
创建正常的需求,获取创建后的id、title、stage、product >> 401,测试需求1,projected,1
需求名称为空,给出提示 >> 『研发需求名称』不能为空。
创建正常的需求,获取创建后的id、title、stage、product >> 402,测试需求3,projected,2
*/
$story = new storyTest();
@@ -34,4 +38,4 @@ $result3 = $story->createStoryFromGitlabIssueTest($story3, 0);
r($result1) && p('id,title,stage,product') && e('401,测试需求1,projected,1'); //创建正常的需求,获取创建后的id、title、stage、product
r($result2) && p('title:0') && e('『研发需求名称』不能为空。'); //需求名称为空,给出提示
r($result3) && p('id,title,stage,product') && e('402,测试需求3,projected,2'); //创建正常的需求,获取创建后的id、title、stage、product
system("./ztest init");
system("./ztest init");
@@ -9,6 +9,8 @@ title=测试 storyModel->extractAccountsFromList();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->extractAccountsFromSingle();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->formatStories();
cid=1
pid=1
*/
$story = new storyTest();
+11 -3
View File
@@ -8,11 +8,19 @@ title=测试 storyModel->get2BeClosed();
cid=1
pid=1
获取产品3下需要关闭的软件需求数量 >> 1
获取产品3下需要关闭的软件需求详情 >> 软件需求10,story,developed
获取产品10下需要关闭的软件需求数量 >> 1
获取产品10下需要关闭的软件需求详情 >> 软件需求38,story,released
*/
global $tester;
$tester->loadModel('story');
$toBeClosed1 = $tester->story->get2BeClosed(1, 0, array(), 'story', 'id_desc');
$toBeClosed2 = $tester->story->get2BeClosed(2, 0, array(), 'story', 'id_asc');
$toBeClosed1 = $tester->story->get2BeClosed(3, 0, array(), 'story', 'id_desc');
$toBeClosed2 = $tester->story->get2BeClosed(10, 0, array(), 'story', 'id_asc');
r() && p() && e();
r(count($toBeClosed1)) && p() && e('1'); //获取产品3下需要关闭的软件需求数量
r($toBeClosed1) && p('10:title,type,stage') && e('软件需求10,story,developed'); //获取产品3下需要关闭的软件需求详情
r(count($toBeClosed2)) && p() && e('1'); //获取产品10下需要关闭的软件需求数量
r($toBeClosed2) && p('38:title,type,stage') && e('软件需求38,story,released'); //获取产品10下需要关闭的软件需求详情
+7 -1
View File
@@ -9,6 +9,12 @@ title=测试 storyModel->getAffectedScope();
cid=1
pid=1
获取需求1影响任务的数量 >> 6
获取需求15影响任务的数量 >> 0
查看返回的需求1的title >> 用户需求版本三41
查看返回的需求15的title >> 软件需求版本三55
查看需求100的影响的迭代的名字 >> 迭代25
*/
$story = new storyTest();
@@ -20,4 +26,4 @@ r(count($affectedScope1->tasks)) && p() && e('6'); //
r(count($affectedScope2->tasks)) && p() && e('0'); //获取需求15影响任务的数量
r($affectedScope1) && p('title') && e('用户需求版本三41'); //查看返回的需求1的title
r($affectedScope2) && p('title') && e('软件需求版本三55'); //查看返回的需求15的title
r($affectedScope3->executions) && p('125:name') && e('迭代25'); //查看需求100的影响的迭代的名字
r($affectedScope3->executions) && p('125:name') && e('迭代25'); //查看需求100的影响的迭代的名字
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getAllStorySort();
cid=1
pid=1
*/
$story = new storyTest();
+26 -14
View File
@@ -8,22 +8,34 @@ title=测试 storyModel->getByField();
cid=1
pid=1
根据指派给获取软件需求 >> 用户需求1,requirement,admin
根据创建人获取软件需求 >> 软件需求6,user2
根据由谁评审获取软件需求 >> 软件需求12,admin
根据由谁评审获取软件需求数量 >> 2
根据由谁评审获取软件需求 >> 软件需求306,story
根据由谁关闭获取软件需求 >> 用户需求23,requirement,test3,关闭原因23
根据状态获取软件需求 >> 软件需求22,active,story
根据计划获取软件需求 >> 软件需求26,projected,7,19
根据计划获取软件需求数量 >> 2
*/
global $tester;
$tester->loadModel('story');
$byAssignedTo = $tester->story->getByField(1, 0, array(), 'assignedTo', 'admin', 'story', 'id_desc');
$byOpenedBy = $tester->story->getByField(2, 0, array(), 'openedBy', 'admin', 'story', 'id_asc');
$byReviewedBy = $tester->story->getByField(3, 0, array(), 'reviewedBy', 'admin', 'story', 'id_desc');
$byReviewBy = $tester->story->getByField(4, 0, array(), 'reviewBy', 'admin', 'story', 'id_desc');
$byClosedBy = $tester->story->getByField(5, 0, array(), 'closedBy', 'admin', 'story', 'id_desc');
$byStatus = $tester->story->getByField(6, 0, array(), 'status', 'active', 'story', 'id_desc');
$byPlan = $tester->story->getByField(7, 0, array(), 'plan', '0', 'story', 'id_desc');
$byAssignedTo = $tester->story->getByField(1, 0, array(), 'assignedTo', 'admin', 'requirement', 'id_desc');
$byOpenedBy = $tester->story->getByField(2, 0, array(), 'openedBy', 'user2', 'story', 'id_asc');
$byReviewedBy = $tester->story->getByField(3, 0, array(), 'reviewedBy', 'admin', 'story', 'id_desc');
$byReviewBy = $tester->story->getByField(77, 0, array(), 'reviewBy', 'admin', 'story', 'id_desc');
$byClosedBy = $tester->story->getByField(6, 0, array(), 'closedBy', 'test3', 'requirement', 'id_desc');
$byStatus = $tester->story->getByField(6, 0, array(), 'status', 'active', 'story', 'id_desc');
$byPlan = $tester->story->getByField(7, 0, array(), 'plan', '19', 'story', 'id_desc');
r($byAssignedTo) && p() && e();
r($byOpenedBy) && p() && e();
r($byReviewedBy) && p() && e();
r($byReviewBy) && p() && e();
r($byClosedBy) && p() && e();
r($byStatus) && p() && e();
r($byPlan) && p() && e();
r($byAssignedTo) && p('1:title,type,assignedTo') && e('用户需求1,requirement,admin'); // 根据指派给获取软件需求
r($byOpenedBy) && p('6:title,openedBy') && e('软件需求6,user2'); // 根据创建人获取软件需求
r($byReviewedBy) && p('12:title,reviewedBy') && e('软件需求12,admin'); // 根据由谁评审获取软件需求
r(count($byReviewBy)) && p() && e('2'); // 根据由谁评审获取软件需求数量
r($byReviewBy) && p('306:title,type') && e('软件需求306,story'); // 根据由谁评审获取软件需求
r($byClosedBy) && p('23:title,type,closedBy,closedReason') && e('用户需求23,requirement,test3,关闭原因23'); // 根据由谁关闭获取软件需求
r($byStatus) && p('22:title,status,type') && e('软件需求22,active,story'); // 根据状态获取软件需求
r($byPlan) && p('26:title,stage,product,plan') && e('软件需求26,projected,7,19'); // 根据计划获取软件需求
r(count($byPlan)) && p() && e('2'); // 根据计划获取软件需求数量
+7 -1
View File
@@ -9,6 +9,12 @@ title=测试 storyModel->getById();
cid=1
pid=1
>> 6
获取ID为1、版本号为1的需求的名称 >> 用户需求版本一1
获取ID为1、版本号为2的需求的名称 >> 用户需求版本二21
获取ID为2、版本号为3的需求的名称 >> 用户需求版本三43
获取ID为20、版本号为2的需求的名称 >> 这是一个软件需求描述40
*/
$story = new storyTest();
@@ -21,4 +27,4 @@ r(count($story1Version1->tasks)) && p() && e('6');
r($story1Version1) && p('title') && e('用户需求版本一1'); //获取ID为1、版本号为1的需求的名称
r($story1Version2) && p('title') && e('用户需求版本二21'); //获取ID为1、版本号为2的需求的名称
r($story2Version3) && p('title') && e('用户需求版本三43'); //获取ID为2、版本号为3的需求的名称
r($story20Version2) && p('spec') && e('这是一个软件需求描述40'); //获取ID为20、版本号为2的需求的名称
r($story20Version2) && p('spec') && e('这是一个软件需求描述40'); //获取ID为20、版本号为2的需求的名称
+9 -1
View File
@@ -9,6 +9,14 @@ title=测试 storyModel->getByList();
cid=1
pid=1
根据指定的ID列表,获取需求数量 >> 5
获取软件需求数量 >> 10
获取用户需求数量 >> 10
根据指定的ID列表,获取第一个需求的名称 >> 用户需求1
获取第一个软件需求的名称 >> 软件需求2
获取第一个用户需求的名称 >> 用户需求1
传入空类型,返回空列表 >> 0
*/
$story = new storyTest();
@@ -25,4 +33,4 @@ r(count($reqiurements)) && p() && e('10'); //获取用户需
r($storyInIdList) && p('1:title') && e('用户需求1'); //根据指定的ID列表,获取第一个需求的名称
r($stories) && p('2:title') && e('软件需求2'); //获取第一个软件需求的名称
r($reqiurements) && p('1:title') && e('用户需求1'); //获取第一个用户需求的名称
r($emptyStories) && p('') && e('0'); //传入空类型,返回空列表
r($emptyStories) && p('') && e('0'); //传入空类型,返回空列表
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getByReviewBy();
cid=1
pid=1
*/
$story = new storyTest();
+8 -2
View File
@@ -9,8 +9,14 @@ title=测试 storyModel->getBySearch();
cid=1
pid=1
根据第二个query获取需求数量 >> 1
根据第二个query获取需求 >> 软件需求362,story,55,91
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$stories1 = $tester->story->getBySearch(91, '', 2);
r() && p() && e();
r(count($stories1)) && p() && e('1'); // 根据第二个query获取需求数量
r($stories1) && p('362:title,type,plan,product') && e('软件需求362,story,55,91'); // 根据第二个query获取需求
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getBySQL();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getChangedStories();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerAssignedTo();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerChange();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerClosedReason();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerEstimate();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerModule();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerOpenedBy();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerPlan();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerPri();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerProduct();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerSource();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerStage();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getDataOfStorysPerStatus();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getEstimateInfo();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getEstimateRounds();
cid=1
pid=1
*/
$story = new storyTest();
+18 -2
View File
@@ -9,8 +9,24 @@ title=测试 storyModel->getExecutionStories();
cid=1
pid=1
获取执行11下的需求数量 >> 4
获取执行11下的需求详情 >> 软件需求364,story,draft,developing
获取执行11、产品91下的需求数量 >> 2
获取执行11、产品91下的需求详情 >> 软件需求362,story,draft,planned
获取执行11、产品1下的需求数量 >> 2
获取执行11、产品1下的需求详情 >> 软件需求2,story,active,wait
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$stories1 = $tester->story->getExecutionStories(11);
$stories2 = $tester->story->getExecutionStories(11, 91);
$stories3 = $tester->story->getExecutionStories(11, 1);
r() && p() && e();
r(count($stories1)) && p() && e('4'); // 获取执行11下的需求数量
r($stories1) && p('364:title,type,status,stage') && e('软件需求364,story,draft,developing'); // 获取执行11下的需求详情
r(count($stories2)) && p() && e('2'); // 获取执行11、产品91下的需求数量
r($stories2) && p('362:title,type,status,stage') && e('软件需求362,story,draft,planned'); // 获取执行11、产品91下的需求详情
r(count($stories3)) && p() && e('2'); // 获取执行11、产品1下的需求数量
r($stories3) && p('2:title,type,status,stage') && e('软件需求2,story,active,wait'); // 获取执行11、产品1下的需求详情
+18 -2
View File
@@ -9,8 +9,24 @@ title=测试 storyModel->getExecutionStoryPairs();
cid=1
pid=1
获取执行11下的需求数量 >> 5
获取执行11下的需求详情 >> 364:软件需求364 (优先级:4,预计工时:7)
获取执行11、产品91下的需求数量 >> 3
获取执行11、产品91下的需求详情 >> 362:软件需求362 (优先级:2,预计工时:3)
获取执行11、产品1下的需求数量 >> 3
获取执行11、产品1下的需求详情 >> 2:软件需求2 (优先级:2,预计工时:19)
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$stories1 = $tester->story->getExecutionStoryPairs(11);
$stories2 = $tester->story->getExecutionStoryPairs(11, 91);
$stories3 = $tester->story->getExecutionStoryPairs(11, 1);
r() && p() && e();
r(count($stories1)) && p() && e('5'); // 获取执行11下的需求数量
r($stories1) && p('364') && e('364:软件需求364 (优先级:4,预计工时:7)'); // 获取执行11下的需求详情
r(count($stories2)) && p() && e('3'); // 获取执行11、产品91下的需求数量
r($stories2) && p('362') && e('362:软件需求362 (优先级:2,预计工时:3)'); // 获取执行11、产品91下的需求详情
r(count($stories3)) && p() && e('3'); // 获取执行11、产品1下的需求数量
r($stories3) && p('2') && e('2:软件需求2 (优先级:2,预计工时:19)'); // 获取执行11、产品1下的需求详情
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getIdListWithTask();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getKanbanGroupData();
cid=1
pid=1
*/
$story = new storyTest();
+7 -3
View File
@@ -1,6 +1,5 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/story.class.php';
su('admin');
/**
@@ -9,8 +8,13 @@ title=测试 storyModel->getParentStoryPairs();
cid=1
pid=1
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$stories = $tester->story->getParentStoryPairs(91);
//a($stories);die;
r() && p() && e();
r() && p() && e();
+14 -3
View File
@@ -1,6 +1,5 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/story.class.php';
su('admin');
/**
@@ -9,8 +8,20 @@ title=测试 storyModel->getPlanStories();
cid=1
pid=1
获取计划1下的需求列表,每页10条 >> 软件需求290,active,story
获取计划1下的需求列表,不分页 >> 软件需求290,active,story
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$tester->app->loadClass('pager', $static = true);
$pager = new pager(0, 10, 1);
r() && p() && e();
$plan1Stories = $tester->story->getPlanStories(1, 'all', 'id_desc', $pager);
$plan2Stories = $tester->story->getPlanStories(1, 'all', 'id_desc');
r(count($plan1Stories)) && p() && e('10'); //获取计划1下的需求数量,每页10条
r(count($plan2Stories)) && p() && e('20'); //获取计划1下的需求数量,不分页
r($plan1Stories) && p('290:title,status,type') && e('软件需求290,active,story'); //获取计划1下的需求列表,每页10条
r($plan2Stories) && p('2:title,status,type') && e('软件需求2,active,story'); //获取计划1下的需求列表,不分页
-16
View File
@@ -1,16 +0,0 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/story.class.php';
su('admin');
/**
title=测试 storyModel->getPlanStoryPairs();
cid=1
pid=1
*/
$story = new storyTest();
r() && p() && e();
+8 -1
View File
@@ -8,6 +8,13 @@ title=测试 storyModel->getProductStories();
cid=1
pid=1
获取产品1下的所有软件需求数量 >> 2
获取产品1下的所有用户需求数量 >> 2
获取产品2可关联的需求数量 >> 1
查看通过产品1获取的软件需求的type、product、module字段 >> story,1,1822
查看通过产品1获取的用户需求的type、product、module字段 >> requirement,1,1821
查看通过产品3获取的软件需求的type、product、module字段 >> story,3,1830
*/
global $tester;
@@ -21,4 +28,4 @@ r(count($stories2)) && p() && e('2'); /
r(count($stories3)) && p() && e('1'); // 获取产品2可关联的需求数量
r($stories1) && p('2:type,product,module') && e('story,1,1822'); // 查看通过产品1获取的软件需求的type、product、module字段
r($stories2) && p('1:type,product,module') && e('requirement,1,1821'); // 查看通过产品1获取的用户需求的type、product、module字段
r($stories3) && p('10:type,product,module') && e('story,3,1830'); // 查看通过产品3获取的软件需求的type、product、module字段
r($stories3) && p('10:type,product,module') && e('story,3,1830'); // 查看通过产品3获取的软件需求的type、product、module字段
+8 -1
View File
@@ -8,6 +8,13 @@ title=测试 storyModel->getProductStoryPairs();
cid=1
pid=1
获取产品1下的所有软件需求数量 >> 3
获取产品1下的所有用户需求数量 >> 4
获取产品2可关联的需求数量 >> 2
查看通过产品1获取的软件需求的名称字段 >> 4:软件需求4 (优先级:4,预计工时:0),2:软件需求2 (优先级:2,预计工时:20)
查看通过产品1获取的用户需求的键值对详情 >> 1:用户需求1,2:用户需求2,更多...
查看通过产品3获取的软件需求的键值对详情 >> 10:软件需求10 (优先级:2,预计工时:9)
*/
global $tester;
@@ -21,4 +28,4 @@ r(count($stories2)) && p() && e('4'); // 获取产品1下的所有
r(count($stories3)) && p() && e('2'); // 获取产品2可关联的需求数量
r($stories1) && p('4,2') && e('4:软件需求4 (优先级:4,预计工时:0),2:软件需求2 (优先级:2,预计工时:20)'); // 查看通过产品1获取的软件需求的名称字段
r($stories2) && p('1,3,showmore') && e('1:用户需求1,2:用户需求2,更多...'); // 查看通过产品1获取的用户需求的键值对详情
r($stories3) && p('10') && e('10:软件需求10 (优先级:2,预计工时:9)'); // 查看通过产品3获取的软件需求的键值对详情
r($stories3) && p('10') && e('10:软件需求10 (优先级:2,预计工时:9)'); // 查看通过产品3获取的软件需求的键值对详情
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getRelation();
cid=1
pid=1
*/
$story = new storyTest();
+7 -1
View File
@@ -9,6 +9,12 @@ title=测试 storyModel->getRequierements();
cid=1
pid=1
获取产品1下的第一个用户需求名称 >> 用户需求1
获取产品1下的所有用户需求数量 >> 2
获取产品5下的第一个用户需求名称 >> 用户需求17
获取产品5下的所有用户需求数量 >> 2
获取产品ID为Null的用户需求数量 >> 0
*/
$story = new storyTest();
@@ -20,4 +26,4 @@ r($requirements1) && p('1') && e('用户需求1'); //获取产品1下
r(count($requirements1)) && p() && e('2'); //获取产品1下的所有用户需求数量
r($requirements2) && p('17') && e('用户需求17'); //获取产品5下的第一个用户需求名称
r(count($requirements2)) && p() && e('2'); //获取产品5下的所有用户需求数量
r(count($requirements3)) && p() && e('0'); //获取产品ID为Null的用户需求数量
r(count($requirements3)) && p() && e('0'); //获取产品ID为Null的用户需求数量
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getReviewerPairs();
cid=1
pid=1
*/
$story = new storyTest();
+6 -1
View File
@@ -8,6 +8,11 @@ title=测试 storyModel->getStories2Link();
cid=1
pid=1
获取需求1可关联的需求数量 >> 2
获取需求2可关联的需求数量 >> 2
获取需求1可关联的需求id、product >> story,1
获取需求2可关联的需求id、product >> requirement,1
*/
global $tester;
@@ -17,4 +22,4 @@ $stories2 = $tester->loadModel('story')->getStories2Link(2);
r(count($stories1)) && p() && e('2'); // 获取需求1可关联的需求数量
r(count($stories2)) && p() && e('2'); // 获取需求2可关联的需求数量
r($stories1) && p('2:type,product') && e('story,1'); // 获取需求1可关联的需求id、product
r($stories2) && p('1:type,product') && e('requirement,1'); // 获取需求2可关联的需求id、product
r($stories2) && p('1:type,product') && e('requirement,1'); // 获取需求2可关联的需求id、product
+16 -3
View File
@@ -1,6 +1,5 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/story.class.php';
su('admin');
/**
@@ -9,8 +8,22 @@ title=测试 storyModel->getStoriesByPlanIdList();
cid=1
pid=1
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
r() && p() && e();
$planIdList1 = array(1, 2, 3);
$planIdList2 = array(4, 5, 6);
$planIdList3 = array();
$stories1 = $tester->story->getStoriesByPlanIdList($planIdList1);
$stories2 = $tester->story->getStoriesByPlanIdList($planIdList2);
$stories3 = $tester->story->getStoriesByPlanIdList($planIdList3);
r(count($stories1[1])) && p() && e('20'); //传入计划ID列表,获取其下面的需求数量
r($stories1[1]) && p('388:title,type,status') && e('软件需求388,story,draft'); //传入计划ID列表,查看其下面的需求详情
r(count($stories2[4])) && p() && e('20'); //传入计划ID列表,获取其下面的需求数量
r($stories2[4]) && p('392:title,type,status') && e('软件需求392,story,draft'); //传入计划ID列表,查看其下面的需求详情
r(count($stories3, true)) && p() && e('424'); //传入空的计划ID列表,获取系统中所有需求数量
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getStoryRelation();
cid=1
pid=1
*/
$story = new storyTest();
@@ -9,6 +9,8 @@ title=测试 storyModel->getStoryRelationCounts();
cid=1
pid=1
*/
$story = new storyTest();
+5 -1
View File
@@ -9,6 +9,10 @@ title=测试 storyModel->getStorySpecs();
cid=1
pid=1
根据传入的需求ID列表,获取最新版本的需求描述信息 >> 这是一个软件需求描述41
根据传入的需求ID列表,获取最新版本的验收标准信息 >> 这是一个需求验收55
传入三个需求ID,判断获取到的需求描述信息数量 >> 2
*/
$story = new storyTest();
@@ -16,4 +20,4 @@ $storyIdList = array(1, 15, 100);
r($story->getStorySpecsTest($storyIdList)) && p('1:spec') && e('这是一个软件需求描述41'); //根据传入的需求ID列表,获取最新版本的需求描述信息
r($story->getStorySpecsTest($storyIdList)) && p('15:verify') && e('这是一个需求验收55'); //根据传入的需求ID列表,获取最新版本的验收标准信息
r(count($story->getStorySpecsTest($storyIdList))) && p() && e('2'); //传入三个需求ID,判断获取到的需求描述信息数量
r(count($story->getStorySpecsTest($storyIdList))) && p() && e('2'); //传入三个需求ID,判断获取到的需求描述信息数量
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getTeamMembers();
cid=1
pid=1
*/
$story = new storyTest();
+5 -1
View File
@@ -9,6 +9,10 @@ title=测试 storyModel->getTestStories();
cid=1
pid=1
获取和执行103关联的ID为9的测试类型的需求 >> 9
获取和执行111关联的ID为41的测试类型的需求 >> 41
获取和执行103关联的测试类型的需求,为空 >> 0
*/
$story = new storyTest();
@@ -17,4 +21,4 @@ $storyIdList2 = array(1, 2, 3);
r($story->getTestStoriesTest($storyIdList1, 103)) && p('9') && e('9'); //获取和执行103关联的ID为9的测试类型的需求
r($story->getTestStoriesTest($storyIdList1, 111)) && p('41') && e('41'); //获取和执行111关联的ID为41的测试类型的需求
r($story->getTestStoriesTest($storyIdList2, 103)) && p() && e('0'); //获取和执行103关联的测试类型的需求,为空
r($story->getTestStoriesTest($storyIdList2, 103)) && p() && e('0'); //获取和执行103关联的测试类型的需求,为空
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getToAndCcList();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getTrackByID();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getTracks();
cid=1
pid=1
*/
$story = new storyTest();
+17 -3
View File
@@ -1,6 +1,5 @@
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/story.class.php';
su('admin');
/**
@@ -11,6 +10,21 @@ pid=1
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
$tester->app->loadClass('pager', $static = true);
$pager = new pager(0, 10, 1);
r() && p() && e();
$assignUser2Stories = $tester->story->getUserStories('user2', 'assignedTo');
$openedByUser2Stories = $tester->story->getUserStories('user2', 'openedBy', 'id_asc', $pager, 'story', true);
$closedByTest3Stories = $tester->story->getUserStories('test3', 'closedBy', 'id_asc', null, 'requirement', true);
$emptyReviewedByStories = $tester->story->getUserStories('', 'reviewedBy');
r(count($assignUser2Stories)) && p() && e('100'); //获取指派给User2的所有需求数量
r($assignUser2Stories) && p('6:title,type,assignedTo,stage') && e('软件需求6,story,user2,projected'); //获取指派给User2的ID为6的需求详情
r(count($openedByUser2Stories)) && p() && e('10'); //获取由User2创建的需求数量,每页10条
r($openedByUser2Stories) && p('38:title,type,openedBy,stage') && e('软件需求38,story,user2,released'); //获取由User2创建的ID为38的需求详情
r(count($closedByTest3Stories)) && p() && e('14'); //获取由Test3关闭的所有需求数量
r($closedByTest3Stories) && p('203:title,type,closedBy,stage') && e('用户需求203,requirement,test3,'); //获取由Test3关闭的ID为203的需求详情
r(count($emptyReviewedByStories)) && p() && e('25'); //获取无评审人的需求数量
r($emptyReviewedByStories) && p('402:title,type,reviewedBy,stage') && e('软件子需求2,story,,planned'); //获取无评审人的ID为402的需求详情
+16 -2
View File
@@ -9,8 +9,22 @@ title=测试 storyModel->getUserStoryPairs();
cid=1
pid=1
*/
$story = new storyTest();
global $tester;
$tester->loadModel('story');
r() && p() && e();
$skipProductIDList = array(1, 2, 3, 4, 5);
$user2Stories = $tester->story->getUserStoryPairs('user2', '10');
$adminRequirements = $tester->story->getUserStoryPairs('admin', '50', 'requirement');
$user2Stories = $tester->story->getUserStoryPairs('user2', '10', 'story', $skipProductIDList);
a($user2Stories);die;
$openedByUser2Stories = $tester->story->getUserStories('user2', 'openedBy', 'id_asc', $pager, 'story', true);
$closedByTest3Stories = $tester->story->getUserStories('test3', 'closedBy', 'id_asc', null, 'requirement', true);
$emptyReviewedByStories = $tester->story->getUserStories('', 'reviewedBy');
r(count($user2Stories)) && p() && e('10'); //获取指派给User2的需求数量,每页10条
r(count($adminRequirements)) && p() && e('50'); //获取指派给admin的用户需求,每页50条
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getVersion();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getVersions();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->getZeroCase();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->linkStories();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->linkStory();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->mergeChartOption();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->mergePlanTitle();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->mergeReviewer();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->printAssignedHtml();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->printCell();
cid=1
pid=1
*/
$story = new storyTest();
+4 -1
View File
@@ -8,6 +8,9 @@ title=测试 storyModel->recall();
cid=1
pid=1
撤回评审之前的状态信息 >> 2,用户需求版本一62,active
撤回评审之后的状态信息 >> 2,用户需求版本一62,draft
*/
global $tester;
@@ -18,4 +21,4 @@ $afterRecall = $tester->story->getByID(2);
r($beforeRecall) && p('id,title,status') && e('2,用户需求版本一62,active'); // 撤回评审之前的状态信息
r($afterRecall) && p('id,title,status') && e('2,用户需求版本一62,draft'); // 撤回评审之后的状态信息
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->recordReviewAction();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->replaceURLang();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->reportCondition();
cid=1
pid=1
*/
$story = new storyTest();
+5 -1
View File
@@ -9,6 +9,10 @@ title=测试 storyModel->review();
cid=1
pid=1
评审ID为2的需求,不传入评审意见,给出没有选择评审意见的提示 >> 必须选择评审意见
评审一个草稿的需求,传入评审意见为通过,状态变为激活 >> active
评审一个草稿的需求,传入评审意见为拒绝,状态变为关闭 >> closed
*/
$story = new storyTest();
@@ -22,4 +26,4 @@ $review3 = $story->reviewTest(304, $reject);
r($review1[0]) && p() && e('必须选择评审意见'); // 评审ID为2的需求,不传入评审意见,给出没有选择评审意见的提示
r($review2) && p('status') && e('active'); // 评审一个草稿的需求,传入评审意见为通过,状态变为激活
r($review3) && p('status') && e('closed'); // 评审一个草稿的需求,传入评审意见为拒绝,状态变为关闭
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->saveEstimateInfo();
cid=1
pid=1
*/
$story = new storyTest();
+7 -1
View File
@@ -9,6 +9,12 @@ title=测试 storyModel->setStage();
cid=1
pid=1
为需求2拆分几个任务. >> execution
把需求2下面的任务都完成. >> story
查看设置之后的需求状态 >> projected
查看设置之后的需求状态 >> testing
查看设置之后的需求状态 >> tested
*/
$story = new storyTest();
@@ -30,4 +36,4 @@ $after2 = $tester->story->getById(2);
r($before) && p('stage') && e('projected'); //查看设置之后的需求状态
r($after1) && p('stage') && e('testing'); //查看设置之后的需求状态
r($after2) && p('stage') && e('tested'); //查看设置之后的需求状态
system("./ztest init");
system("./ztest init");
@@ -9,6 +9,8 @@ title=测试 storyModel->setStatusByReviewRules();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->sortStoriesOfPlan();
cid=1
pid=1
*/
$story = new storyTest();
+8 -1
View File
@@ -9,6 +9,13 @@ title=测试 storyModel->subdivide();
cid=1
pid=1
将用户需求1拆分三个软件需求,查看relation表记录的数量 >> 3
将用户需求1拆分三个软件需求,查看relation表记录的关系 >> 1,2,subdivideinto
将用户需求1拆分三个软件需求,查看relation表记录的关系 >> 1,6,subdivideinto
将软件需求2拆分三个子需求,查看子需求的数量 >> 3
将软件需求2拆分三个子需求,查看子需求8的parent、title等字段 >> 2,这里是需求来源备注8,8
将软件需求2拆分三个子需求,查看子需求12的parent、title等字段 >> 2,这里是需求来源备注12,12
*/
$story = new storyTest();
@@ -24,4 +31,4 @@ r($result1) && p('2:AID,BID,relation') && e('1,6,subdivideinto'
r(count($result2->children)) && p() && e('3'); // 将软件需求2拆分三个子需求,查看子需求的数量
r($result2->children) && p('8:parent,title,id') && e('2,这里是需求来源备注8,8'); // 将软件需求2拆分三个子需求,查看子需求8的parent、title等字段
r($result2->children) && p('12:parent,title,id') && e('2,这里是需求来源备注12,12'); // 将软件需求2拆分三个子需求,查看子需求12的parent、title等字段
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->superReview();
cid=1
pid=1
*/
$story = new storyTest();
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->unlinkStory();
cid=1
pid=1
*/
$story = new storyTest();
+4 -1
View File
@@ -9,6 +9,9 @@ title=测试 storyModel->update();
cid=1
pid=1
编辑用户需求,判断返回的信息,stage为空 >> 2,4,1,测试来源备注1,2
编辑软件需求,判断返回的信息,stage为wait,parent为2 >> 2,4,1,测试来源备注1,2
*/
$story = new storyTest();
@@ -23,4 +26,4 @@ $result2 = $story->updateTest(3, $story1);
r($result1) && p('parent,pri,estimate,sourceNote,product') && e('2,4,1,测试来源备注1,2'); // 编辑用户需求,判断返回的信息,stage为空
r($result2) && p('parent,pri,estimate,sourceNote,product') && e('2,4,1,测试来源备注1,2'); // 编辑软件需求,判断返回的信息,stage为wait,parent为2
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->updateStoryByReview();
cid=1
pid=1
*/
$story = new storyTest();
+6 -1
View File
@@ -9,6 +9,11 @@ title=测试 storyModel->updateStoryOrderOfPlan();
cid=1
pid=1
把需求1迁移到计划1下,获取更新后的planstory >> 1,1,21
把需求1迁移到计划1下,获取更新后的planstory数量 >> 4
把需求1迁移到计划2下,获取更新后的planstory >> 2,1,1
把需求1迁移到计划2下,获取更新后的planstory数量 >> 1
*/
$story = new storyTest();
@@ -19,4 +24,4 @@ r($planStories1) && p("0:plan,story,order") && e('1,1,21'); // 把需求1
r(count($planStories1)) && p() && e('4'); // 把需求1迁移到计划1下,获取更新后的planstory数量
r($planStories2) && p("0:plan,story,order") && e('2,1,1'); // 把需求1迁移到计划2下,获取更新后的planstory
r(count($planStories2)) && p() && e('1'); // 把需求1迁移到计划2下,获取更新后的planstory数量
system("./ztest init");
system("./ztest init");
+4 -1
View File
@@ -9,6 +9,9 @@ title=测试 storyModel->updateStoryProduct();
cid=1
pid=1
判断需求变更所属产品之前的产品ID >> 1
判断需求变更所属产品之后的产品ID >> 2
*/
$story = new storyTest();
@@ -20,4 +23,4 @@ $newStory = $tester->story->getByID(1);
r($oldStory) && p('product') && e('1'); // 判断需求变更所属产品之前的产品ID
r($newStory) && p('product') && e('2'); // 判断需求变更所属产品之后的产品ID
system("./ztest init");
system("./ztest init");
+2
View File
@@ -9,6 +9,8 @@ title=测试 storyModel->updateStoryVersion();
cid=1
pid=1
*/
$story = new storyTest();
+3
View File
@@ -31,6 +31,9 @@ switch($argv[1])
case 'task':
ztfRun('model/task');
break;
case 'story':
ztfRun('model/story');
break;
case 'execution':
ztfRun('model/execution');
break;