fix(接口测试): 修复并行控制器下无步骤时,报告显示错误的缺陷

--bug=1028109 --user=王孝刚 【接口测试】场景-并行控制器下无步骤-生成报告-步骤显示、状态问题
https://www.tapd.cn/55049933/s/1397088
This commit is contained in:
wxg0103 2023-07-25 15:31:54 +08:00 committed by 刘瑞斌
parent 2877049e62
commit 52ed72a69a
4 changed files with 11 additions and 6 deletions

View File

@ -663,6 +663,9 @@ public class ApiScenarioReportStructureService {
allUnExecute.set(allUnExecute.longValue() + 1); allUnExecute.set(allUnExecute.longValue() + 1);
} }
} }
if (step.getValue() == null && StringUtils.equals(step.getType(), "GenericController") && StringUtils.equalsIgnoreCase(step.getTotalStatus(), ApiReportStatus.PENDING.name())) {
allUnExecute.set(allUnExecute.longValue() + 1);
}
if (CollectionUtils.isNotEmpty(step.getChildren())) { if (CollectionUtils.isNotEmpty(step.getChildren())) {
this.countAllUnexpected(step.getChildren(), allUnExecute); this.countAllUnexpected(step.getChildren(), allUnExecute);
} }

View File

@ -244,9 +244,9 @@ export default {
filterNodes(node, status) { filterNodes(node, status) {
if (status === 'ERROR' || status === 'FAKE_ERROR' || status === 'UN_EXECUTE') { if (status === 'ERROR' || status === 'FAKE_ERROR' || status === 'UN_EXECUTE') {
let data = { ...node }; let data = { ...node };
if (!data.value && (!data.children || data.children.length === 0)) { /*if (!data.value && (!data.children || data.children.length === 0)) {
return null; return null;
} }*/
if (data.children.length > 0) { if (data.children.length > 0) {
let filteredChildren = []; let filteredChildren = [];
for (let i = 0; i < data.children.length; i++) { for (let i = 0; i < data.children.length; i++) {
@ -271,6 +271,9 @@ export default {
if (data.type === 'IfController' && data.totalStatus === 'PENDING') { if (data.type === 'IfController' && data.totalStatus === 'PENDING') {
return data; return data;
} }
if (data.type === 'GenericController' && data.totalStatus === 'PENDING') {
return data;
}
} else if (status === 'ERROR') { } else if (status === 'ERROR') {
if (data.totalStatus !== 'FAKE_ERROR' && data.value && data.value.error > 0) { if (data.totalStatus !== 'FAKE_ERROR' && data.value && data.value.error > 0) {
return data; return data;

View File

@ -164,9 +164,9 @@ export default {
request: { request: {
deep: true, deep: true,
handler(n) { handler(n) {
if (this.request.errorCode) { if (this.request && this.request.errorCode) {
this.baseErrorCode = this.request.errorCode; this.baseErrorCode = this.request.errorCode;
} else if (this.request.attachInfoMap && this.request.attachInfoMap.FAKE_ERROR) { } else if (this.request && this.request.attachInfoMap && this.request.attachInfoMap.FAKE_ERROR) {
if (this.request.attachInfoMap.FAKE_ERROR !== '') { if (this.request.attachInfoMap.FAKE_ERROR !== '') {
this.baseErrorCode = this.request.attachInfoMap.FAKE_ERROR; this.baseErrorCode = this.request.attachInfoMap.FAKE_ERROR;
} }
@ -207,7 +207,7 @@ export default {
element.parentNode.removeChild(element); element.parentNode.removeChild(element);
}, },
loadRequestInfoExpand() { loadRequestInfoExpand() {
if ( if ( this.request &&
!this.request.responseResult || !this.request.responseResult ||
this.request.responseResult.body === null || this.request.responseResult.body === null ||
this.request.responseResult.body === undefined this.request.responseResult.body === undefined

View File

@ -55,7 +55,6 @@ export function STEP() {
[ [
'AllSamplerProxy', 'AllSamplerProxy',
[ [
'GenericController',
'HTTPSamplerProxy', 'HTTPSamplerProxy',
'DubboSampler', 'DubboSampler',
'JDBCSampler', 'JDBCSampler',