* Update unit demo data config.

This commit is contained in:
qixinzhi
2023-07-17 07:51:38 +00:00
parent 7ed10e35a5
commit d1d30e1857
3 changed files with 18 additions and 17 deletions
@@ -3,9 +3,9 @@
include dirname(__FILE__, 7) . '/test/lib/init.php';
include dirname(__FILE__, 4) . '/calc.class.php';
zdTable('product')->gen(200);
zdTable('bug')->gen(1000);
zdTable('story')->gen(1000);
zdTable('product')->config('product', $useCommon = true, $levels = 4)->gen(100);
zdTable('bug')->config('bug', $useCommon = true, $levels = 4)->gen(1000);
zdTable('story')->config('story', $useCommon = true, $levels = 4)->gen(1000);
$metric = new metricTest();
$calc = $metric->calcMetric(__FILE__);
@@ -18,7 +18,8 @@ pid=1
*/
r(count($calc->getResult())) && p('') && e('190'); // 测试激活bug按产品分组数。
r($calc->getResult(array('product' => '78'))) && p('0:value') && e('1.8'); // 测试产品78激活的bug数。
r($calc->getResult(array('product' => '84'))) && p('0:value') && e('0.75'); // 测试产品84激活的bug数。
r($calc->getResult(array('product' => '999'))) && p('') && e('0'); // 测试不存在的产品激活的bug数。
r(count($calc->getResult())) && p('') && e('50'); // 测试激活bug按产品分组数。
r($calc->getResult(array('product' => '78'))) && p('0:value') && e('2.5'); // 测试产品78激活的bug数。
r($calc->getResult(array('product' => '84'))) && p('0:value') && e('0'); // 测试删除产品84激活的bug数。
r($calc->getResult(array('product' => '999'))) && p('') && e('0'); // 测试不存在的产品激活的bug数。
:wa
@@ -3,8 +3,8 @@
include dirname(__FILE__, 7) . '/test/lib/init.php';
include dirname(__FILE__, 4) . '/calc.class.php';
zdTable('product')->gen(200);
zdTable('bug')->gen(1000);
zdTable('product')->config('product', $useCommon = true, $levels = 4)->gen(100);
zdTable('bug')->config('bug', $useCommon = true, $levels = 4)->gen(1000);
$metric = new metricTest();
$calc = $metric->calcMetric(__FILE__);
@@ -17,7 +17,7 @@ pid=1
*/
r(count($calc->getResult())) && p('') && e('92'); // 测试激活bug按产品分组数。
r($calc->getResult(array('product' => '78'))) && p('0:value') && e('9'); // 测试产品78激活的bug数。
r($calc->getResult(array('product' => '84'))) && p('0:value') && e('0'); // 测试产品84激活的bug数。
r(count($calc->getResult())) && p('') && e('50'); // 测试激活bug按产品分组数。
r($calc->getResult(array('product' => '81'))) && p('0:value') && e('6'); // 测试产品78激活的bug数。
r($calc->getResult(array('product' => '84'))) && p('0:value') && e('0'); // 测试删除产品84激活的bug数。
r($calc->getResult(array('product' => '999'))) && p('') && e('0'); // 测试不存在的产品激活的bug数。
@@ -3,8 +3,8 @@
include dirname(__FILE__, 7) . '/test/lib/init.php';
include dirname(__FILE__, 4) . '/calc.class.php';
zdTable('product')->gen(200);
zdTable('story')->config('story')->gen(1000);
zdTable('product')->config('product', $useCommon = true, $levels = 4)->gen(100);
zdTable('story')->config('story', $useCommon = true, $levels = 4)->gen(1000);
$metric = new metricTest();
$calc = $metric->calcMetric(__FILE__);
@@ -16,8 +16,8 @@ cid=1
pid=1
*/
r(count($calc->getResult())) && p('') && e('100'); // 测试按产品的需求分组数。
r(count($calc->getResult())) && p('') && e('50'); // 测试按产品的需求分组数。
r($calc->getResult(array('product' => '16'))) && p('0:value') && e('55'); // 测试产品16的需求规模数。
r($calc->getResult(array('product' => '78'))) && p('0:value') && e('55'); // 测试产品78的需求规模数。
r($calc->getResult(array('product' => '16'))) && p('0:value') && e('0'); // 测试删除产品16的需求规模数。
r($calc->getResult(array('product' => '78'))) && p('0:value') && e('32'); // 测试产品78的需求规模数。
r($calc->getResult(array('product' => '999'))) && p('') && e('0'); // 测试不存在的产品的需求规模数。