用例步骤换行
This commit is contained in:
parent
686baea129
commit
bac151be1e
|
@ -341,16 +341,18 @@ public class TestCaseService {
|
||||||
if (TestCaseList.get(i).getMethod().equals("manual")) {
|
if (TestCaseList.get(i).getMethod().equals("manual")) {
|
||||||
String steps = TestCaseList.get(i).getSteps();
|
String steps = TestCaseList.get(i).getSteps();
|
||||||
JSONArray jsonArray = JSON.parseArray(steps);
|
JSONArray jsonArray = JSON.parseArray(steps);
|
||||||
for (int j = 0; j <jsonArray.size(); j++) {
|
for (int j = 0; j < jsonArray.size(); j++) {
|
||||||
int num=j+1;
|
int num = j + 1;
|
||||||
step.append(num + ":" + jsonArray.getJSONObject(j).getString("desc"));
|
step.append(num + ":" + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
||||||
step.append("\n");
|
result.append(num + ":" + jsonArray.getJSONObject(j).getString("result") + "\n");
|
||||||
data.setStepDesc(step.toString());
|
|
||||||
result.append(num + ":" + jsonArray.getJSONObject(j).getString("result"));
|
|
||||||
result.append("\n");
|
|
||||||
data.setStepResult(result.toString());
|
|
||||||
}
|
}
|
||||||
|
data.setStepDesc(step.toString());
|
||||||
|
data.setStepResult(result.toString());
|
||||||
|
step.setLength(0);
|
||||||
|
result.setLength(0);
|
||||||
data.setRemark(TestCaseList.get(i).getRemark());
|
data.setRemark(TestCaseList.get(i).getRemark());
|
||||||
|
|
||||||
} else if(TestCaseList.get(i).getMethod().equals("auto")&&TestCaseList.get(i).getType().equals("api")){
|
} else if(TestCaseList.get(i).getMethod().equals("auto")&&TestCaseList.get(i).getType().equals("api")){
|
||||||
data.setStepDesc("");
|
data.setStepDesc("");
|
||||||
data.setStepResult("");
|
data.setStepResult("");
|
||||||
|
|
Loading…
Reference in New Issue