This commit is contained in:
wangchunsheng
2010-02-10 07:31:12 +00:00
parent 589745c555
commit 190467f2e9
3 changed files with 30 additions and 24 deletions
+8 -6
View File
@@ -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())