* Add testtask test.

This commit is contained in:
孙广明
2022-04-11 13:52:02 +08:00
parent bd2a51defe
commit a8674ddc91
12 changed files with 125 additions and 27 deletions
+12 -2
View File
@@ -12,6 +12,16 @@ pid=1
*/
$testtask = new testtaskTest();
global $tester;
$tester->loadModel('testtask');
$tester->app->loadClass('pager', $static = true);
r($testtask->getLinkableCasesByBugTest()) && p() && e();
$task1 = $tester->testtask->getById(1);
$task2 = $tester->testtask->getById(2);
$pager = new pager(0, 10, 1);
$cases1 = $tester->testtask->getLinkableCasesByBug(1, $task1, '1 = 1', '', $pager);
$cases2 = $tester->testtask->getLinkableCasesByBug(2, $task2, '1 = 1', '', $pager);
r(count($cases1)) && p() && e('0'); // 通过测试单1关联的版本下的Bug,获取可关联到测试单1的用例数量
r(count($cases2)) && p() && e('0'); // 通过测试单2关联的版本下的Bug,获取可关联到测试单2的用例数量