diff --git a/module/ci/control.php b/module/ci/control.php index bdd993a56d..d80bdd154c 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -112,8 +112,6 @@ class ci extends control { $this->loadModel('compile')->checkStatus($compile); } - - $this->dao->update(TABLE_COMPILE)->set('testtask')->eq($taskID)->where('id')->eq($compile->id)->exec(); } if(!empty($taskID)) @@ -148,6 +146,7 @@ class ci extends control $this->loadModel('action')->create('testtask', $taskID, 'opened'); } + if($compileID) $this->dao->update(TABLE_COMPILE)->set('testtask')->eq($taskID)->where('id')->eq($compileID)->exec(); if($testType == 'unit') { $data = $this->testtask->buildDataFromUnit($post->UnitCaseResults, $frame, $productID, $jobID, $compileID); diff --git a/module/compile/model.php b/module/compile/model.php index cf55ffaaf1..e79006cf98 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -118,7 +118,7 @@ class compileModel extends model $tagData = new stdclass(); $tagData->PARAM_TAG = $compile->tag; - $tagData->PARAM_ZENTAODATA = "compile={$compile->id}"; + $tagData->ZENTAO_DATA = "compile={$compile->id}"; $buildUrl = $this->getBuildUrl($job); $build = new stdclass(); diff --git a/module/job/model.php b/module/job/model.php index 8c4c41b114..4a46f7af38 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -271,7 +271,7 @@ class jobModel extends model $this->dao->insert(TABLE_COMPILE)->data($build)->exec(); $compileID = $this->dao->lastInsertId(); - $data->PARAM_ZENTAODATA = "compile={$compileID}"; + $data->ZENTAO_DATA = "compile={$compileID}"; $compile = new stdclass(); $compile->queue = $this->loadModel('ci')->sendRequest($buildUrl, $data); $compile->status = $compile->queue ? 'created' : 'create_fail'; diff --git a/module/testcase/control.php b/module/testcase/control.php index 4ff0d1634d..168ba40afe 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -486,6 +486,13 @@ class testcase extends control { $case = $this->testcase->getById($caseID, $version); if(!$case) die(js::error($this->lang->notFound) . js::locate('back')); + if($case->auto != 'no') + { + $this->lang->testcase->subMenu->testcase->feature['alias'] = ''; + $this->lang->testcase->subMenu->testcase->unit['alias'] = 'view'; + $this->lang->testcase->subMenu->testcase->unit['subModule'] = 'testcase'; + } + if($from == 'testtask') { $run = $this->loadModel('testtask')->getRunByCase($taskID, $caseID); @@ -495,6 +502,11 @@ class testcase extends control $case->lastRunResult = $run->lastRunResult; $case->caseStatus = $case->status; $case->status = $run->status; + + $results = $this->testtask->getResults($run->id); + $result = array_shift($results); + $case->xml = $result->xml; + $case->duration = $result->duration; } $branches = $this->session->currentProductType == 'normal' ? array() : $this->loadModel('branch')->getPairs($case->product); diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index b9ad9d192e..7d5aa10571 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -54,6 +54,7 @@ $lang->testcase->assignedTo = '指派给'; $lang->testcase->colorTag = '颜色标签'; $lang->testcase->lastRunResult = '结果'; $lang->testcase->desc = '步骤'; +$lang->testcase->xml = 'XML'; $lang->testcase->expect = '预期'; $lang->testcase->allProduct = "所有{$lang->productCommon}"; $lang->testcase->fromBug = '来源Bug'; diff --git a/module/testcase/view/view.html.php b/module/testcase/view/view.html.php index db5e0f306b..e7f0d04e42 100644 --- a/module/testcase/view/view.html.php +++ b/module/testcase/view/view.html.php @@ -55,10 +55,12 @@