fix(测试跟踪): 修复测试计划报告中失败状态的性能用例数据再失败用例页签不显示的问题

--bug=1010003 --user=宋天阳 【测试跟踪】测试计划报告里,性能测试,失败的用例不显示
https://www.tapd.cn/55049933/s/1098689
This commit is contained in:
song-tianyang 2022-01-26 11:37:09 +08:00 committed by 刘瑞斌
parent eb397506fd
commit a4a0c0a3d0
3 changed files with 18 additions and 11 deletions

View File

@ -1625,7 +1625,7 @@ public class TestPlanService {
if (!CollectionUtils.isEmpty(allCases)) {
failureCases = allCases.stream()
.filter(i -> StringUtils.isNotBlank(i.getStatus())
&& i.getStatus().equals("error"))
&& StringUtils.equalsAnyIgnoreCase(i.getStatus(), "error"))
.collect(Collectors.toList());
}
report.setLoadFailureCases(failureCases);

View File

@ -8,14 +8,14 @@
<template v-slot:label>
<tab-pane-count :title="$t('test_track.report.fail_case')" :count="failureSize"/>
</template>
<load-failure-result class="container" :share-id="shareId" :is-share="isShare" :is-template="isTemplate"
:report="report" :plan-id="planId" @setSize="setFailureSize"/>
<load-all-result :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :is-all="false"
:report="report" :plan-id="planId" @setSize="setFailureSize"/>
</el-tab-pane>
<el-tab-pane name="third" v-if="allEnable" style="min-height: 550px">
<template v-slot:label>
<tab-pane-count :title="$t('test_track.report.all_case')" :count="allSize"/>
</template>
<load-all-result :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate"
<load-all-result :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :is-all="true"
:report="report" :plan-id="planId" @setSize="setAllSize"/>
</el-tab-pane>
</el-tabs>

View File

@ -1,12 +1,13 @@
<template>
<el-container>
<ms-aside-container width="500px" :default-hidden-bottom-top="200" :enable-auto-height="true">
<load-failure-result :class="{'init-height': !showResponse}" :is-db="isDb" @rowClick="getReport" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate"
:report="report" :plan-id="planId" @setSize="setAllSize"/>
<load-failure-result :class="{'init-height': !showResponse}" :is-db="isDb" @rowClick="getReport" :is-all="isAll"
:share-id="shareId" :is-share="isShare" :is-template="isTemplate"
:report="report" :plan-id="planId" @setSize="setAllSize"/>
</ms-aside-container>
<ms-main-container>
<load-case-report-view :is-plan-report="true" :share-id="shareId" :is-share="isShare" v-show="showResponse"
:plan-report-template="response" :report-id="reportId" ref="loadCaseReportView"/>
<load-case-report-view :is-plan-report="true" :share-id="shareId" :is-share="isShare" v-show="showResponse"
:plan-report-template="response" :report-id="reportId" ref="loadCaseReportView"/>
<div class="empty" v-show="!showResponse">{{ $t('test_track.plan.load_case.content_empty') }}</div>
</ms-main-container>
</el-container>
@ -23,23 +24,29 @@ import LoadCaseReport from "@/business/components/track/plan/view/comonents/load
import LoadCaseReportView from "@/business/components/track/plan/view/comonents/load/LoadCaseReportView";
import MsAsideContainer from "@/business/components/common/components/MsAsideContainer";
import MsMainContainer from "@/business/components/common/components/MsMainContainer";
export default {
name: "LoadAllResult",
components: {
MsMainContainer,
MsAsideContainer,
LoadCaseReportView, LoadCaseReport, LoadFailureResult, StatusTableItem, MethodTableItem, TypeTableItem},
LoadCaseReportView, LoadCaseReport, LoadFailureResult, StatusTableItem, MethodTableItem, TypeTableItem
},
props: {
planId: String,
report: Object,
isTemplate: Boolean,
isShare: Boolean,
shareId: String,
isDb: Boolean
isDb: Boolean,
isAll: {
type: Boolean,
default: false
}
},
data() {
return {
failureTestCases: [],
failureTestCases: [],
showResponse: false,
reportId: "",
response: null