* Add unit test for metric.
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
include dirname(__FILE__, 7) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 4) . '/calc.class.php';
|
||||
|
||||
zdTable('product')->config('product', $useCommon = true, $levels = 4)->gen(10);
|
||||
zdTable('story')->config('story_status_closedreason', $useCommon = true, $levels = 4)->gen(1000);
|
||||
|
||||
$metric = new metricTest();
|
||||
$calc = $metric->calcMetric(__FILE__);
|
||||
|
||||
/**
|
||||
|
||||
title=rate_of_delivered_story
|
||||
timeout=0
|
||||
cid=1
|
||||
|
||||
*/
|
||||
|
||||
r($calc->getResult()) && p('0:value') && e('0.4035'); // 测试按全局统计的研发需求交付率
|
||||
Reference in New Issue
Block a user