From ec71c80e8a7a699e79c40ef84e6c79aa961ac7f6 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Fri, 20 Oct 2023 18:19:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9D=9E200=E7=9A=842xx=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E8=A2=AB=E5=88=A4=E6=96=AD=E4=B8=BA=E9=94=99=E8=AF=AF=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1032253 --user=宋天阳 【性能测试】报告-错误记录-所有记录-返回20X状态码显示为200 https://www.tapd.cn/55049933/s/1429223 --- .../business/report/components/samples/ErrorSamplesTable.vue | 5 ++++- .../src/business/report/components/samples/SamplesTabs.vue | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue b/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue index 9dc614f3b2..a2a11831ba 100644 --- a/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue +++ b/performance-test/frontend/src/business/report/components/samples/ErrorSamplesTable.vue @@ -39,7 +39,7 @@ label="Response Code" min-width="180"> @@ -79,6 +79,9 @@ export default { this.initTableData(); }, methods: { + isSuccessRspCode(code) { + return !(Number.isNaN(Number(code)) || 300 <= Number(code) || Number(code) < 200); + }, initTableData() { if (this.errorSamples && this.errorSamples.sampleCount) { let allSampleCount = 0; diff --git a/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue b/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue index b804d9dfa0..8b62ce0dbf 100644 --- a/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue +++ b/performance-test/frontend/src/business/report/components/samples/SamplesTabs.vue @@ -46,7 +46,8 @@ export default { for (let sampleName in this.samples.sampleCount) { let sampleCountObj = this.samples.sampleCount[sampleName]; for (let code in sampleCountObj) { - if (code !== '200') { + + if (Number.isNaN(Number(code)) || 300 <= Number(code) || Number(code) < 200) { if (!this.errorSamples.sampleCount[sampleName]) { this.errorSamples.sampleCount[sampleName] = {}; this.errorSamples.samples[sampleName] = {};