fix(测试计划): 修复计划中单条场景执行报告不显示问题

--bug=1009088 --user=赵勇 【测试跟踪】测试计划 - 接口测试用例 - 场景用例列表,单独执行场景,提示报告已删除 https://www.tapd.cn/55049933/s/1085127
This commit is contained in:
fit2-zhao 2021-12-22 16:51:56 +08:00 committed by fit2-zhao
parent 867d6dbd9f
commit f9c5f40bb0
3 changed files with 20 additions and 11 deletions

View File

@ -139,8 +139,8 @@ public class JMeterService {
JvmInfoDTO jvmInfoDTO = resources.get(index); JvmInfoDTO jvmInfoDTO = resources.get(index);
TestResourceDTO testResource = jvmInfoDTO.getTestResource(); TestResourceDTO testResource = jvmInfoDTO.getTestResource();
String configuration = testResource.getConfiguration(); String configuration = testResource.getConfiguration();
request.setCorePoolSize(MessageCache.corePoolSize);
NodeDTO node = JSON.parseObject(configuration, NodeDTO.class); NodeDTO node = JSON.parseObject(configuration, NodeDTO.class);
request.setCorePoolSize(node.getMaxConcurrency());
String nodeIp = node.getIp(); String nodeIp = node.getIp();
Integer port = node.getPort(); Integer port = node.getPort();
String uri = String.format(BASE_URL + "/jmeter/api/start", nodeIp, port); String uri = String.format(BASE_URL + "/jmeter/api/start", nodeIp, port);

View File

@ -324,6 +324,10 @@ export default {
if (data) { if (data) {
this.report = data; this.report = data;
if (this.report.reportVersion && this.report.reportVersion > 1) { if (this.report.reportVersion && this.report.reportVersion > 1) {
this.report.status = data.status;
if (!this.isNotRunning) {
setTimeout(this.getReport, 2000)
} else {
if (data.content) { if (data.content) {
let report = JSON.parse(data.content); let report = JSON.parse(data.content);
this.content = report; this.content = report;
@ -334,6 +338,7 @@ export default {
this.totalTime = report.totalTime; this.totalTime = report.totalTime;
} }
this.loading = false; this.loading = false;
}
} else { } else {
this.buildReport(); this.buildReport();
} }
@ -528,10 +533,12 @@ export default {
.report-container .is-active .fail { .report-container .is-active .fail {
color: inherit; color: inherit;
} }
.report-console { .report-console {
height: calc(100vh - 270px); height: calc(100vh - 270px);
overflow-y: auto; overflow-y: auto;
} }
.export-button { .export-button {
float: right; float: right;
} }

View File

@ -450,7 +450,9 @@ export default {
if (this.planId) { if (this.planId) {
this.$post("/test/plan/scenario/case/run", param, response => { this.$post("/test/plan/scenario/case/run", param, response => {
this.runVisible = true; this.runVisible = true;
this.reportId = response.data; if (response.data && response.data.length > 0) {
this.reportId = response.data[0].reportId;
}
}); });
} }
if (this.reviewId) { if (this.reviewId) {