diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java index 7bffbc80d1..fdcd73acff 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/MsScenario.java @@ -110,7 +110,9 @@ public class MsScenario extends MsTestElement { } if (config != null && StringUtils.equals(this.getId(), config.getScenarioId())) { config.setTransferVariables(this.variables); - ElementUtil.setHeader(scenarioTree, this.headers, this.getName()); + if (CollectionUtils.isNotEmpty(this.headers)) { + ElementUtil.setHeader(scenarioTree, this.headers, this.getName()); + } } if (config != null && !config.getExcludeScenarioIds().contains(this.getId())) { scenarioTree = MsCriticalSectionController.createHashTree(tree, this.getName(), this.isEnable()); diff --git a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue index 4eae2dbf7b..d1e1dada80 100644 --- a/api-test/frontend/src/business/automation/report/ApiReportDetail.vue +++ b/api-test/frontend/src/business/automation/report/ApiReportDetail.vue @@ -703,6 +703,9 @@ export default { } } } + if(this.content.scenarios && this.content.scenarios[0].requestResults){ + this.content.scenarios[0].requestResults.push({responseResult: {}}); + } this.reportExportVisible = true; let reset = this.exportReportReset; let name = this.report.name; diff --git a/api-test/frontend/src/business/automation/report/ApiReportExport.vue b/api-test/frontend/src/business/automation/report/ApiReportExport.vue index e3dda689e7..4c1b2b2812 100644 --- a/api-test/frontend/src/business/automation/report/ApiReportExport.vue +++ b/api-test/frontend/src/business/automation/report/ApiReportExport.vue @@ -9,62 +9,64 @@
- +
-
-
- {{ getName(request.name) }} +
+
+
+ {{ getName(request.name) }} +
+
+ {{ request.url }} +
-
- {{ request.url }} + +
+ + {{ request.method }} + + + + {{ request.responseResult.responseTime }} ms + + + + {{ request.responseResult.latency }} ms + + + + {{ request.requestSize }} bytes + + + + {{ request.responseResult.responseSize }} bytes + + + + {{ request.error }} + + + + {{ request.passAssertions + ' / ' + request.totalAssertions }} + + + + {{ request.responseResult.responseCode }} + + + + Pending + Pending + FakeError + Success + Error +
- -
- - {{ request.method }} - - - - {{ request.responseResult.responseTime }} ms - - - - {{ request.responseResult.latency }} ms - - - - {{ request.requestSize }} bytes - - - - {{ request.responseResult.responseSize }} bytes - - - - {{ request.error }} - - - - {{ request.passAssertions + ' / ' + request.totalAssertions }} - - - - {{ request.responseResult.responseCode }} - - - - Pending - Pending - FakeError - Success - Error - -
@@ -162,6 +164,7 @@ export default { :deep(.report-left) { float: none; } + :deep(.metric-box-total) { min-width: 100px; } diff --git a/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue b/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue index dbdc11e582..e66b939a22 100644 --- a/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue +++ b/framework/sdk-parent/frontend/src/components/task/TaskCenter.vue @@ -278,7 +278,9 @@ export default { onClose(e) { }, listenScreenChange() { - this.size = document.body.clientWidth; + if(this.size != 600) { + this.size = document.body.clientWidth; + } }, showTaskCenter() { this.getTaskRunning();