add data of test
This commit is contained in:
54
test/data/casestep.yaml
Normal file
54
test/data/casestep.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
title: table zt_casestep
|
||||
desc: "用例步骤"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
note: "ID"
|
||||
range: "1-400"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: parent
|
||||
note: "上级ID"
|
||||
range: "0"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: case
|
||||
note: "所属用例ID"
|
||||
range: "1-400"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: version
|
||||
note: "用例版本"
|
||||
range: "1"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: type
|
||||
note: "用例类型"
|
||||
range: "step"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: desc
|
||||
note: "用例步骤"
|
||||
range: "1-10000"
|
||||
prefix: "用例步骤描述"
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: expect
|
||||
note: "预期"
|
||||
range: "1-10000"
|
||||
prefix: "这是用例预期结果"
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
97
test/data/testresult.yaml
Normal file
97
test/data/testresult.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
title: table zt_testresult
|
||||
desc: "测试结果"
|
||||
author: automated export
|
||||
version: "1.0"
|
||||
fields:
|
||||
- field: id
|
||||
note: "ID"
|
||||
range: 1-40
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: run
|
||||
note: "运行"
|
||||
range: 1-40
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: case
|
||||
note: "用例ID"
|
||||
range: 1-400
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: version
|
||||
note: "用例版本"
|
||||
range: 1
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: job
|
||||
note: "工作"
|
||||
range: 0
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: compile
|
||||
note: "编译"
|
||||
range: 0
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: caseResult
|
||||
note: "测试结果"
|
||||
range: pass,fail
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: stepResults
|
||||
note: "步骤结果"
|
||||
range: "php处理"
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: lastRunner
|
||||
note: "最后执行人"
|
||||
range: admin
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: date
|
||||
note: "测试时间"
|
||||
range: "(M)-(w):60"
|
||||
type: timestamp
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: "YYYY-MM-DD hh:mm:ss"
|
||||
- field: duration
|
||||
note: "持续时间"
|
||||
range: 0
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: xml
|
||||
note: "XMl格式"
|
||||
range: ""
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
- field: deploy
|
||||
note: "部署"
|
||||
range: 0
|
||||
prefix: ""
|
||||
postfix: ""
|
||||
loop: 0
|
||||
format: ""
|
||||
@@ -26,11 +26,13 @@ $builder->taskmodule = array('rows' => 1800, 'extends' => array('module','task
|
||||
$builder->taskestimate = array('rows' => 600, 'extends' => array('taskestimate'));
|
||||
$builder->taskson = array('rows' => 10, 'extends' => array('task', 'taskson'));
|
||||
$builder->case = array('rows' => 400, 'extends' => array('case'));
|
||||
$builder->casestep = array('rows' => 400, 'extends' => array('casestep'));
|
||||
$builder->bug = array('rows' => 300, 'extends' => array('bug'));
|
||||
$builder->morebug = array('rows' => 15, 'extends' => array('bug','morebug'));
|
||||
|
||||
$builder->testtask = array('rows' => 10, 'extends' => array('testtask'));
|
||||
$builder->testrun = array('rows' => 40, 'extends' => array('testrun'));
|
||||
$builder->testtask = array('rows' => 10, 'extends' => array('testtask'));
|
||||
$builder->testresult = array('rows' => 40, 'extends' => array('testresult'));
|
||||
$builder->testrun = array('rows' => 40, 'extends' => array('testrun'));
|
||||
|
||||
$builder->product = array('rows' => 100, 'extends' => array('product'));
|
||||
$builder->productline = array('rows' => 20, 'extends' => array('module', 'productline'));
|
||||
|
||||
@@ -47,6 +47,7 @@ class Processor
|
||||
$this->initUpdateKanban();
|
||||
$this->initStory();
|
||||
$this->initBug();
|
||||
$this->initTest();
|
||||
|
||||
$this->dao->commit();
|
||||
}
|
||||
@@ -157,11 +158,34 @@ class Processor
|
||||
$this->dao->update(TABLE_STORY)->set('`status`')->eq('active')->where('id')->le('20')->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
* Init Test.
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function initBug()
|
||||
{
|
||||
$this->dao->update(TABLE_BUG)->set('`issueKey`')->eq('2:AX-W7K3_L7H_36P3H4le')->where('issueKey')->eq('17')->exec();
|
||||
}
|
||||
|
||||
private function initTest()
|
||||
{
|
||||
$testResults = $this->dao->select('*')->from(TABLE_TESTRESULT)->fetchAll();
|
||||
|
||||
foreach($testResults as $testResult)
|
||||
{
|
||||
if($testResult->caseResult == 'fail')
|
||||
{
|
||||
$this->dao->update(TABLE_TESTRESULT)->set('`stepResults`')->eq('a:1:{i:'.$testResult->run.';a:2:{s:6:\"result\";s:4:\"fail\";s:4:\"real\";s:0:\"\";}}')->where('id')->eq($testResult->id)->exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->dao->update(TABLE_TESTRESULT)->set('`stepResults`')->eq('a:1:{i:'.$testResult->run.';a:2:{s:6:\"result\";s:4:\"pass\";s:4:\"real\";s:0:\"\";}}')->where('id')->eq($testResult->id)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Init product plan.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user