优化runcase时,返回值并打印被调用用例第几步出错的日志

This commit is contained in:
seagull 2019-12-02 16:53:37 +08:00
parent 7bbb3a7a4e
commit 00f720ed14
2 changed files with 4 additions and 4 deletions

View File

@ -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;
}

View File

@ -130,7 +130,7 @@ public class WebCaseExecution{
if (!ex.contains("CallCase调用出错") && !ex.contains("解析出错啦!") && !ex.contains("失败")) {
return ex;
} else {
return "步骤执行失败:调用外部用例过程失败";
return "步骤执行失败:"+ex;
}
}