* story #124.
This commit is contained in:
@@ -21,21 +21,6 @@
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.cn
|
||||
*/
|
||||
$lang->testtask->id = '任务编号';
|
||||
$lang->testtask->product = '所属产品';
|
||||
$lang->testtask->project = '所属项目';
|
||||
$lang->testtask->build = 'Build';
|
||||
$lang->testtask->name = '任务名称';
|
||||
$lang->testtask->begin = '开始日期';
|
||||
$lang->testtask->end = '结束日期';
|
||||
$lang->testtask->desc = '任务描述';
|
||||
$lang->testtask->status = '当前状态';
|
||||
$lang->testtask->assignedTo = '指派给';
|
||||
$lang->testtask->linkVersion = '关联(版本)';
|
||||
$lang->testtask->lastRun = '最后执行';
|
||||
$lang->testtask->lastResult = '最终结果';
|
||||
|
||||
$lang->testtask->common = '测试任务';
|
||||
$lang->testtask->index = "测试任务首页";
|
||||
$lang->testtask->create = "创建测试任务";
|
||||
$lang->testtask->delete = "删除测试任务";
|
||||
@@ -50,6 +35,21 @@ $lang->testtask->results = "结果";
|
||||
$lang->testtask->createBug = "创建Bug";
|
||||
$lang->testtask->assign = '指派';
|
||||
|
||||
$lang->testtask->common = '测试任务';
|
||||
$lang->testtask->id = '任务编号';
|
||||
$lang->testtask->product = '所属产品';
|
||||
$lang->testtask->project = '所属项目';
|
||||
$lang->testtask->build = 'Build';
|
||||
$lang->testtask->name = '任务名称';
|
||||
$lang->testtask->begin = '开始日期';
|
||||
$lang->testtask->end = '结束日期';
|
||||
$lang->testtask->desc = '任务描述';
|
||||
$lang->testtask->status = '当前状态';
|
||||
$lang->testtask->assignedTo = '指派给';
|
||||
$lang->testtask->linkVersion = '关联(版本)';
|
||||
$lang->testtask->lastRun = '最后执行';
|
||||
$lang->testtask->lastResult = '最终结果';
|
||||
|
||||
$lang->testtask->statusList['wait'] = '未开始';
|
||||
$lang->testtask->statusList['doing'] = '进行中';
|
||||
$lang->testtask->statusList['done'] = '已完成';
|
||||
@@ -58,3 +58,4 @@ $lang->testtask->statusList['blocked'] = '被阻塞';
|
||||
$lang->testtask->unlinkedCases = '未关联用例列表';
|
||||
$lang->testtask->linkedCases = '已关联用例列表';
|
||||
$lang->testtask->confirmDelete = '您确认要删除该测试任务吗?';
|
||||
$lang->testtask->passAll = '全部通过';
|
||||
|
||||
@@ -119,12 +119,15 @@ class testtaskModel extends model
|
||||
{
|
||||
/* 计算case的结果。*/
|
||||
$caseResult = 'pass';
|
||||
foreach($this->post->steps as $stepID => $stepResult)
|
||||
if(!$this->post->passall)
|
||||
{
|
||||
if($stepResult != 'pass' and $stepResult != 'n/a')
|
||||
foreach($this->post->steps as $stepID => $stepResult)
|
||||
{
|
||||
$caseResult = $stepResult;
|
||||
break;
|
||||
if($stepResult != 'pass' and $stepResult != 'n/a')
|
||||
{
|
||||
$caseResult = $stepResult;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +145,7 @@ class testtaskModel extends model
|
||||
->add('caseResult', $caseResult)
|
||||
->setForce('stepResults', serialize($stepResults))
|
||||
->add('date', $now)
|
||||
->remove('steps')
|
||||
->remove('reals')
|
||||
->remove('steps,reals,passall')
|
||||
->get();
|
||||
$this->dao->insert(TABLE_TESTRESULT)->data($result)->autoCheck()->exec();
|
||||
if(!dao::isError())
|
||||
|
||||
@@ -29,17 +29,18 @@
|
||||
<caption>CASE#<?php echo $run->case->id. $lang->colon . $run->case->title;?></caption>
|
||||
<tr>
|
||||
<th class='w-30px'><?php echo $lang->testcase->stepID;?></th>
|
||||
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-p40'><?php echo $lang->testcase->stepDesc;?></th>
|
||||
<th class='w-p20'><?php echo $lang->testcase->stepExpect;?></th>
|
||||
<th class='w-100px'><?php echo $lang->testcase->result;?></th>
|
||||
<th><?php echo $lang->testcase->real;?></th>
|
||||
</tr>
|
||||
<?php foreach($run->case->steps as $key => $step):?>
|
||||
<?php $defaultResult = $step->expect ? 'pass' : 'n/a';?>
|
||||
<tr>
|
||||
<th><?php echo $key + 1;?></th>
|
||||
<td><?php echo nl2br($step->desc);?></td>
|
||||
<td><?php echo nl2br($step->expect);?></td>
|
||||
<td class='a-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, '');?></td>
|
||||
<td class='a-center'><?php echo html::select("steps[$step->id]", $lang->testcase->resultList, $defaultResult);?></td>
|
||||
<td><?php echo html::textarea("reals[$step->id]", '', "rows=3 class='area-1'");?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
@@ -47,8 +48,10 @@
|
||||
<td colspan='5'>
|
||||
<?php
|
||||
echo html::submitButton();
|
||||
echo html::submitButton($lang->testtask->passAll, "onclick=$('#passall').val(1)");
|
||||
echo html::hidden('case', $run->case->id);
|
||||
echo html::hidden('version', $run->case->version);
|
||||
echo html::hidden('passall', 0);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user