fix(接口测试): 修复大场景实时生成报告数据不显示问题
--bug=1019898 --user=赵勇 【接口测试】禁用本地执行,使用k8s资源池执行接口后,场景中调试/生成报告场景失败 https://www.tapd.cn/55049933/s/1304454
This commit is contained in:
parent
aac754d1c3
commit
492dc0acf5
|
@ -347,24 +347,28 @@ export default {
|
|||
getScenarioReport(this.reportId).then((response) => {
|
||||
this.report = response.data || {};
|
||||
if (response.data) {
|
||||
this.content = JSON.parse(response.data.content);
|
||||
if (!this.content) {
|
||||
this.content = { scenarios: [] };
|
||||
}
|
||||
if (this.content.projectEnvMap) {
|
||||
this.projectEnvMap = this.content.projectEnvMap;
|
||||
}
|
||||
this.content.error = this.content ? this.content.error : '';
|
||||
if (response.data.status === 'RUNNING') {
|
||||
setTimeout(this.getReport, 2000);
|
||||
} else {
|
||||
this.content = JSON.parse(response.data.content);
|
||||
if (!this.content) {
|
||||
this.content = { scenarios: [] };
|
||||
}
|
||||
if (this.content.projectEnvMap) {
|
||||
this.projectEnvMap = this.content.projectEnvMap;
|
||||
}
|
||||
this.content.error = this.content ? this.content.error : '';
|
||||
|
||||
this.content.success =
|
||||
this.content.total - this.content.error - this.content.errorCode - this.content.unExecute;
|
||||
this.totalTime = this.content.totalTime;
|
||||
this.fullTreeNodes = this.content.steps;
|
||||
this.recursiveSorting(this.fullTreeNodes);
|
||||
this.reload();
|
||||
}
|
||||
if ('Running' !== this.report.status) {
|
||||
this.$emit('finish');
|
||||
this.content.success =
|
||||
this.content.total - this.content.error - this.content.errorCode - this.content.unExecute;
|
||||
this.totalTime = this.content.totalTime;
|
||||
this.fullTreeNodes = this.content.steps;
|
||||
this.recursiveSorting(this.fullTreeNodes);
|
||||
this.reload();
|
||||
}
|
||||
if ('Running' !== this.report.status) {
|
||||
this.$emit('finish');
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue