fix(测试跟踪): 用例导出报错
This commit is contained in:
parent
63e234b74b
commit
fcf879d06f
|
@ -457,12 +457,19 @@ public class TestCaseService {
|
|||
if (t.getMethod().equals("manual")) {
|
||||
String steps = t.getSteps();
|
||||
String setp = "";
|
||||
setp = steps;
|
||||
JSONArray jsonArray = null;
|
||||
|
||||
//解决旧版本保存用例导出报错
|
||||
try {
|
||||
jsonArray = JSON.parseArray(setp);
|
||||
} catch (Exception e) {
|
||||
if (steps.contains("null") && !steps.contains("\"null\"")) {
|
||||
setp = steps.replace("null", "\"\"");
|
||||
} else {
|
||||
setp = steps;
|
||||
jsonArray = JSON.parseArray(setp);
|
||||
}
|
||||
JSONArray jsonArray = JSON.parseArray(setp);
|
||||
}
|
||||
|
||||
for (int j = 0; j < jsonArray.size(); j++) {
|
||||
int num = j + 1;
|
||||
step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b9091a47b197faef77c72b134b7cf604fe3209f0
|
||||
Subproject commit eb237fb6bfeba8d99e4db52450ae92f3cdd4ea33
|
Loading…
Reference in New Issue