fix(接口测试): 场景报告未执行请求统计有误
--bug=1039797 --user=陈建星 【接口测试】场景-条件控制器中添加中存在自定义请求若条件失败自定义请求不执行单请求分析中不统计这个未执行 https://www.tapd.cn/55049933/s/1504191
This commit is contained in:
parent
2865447903
commit
de8c3ca502
|
@ -10,37 +10,52 @@ public enum ApiScenarioStepType {
|
|||
/**
|
||||
* 接口定义
|
||||
*/
|
||||
API,
|
||||
API(StepTypeGroup.REQUEST),
|
||||
/**
|
||||
* 接口用例
|
||||
*/
|
||||
API_CASE,
|
||||
API_CASE(StepTypeGroup.REQUEST),
|
||||
/**
|
||||
* 自定义请求
|
||||
*/
|
||||
CUSTOM_REQUEST,
|
||||
CUSTOM_REQUEST(StepTypeGroup.REQUEST),
|
||||
/**
|
||||
* 场景
|
||||
*/
|
||||
API_SCENARIO,
|
||||
API_SCENARIO(StepTypeGroup.SCENARIO),
|
||||
/**
|
||||
* 循环控制器
|
||||
*/
|
||||
LOOP_CONTROLLER,
|
||||
LOOP_CONTROLLER(StepTypeGroup.CONTROLLER),
|
||||
/**
|
||||
* 条件控制器
|
||||
*/
|
||||
IF_CONTROLLER,
|
||||
IF_CONTROLLER(StepTypeGroup.CONTROLLER),
|
||||
/**
|
||||
* 一次控制器
|
||||
*/
|
||||
ONCE_ONLY_CONTROLLER,
|
||||
ONCE_ONLY_CONTROLLER(StepTypeGroup.CONTROLLER),
|
||||
/**
|
||||
* 等待控制器
|
||||
*/
|
||||
CONSTANT_TIMER,
|
||||
CONSTANT_TIMER(StepTypeGroup.REQUEST),
|
||||
/**
|
||||
* 脚本操作
|
||||
*/
|
||||
SCRIPT,
|
||||
SCRIPT(StepTypeGroup.REQUEST);
|
||||
|
||||
|
||||
private enum StepTypeGroup {
|
||||
REQUEST, CONTROLLER, SCENARIO
|
||||
}
|
||||
|
||||
private StepTypeGroup stepTypeGroup;
|
||||
|
||||
ApiScenarioStepType(StepTypeGroup stepTypeGroup) {
|
||||
this.stepTypeGroup = stepTypeGroup;
|
||||
}
|
||||
|
||||
public Boolean isRequest() {
|
||||
return this.stepTypeGroup.equals(StepTypeGroup.REQUEST);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import org.apache.jmeter.assertions.ResponseAssertion;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @Author: jianxing
|
||||
* @CreateTime: 2023-12-27 21:01
|
||||
|
|
|
@ -1453,7 +1453,8 @@ public class ApiScenarioService extends MoveNodeService {
|
|||
}
|
||||
|
||||
public boolean isRequestStep(ApiScenarioStepCommonDTO step) {
|
||||
return StringUtils.equalsAny(step.getStepType(), ApiScenarioStepType.API.name(), ApiScenarioStepType.API_CASE.name(), ApiScenarioStepType.CUSTOM_REQUEST.name());
|
||||
ApiScenarioStepType scenarioStepType = EnumValidator.validateEnum(ApiScenarioStepType.class, step.getStepType());
|
||||
return scenarioStepType == null ? false : scenarioStepType.isRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue