fix(测试计划): 修复计划中单条场景执行报告不显示问题
--bug=1009088 --user=赵勇 【测试跟踪】测试计划 - 接口测试用例 - 场景用例列表,单独执行场景,提示报告已删除 https://www.tapd.cn/55049933/s/1085127
This commit is contained in:
parent
867d6dbd9f
commit
f9c5f40bb0
|
@ -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);
|
||||||
|
|
|
@ -324,16 +324,21 @@ 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) {
|
||||||
if (data.content) {
|
this.report.status = data.status;
|
||||||
let report = JSON.parse(data.content);
|
if (!this.isNotRunning) {
|
||||||
this.content = report;
|
setTimeout(this.getReport, 2000)
|
||||||
this.fullTreeNodes = report.steps;
|
} else {
|
||||||
this.content.console = report.console;
|
if (data.content) {
|
||||||
this.content.error = report.error;
|
let report = JSON.parse(data.content);
|
||||||
this.content.success = (report.total - report.error);
|
this.content = report;
|
||||||
this.totalTime = report.totalTime;
|
this.fullTreeNodes = report.steps;
|
||||||
|
this.content.console = report.console;
|
||||||
|
this.content.error = report.error;
|
||||||
|
this.content.success = (report.total - report.error);
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue