diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java index c6a582c095..04b62c4225 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseService.java @@ -386,7 +386,13 @@ public class TestCaseService { data.setPrerequisite(t.getPrerequisite()); if (t.getMethod().equals("manual")) { String steps = t.getSteps(); - JSONArray jsonArray = JSON.parseArray(steps); + String setp = ""; + if (steps.contains("null")) { + setp = steps.replace("null", ""); + } else { + setp = steps; + } + 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");