* testtask: refactor the script to test the getById method.

This commit is contained in:
liugang
2023-10-11 11:29:42 +08:00
parent 2896a8e484
commit f45221d9d4
+3 -3
View File
@@ -72,6 +72,6 @@ global $tester;
$tester->loadModel('testtask');
r($tester->testtask->getByID(0)) && p('') && e('0'); // 获取ID为0的测试单,返回空
r($tester->testtask->getByID(1)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('11,测试单1,1,正常产品1,normal,101,迭代1,0,11,执行版本版本11,user3,这是测试单描述1,wait,no'); // 获取ID为1的测试单的详细信息
r($tester->testtask->getByID(2)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('12,测试单2,2,正常产品2,normal,102,迭代2,0,12,执行版本版本12,user4,这是测试单描述2,doing,no'); // 获取ID为2的测试单的详细信息
r($tester->testtask->getByID(3)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('13,测试单3,3,正常产品3,normal,103,迭代3,0,13,执行版本版本13,user5,这是测试单描述3,done,no'); // 获取ID为3的测试单的详细信息
r($tester->testtask->getByID(1)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('11,测试单1,1,正常产品1,normal,101,迭代1,0,11,执行101版本11,user3,这是测试单描述1,wait,no'); // 获取ID为1的测试单的详细信息
r($tester->testtask->getByID(2)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('12,测试单2,2,正常产品2,normal,102,迭代2,0,12,执行102版本12,user4,这是测试单描述2,doing,no'); // 获取ID为2的测试单的详细信息
r($tester->testtask->getByID(3)) && p('project,name,product,productName,productType,execution,executionName,branch,build,buildName,owner,desc,status,auto') && e('13,测试单3,3,正常产品3,normal,103,迭代3,0,13,执行103版本13,user5,这是测试单描述3,done,no'); // 获取ID为3的测试单的详细信息