优化runcase时,返回值并打印被调用用例第几步出错的日志
This commit is contained in:
parent
7bbb3a7a4e
commit
00f720ed14
|
@ -252,6 +252,8 @@ public class TestCaseExecution {
|
|||
}
|
||||
|
||||
if (0 != setresult){
|
||||
testnote = "【调用用例:"+testcase.getCaseSign()+" 第"+step.getStepSerialNumber()+"步在执行过程中失败】";
|
||||
LogUtil.APP.warn("调用用例:{} 第{}步在执行过程中失败,请检查日志!{}",testcase.getCaseSign(),step.getStepSerialNumber(),testnote);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -259,10 +261,8 @@ public class TestCaseExecution {
|
|||
VARIABLE.clear(); // 清空传参MAP
|
||||
if (0 == setresult) {
|
||||
LogUtil.APP.info("调用用例:{}步骤全部执行成功!",testcase.getCaseSign());
|
||||
} else {
|
||||
testnote = "【调用用例:{"+testcase.getCaseSign()+"}在执行过程中失败】"+testnote;
|
||||
LogUtil.APP.warn("调用用例:{}在执行过程中失败,请检查日志!",testcase.getCaseSign());
|
||||
}
|
||||
|
||||
return testnote;
|
||||
}
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ public class WebCaseExecution{
|
|||
if (!ex.contains("CallCase调用出错!") && !ex.contains("解析出错啦!") && !ex.contains("失败")) {
|
||||
return ex;
|
||||
} else {
|
||||
return "步骤执行失败:调用外部用例过程失败";
|
||||
return "步骤执行失败:"+ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue