修改缺陷字段名称
This commit is contained in:
parent
676502bbf7
commit
be6d48f497
|
@ -11,7 +11,7 @@ import lombok.ToString;
|
|||
public class TestPlanTestCaseWithBLOBs extends TestPlanTestCase implements Serializable {
|
||||
private String results;
|
||||
|
||||
private String flaw;
|
||||
private String issues;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
<result column="results" jdbcType="LONGVARCHAR" property="results" />
|
||||
<result column="flaw" jdbcType="LONGVARCHAR" property="flaw" />
|
||||
<result column="issues" jdbcType="LONGVARCHAR" property="issues" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -77,7 +77,7 @@
|
|||
id, plan_id, case_id, executor, status, remark, create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
results, flaw
|
||||
results, issues
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanTestCaseExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
|
@ -131,11 +131,11 @@
|
|||
insert into test_plan_test_case (id, plan_id, case_id,
|
||||
executor, status, remark,
|
||||
create_time, update_time, results,
|
||||
flaw)
|
||||
issues)
|
||||
values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR},
|
||||
#{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{results,jdbcType=LONGVARCHAR},
|
||||
#{flaw,jdbcType=LONGVARCHAR})
|
||||
#{issues,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanTestCaseWithBLOBs">
|
||||
insert into test_plan_test_case
|
||||
|
@ -167,8 +167,8 @@
|
|||
<if test="results != null">
|
||||
results,
|
||||
</if>
|
||||
<if test="flaw != null">
|
||||
flaw,
|
||||
<if test="issues != null">
|
||||
issues,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
@ -199,8 +199,8 @@
|
|||
<if test="results != null">
|
||||
#{results,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="flaw != null">
|
||||
#{flaw,jdbcType=LONGVARCHAR},
|
||||
<if test="issues != null">
|
||||
#{issues,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
@ -240,8 +240,8 @@
|
|||
<if test="record.results != null">
|
||||
results = #{record.results,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.flaw != null">
|
||||
flaw = #{record.flaw,jdbcType=LONGVARCHAR},
|
||||
<if test="record.issues != null">
|
||||
issues = #{record.issues,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
|
@ -259,7 +259,7 @@
|
|||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
results = #{record.results,jdbcType=LONGVARCHAR},
|
||||
flaw = #{record.flaw,jdbcType=LONGVARCHAR}
|
||||
issues = #{record.issues,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -305,8 +305,8 @@
|
|||
<if test="results != null">
|
||||
results = #{results,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="flaw != null">
|
||||
flaw = #{flaw,jdbcType=LONGVARCHAR},
|
||||
<if test="issues != null">
|
||||
issues = #{issues,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
|
@ -321,7 +321,7 @@
|
|||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
results = #{results,jdbcType=LONGVARCHAR},
|
||||
flaw = #{flaw,jdbcType=LONGVARCHAR}
|
||||
issues = #{issues,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanTestCase">
|
||||
|
|
|
@ -11,5 +11,5 @@ public class TestCaseReportModuleResultDTO {
|
|||
private Integer caseCount;
|
||||
private Integer passCount;
|
||||
private Double passRate;
|
||||
private Integer flawCount;
|
||||
private Integer issuesCount;
|
||||
}
|
||||
|
|
|
@ -14,5 +14,5 @@ public class TestPlanCaseDTO extends TestCaseWithBLOBs {
|
|||
private String planId;
|
||||
private String planName;
|
||||
private String caseId;
|
||||
private String flaw;
|
||||
private String issues;
|
||||
}
|
||||
|
|
|
@ -297,16 +297,16 @@ public class TestPlanService {
|
|||
moduleResult = new TestCaseReportModuleResultDTO();
|
||||
moduleResult.setCaseCount(0);
|
||||
moduleResult.setPassCount(0);
|
||||
moduleResult.setFlawCount(0);
|
||||
moduleResult.setIssuesCount(0);
|
||||
moduleResult.setModuleId(rootNodeId);
|
||||
}
|
||||
moduleResult.setCaseCount(moduleResult.getCaseCount() + 1);
|
||||
if (StringUtils.equals(testCase.getStatus(), TestPlanTestCaseStatus.Pass.name())) {
|
||||
moduleResult.setPassCount(moduleResult.getPassCount() + 1);
|
||||
}
|
||||
if (StringUtils.isNotBlank(testCase.getFlaw())) {
|
||||
if (JSON.parseObject(testCase.getFlaw()).getBoolean("hasFlaw")) {
|
||||
moduleResult.setFlawCount(moduleResult.getFlawCount() + 1);
|
||||
if (StringUtils.isNotBlank(testCase.getIssues())) {
|
||||
if (JSON.parseObject(testCase.getIssues()).getBoolean("hasIssues")) {
|
||||
moduleResult.setIssuesCount(moduleResult.getIssuesCount() + 1);
|
||||
};
|
||||
}
|
||||
moduleResultMap.put(rootNodeId, moduleResult);
|
||||
|
|
|
@ -317,7 +317,7 @@ CREATE TABLE IF NOT EXISTS `test_plan_test_case` (
|
|||
`executor` varchar(64) NOT NULL COMMENT 'Test case executor',
|
||||
`status` varchar(15) NULL COMMENT 'Test case status',
|
||||
`results` longtext COMMENT 'Test case result',
|
||||
`flaw` longtext COMMENT 'Test case result flaw',
|
||||
`issues` longtext COMMENT 'Test case result issues',
|
||||
`remark` varchar(255) DEFAULT NULL COMMENT 'Test case remark',
|
||||
`create_time` bigint(13) NOT NULL COMMENT 'Create timestamp',
|
||||
`update_time` bigint(13) NOT NULL COMMENT 'Update timestamp',
|
||||
|
|
|
@ -137,19 +137,19 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="testCase.flaw">
|
||||
<el-row v-if="testCase.issues">
|
||||
<el-col :span="5" :offset="1">
|
||||
<el-switch
|
||||
v-model="testCase.flaw.hasFlaw"
|
||||
@change="flawChange"
|
||||
:active-text="$t('test_track.plan_view.submit_flaw')">
|
||||
v-model="testCase.issues.hasIssues"
|
||||
@change="issuesChange"
|
||||
:active-text="$t('test_track.plan_view.submit_issues')">
|
||||
</el-switch>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="testCase.flaw && testCase.flaw.hasFlaw">
|
||||
<el-row v-if="testCase.issues && testCase.issues.hasIssues">
|
||||
<el-col :span="20" :offset="1" class="step-edit">
|
||||
<ckeditor :editor="editor" v-model="testCase.flaw.content"/>
|
||||
<ckeditor :editor="editor" v-model="testCase.issues.content"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
@ -229,7 +229,7 @@
|
|||
param.results.push(result);
|
||||
});
|
||||
param.results = JSON.stringify(param.results);
|
||||
param.flaw = JSON.stringify(this.testCase.flaw);
|
||||
param.issues = JSON.stringify(this.testCase.issues);
|
||||
this.$post('/test/plan/case/edit', param, () => {
|
||||
if (isContinuous) {
|
||||
this.updateTestCases(param);
|
||||
|
@ -256,11 +256,11 @@
|
|||
Object.assign(item, testCase);
|
||||
item.results = JSON.parse(item.results);
|
||||
item.steps = JSON.parse(item.steps);
|
||||
if (item.flaw) {
|
||||
item.flaw = JSON.parse(item.flaw);
|
||||
if (item.issues) {
|
||||
item.issues = JSON.parse(item.issues);
|
||||
} else {
|
||||
item.flaw = {};
|
||||
item.flaw.hasFlaw = false;
|
||||
item.issues = {};
|
||||
item.issues.hasIssues = false;
|
||||
}
|
||||
item.steptResults = [];
|
||||
for (let i = 0; i < item.steps.length; i++){
|
||||
|
@ -294,8 +294,8 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
flawChange() {
|
||||
if (this.testCase.flaw.hasFlaw) {
|
||||
issuesChange() {
|
||||
if (this.testCase.issues.hasIssues) {
|
||||
let desc = this.addPLabel('[' + this.$t('test_track.plan_view.operate_step') + ']');
|
||||
let result = this.addPLabel('[' + this.$t('test_track.case.expected_results') + ']');
|
||||
let executeResult = this.addPLabel('[' + this.$t('test_track.plan_view.actual_result') + ']');
|
||||
|
@ -305,7 +305,7 @@
|
|||
result += this.addPLabel(stepPrefix + (step.result == undefined ? '' : step.result));
|
||||
executeResult += this.addPLabel(stepPrefix + (step.executeResult == undefined ? '' : step.executeResult));
|
||||
});
|
||||
this.testCase.flaw.content = desc + this.addPLabel('') + result + this.addPLabel('') + executeResult + this.addPLabel('');
|
||||
this.testCase.issues.content = desc + this.addPLabel('') + result + this.addPLabel('') + executeResult + this.addPLabel('');
|
||||
}
|
||||
},
|
||||
addPLabel(str) {
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="flawCount"
|
||||
:label="$t('test_track.plan_view.flaw_count')">
|
||||
prop="issuesCount"
|
||||
:label="$t('test_track.plan_view.issues_count')">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
|
@ -48,19 +48,19 @@
|
|||
moduleName: this.$t('test_track.module.module') + '1',
|
||||
caseCount: '14',
|
||||
passRate: 10.8,
|
||||
flawCount: 3
|
||||
issuesCount: 3
|
||||
},
|
||||
{
|
||||
moduleName: this.$t('test_track.module.module') + '2',
|
||||
caseCount: '24',
|
||||
passRate: 40,
|
||||
flawCount: 6
|
||||
issuesCount: 6
|
||||
},
|
||||
{
|
||||
moduleName: this.$t('test_track.module.module') + '3',
|
||||
caseCount: '50',
|
||||
passRate: 76.9,
|
||||
flawCount: 8
|
||||
issuesCount: 8
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ export default {
|
|||
select_manipulate: "Select the data you want to manipulate",
|
||||
select_template: "Select template",
|
||||
step: "Step",
|
||||
submit_flaw: "Commit flaw",
|
||||
submit_issues: "Commit issues",
|
||||
operate_step: "Operate step",
|
||||
edit_component: "Edit component",
|
||||
base_info: "Base info",
|
||||
|
@ -433,7 +433,7 @@ export default {
|
|||
delete_component_tip: "Please reserve at least one component",
|
||||
input_template_name: "Input template name",
|
||||
case_count: "Case count",
|
||||
flaw_count: "Flaw count",
|
||||
issues_count: "Issues count",
|
||||
result_statistics: "Result statistics",
|
||||
result_statistics_chart: "Result statistics chart",
|
||||
create_template: "Create template",
|
||||
|
|
|
@ -419,7 +419,7 @@ export default {
|
|||
select_manipulate: "请选择需要操作的数据",
|
||||
select_template: "选择模版",
|
||||
step: "步骤",
|
||||
submit_flaw: "提缺陷",
|
||||
submit_issues: "提缺陷",
|
||||
operate_step: "操作步骤",
|
||||
edit_component: "编辑组件",
|
||||
base_info: "基础信息",
|
||||
|
@ -433,7 +433,7 @@ export default {
|
|||
delete_component_tip: "请至少保留一个组件",
|
||||
input_template_name: "输入模版名称",
|
||||
case_count: "用例数",
|
||||
flaw_count: "缺陷数",
|
||||
issues_count: "缺陷数",
|
||||
result_statistics: "测试结果统计",
|
||||
result_statistics_chart: "测试结果统计图",
|
||||
create_template: "新建模版",
|
||||
|
|
|
@ -419,7 +419,7 @@ export default {
|
|||
select_manipulate: "請選擇需要操作的數據",
|
||||
select_template: "選擇模版",
|
||||
step: "步驟",
|
||||
submit_flaw: "提缺陷",
|
||||
submit_issues: "提缺陷",
|
||||
operate_step: "操作步驟",
|
||||
edit_component: "編輯組件",
|
||||
base_info: "基礎信息",
|
||||
|
@ -433,7 +433,7 @@ export default {
|
|||
delete_component_tip: "請至少保留壹個組件",
|
||||
input_template_name: "輸入模版名稱",
|
||||
case_count: "用例數",
|
||||
flaw_count: "缺陷數",
|
||||
issues_count: "缺陷數",
|
||||
result_statistics: "測試結果統計",
|
||||
result_statistics_chart: "測試結果統計圖",
|
||||
create_template: "新建模版",
|
||||
|
|
Loading…
Reference in New Issue