Merge branch 'v1.4'
This commit is contained in:
commit
4dfc963c40
|
@ -462,7 +462,15 @@ public class TestCaseService {
|
|||
} else {
|
||||
setp = steps;
|
||||
}
|
||||
JSONArray jsonArray = JSON.parseArray(setp);
|
||||
JSONArray jsonArray = null;
|
||||
try {
|
||||
jsonArray = JSON.parseArray(setp);
|
||||
} catch (Exception e) {
|
||||
// 解决旧版本保存用例导出报错
|
||||
setp.replace("\"desc\":,", "\"desc\":\"\",");
|
||||
setp.replace("\"result\":}", "\"result\":\"\"}");
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
for (int j = 0; j < jsonArray.size(); j++) {
|
||||
int num = j + 1;
|
||||
step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
||||
|
|
Loading…
Reference in New Issue