提交 b583d01b authored 作者: 黄承天's avatar 黄承天

[fix]

params空指针异常
上级 1e129605
......@@ -92,11 +92,11 @@ public class SeleniumExecutor {
try {
start();
startTime = new Date();
//开始测试前的准备 若此处有异常则说明测试用例不符 不进行测试
//开始测试前的准备 若此处有异常则说明测试用例数据不符合规范 不进行测试
projectId = testCase.getProjectId();
testId = testCase.getId();
name = testCase.getName();
this.params.addAll(params);
this.params = params;
List<Command> commands = testCase.getCommands();
total = commands.size();
//根据浏览器 获取driver
......@@ -346,11 +346,7 @@ public class SeleniumExecutor {
success = true;
break;
default:
return new Step()
.setSuccess(false)
.setCostTime(-1L)
.setContent("无")
.setMessage("未识别的操作类型:" + type);
return null;
}
} catch (Exception e) {
log.error(e.getLocalizedMessage());
......@@ -469,7 +465,11 @@ public class SeleniumExecutor {
finished = -1;
total = -1;
steps.clear();
params.clear();
if (nonNull(params)) {
params.clear();
} else {
params = new ArrayList<>();
}
seleniumHelper.getHistoryHandles().clear();
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论