* [misc] modify metric test.

This commit is contained in:
songchenxuan
2024-07-24 14:40:30 +08:00
committed by 綦新志
parent 3f91680ac3
commit 3cba2fa09b
4 changed files with 7 additions and 5 deletions
@@ -28,4 +28,4 @@ r(count($calc->getResult())) && p('') && e('10'); // 测试分组数。
r($calc->getResult(array('execution' => 11))) && p('0:value') && e('0.5'); // 测试执行11的进度
r($calc->getResult(array('execution' => 12))) && p('0:value') && e('0.5'); // 测试执行12的进度
r($calc->getResult(array('execution' => 13))) && p('0:value') && e('0.5'); // 测试执行13的进度
r($calc->getResult(array('execution' => 110))) && p('') && e('0'); // 测试不存在执行的进度
r($calc->getResult(array('execution' => 110))) && p('') && e('0'); // 测试不存在执行的进度
@@ -38,9 +38,9 @@ su('admin');
$metric = new metricTest();
r($metric->getCalcInstanceList()) && p('count_of_task_in_project:dataset,id') && e('getTasks,221'); // 测试count_of_task_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_unclosed_story_in_project:dataset,id') && e('getDevStoriesWithProject,213'); // 测试count_of_unclosed_story_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_unclosed_story_in_project:dataset,id') && e('getAllStoriesWithProject,213'); // 测试count_of_unclosed_story_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_user_in_project:dataset,id') && e('getTeamMembers,236'); // 测试count_of_user_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_valid_story_in_project:dataset,id') && e('getDevStoriesWithProject,216'); // 测试count_of_valid_story_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('consume_of_all_in_project:dataset,id') && e('getProjectEfforts,237'); // 测试consume_of_all_in_project的数据源和编号
r($metric->getCalcInstanceList()) && p('ac_of_weekly_all_in_waterfall:dataset,id') && e('getWaterfallEfforts,239'); // 测试ac_of_all_in_waterfall的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_pending_story_in_user:dataset,id') && e('getAllDevStories,259'); // 测试count_of_pending_story_in_user的数据源和编号
r($metric->getCalcInstanceList()) && p('count_of_pending_story_in_user:dataset,id') && e('getAllDevStories,259'); // 测试count_of_pending_story_in_user的数据源和编号
@@ -22,6 +22,6 @@ $metric = new metricTest();
zenData('user')->loadYaml('user', true)->gen(30);
zenData('product')->loadYaml('product', true)->gen(10);
r(count($metric->getControlOptions('user'))) && p('') && e('11'); // 测试user对象数
r(count($metric->getControlOptions('user'))) && p('') && e('12'); // 测试user对象数
r(count($metric->getControlOptions('product'))) && p('') && e('5'); // 测试product对象数
r(count($metric->getControlOptions('waterfall'))) && p('') && e('1'); // 测试传入错误参数的结果
r(count($metric->getControlOptions('waterfall'))) && p('') && e('1'); // 测试传入错误参数的结果
+2
View File
@@ -29,4 +29,6 @@ fields:
range: "20120101 000000-20220101 000000:10D"
type: timestamp
format: YYYY-MM-DD
- field: progress
range: 50
...