fix(测试跟踪): 修复功能用例没有预期步骤时导出excel后相关字段变为null的问题
--bug=1012886 --user=宋天阳 【测试跟踪】github#13201 xmind上传没有预期结果的步骤,导出excel版本用例,该步骤显示成null https://www.tapd.cn/55049933/s/1156560
This commit is contained in:
parent
a04b7a12a6
commit
7ed233e4ca
|
@ -1485,7 +1485,6 @@ public class TestCaseService {
|
|||
data.setPrerequisite(t.getPrerequisite());
|
||||
data.setTags(t.getTags());
|
||||
if (StringUtils.equals(t.getMethod(), "manual") || StringUtils.isBlank(t.getMethod())) {
|
||||
|
||||
if (StringUtils.equals(data.getStepModel(), TestCaseConstants.StepModel.TEXT.name())) {
|
||||
data.setStepDesc(t.getStepDescription());
|
||||
data.setStepResult(t.getExpectedResult());
|
||||
|
@ -1508,8 +1507,16 @@ public class TestCaseService {
|
|||
if (CollectionUtils.isNotEmpty(jsonArray)) {
|
||||
for (int j = 0; j < jsonArray.size(); j++) {
|
||||
int num = j + 1;
|
||||
step.append(num + "." + jsonArray.getJSONObject(j).getString("desc") + "\n");
|
||||
result.append(num + "." + jsonArray.getJSONObject(j).getString("result") + "\n");
|
||||
String stepItem = jsonArray.getJSONObject(j).getString("desc");
|
||||
if(StringUtils.isEmpty(stepItem)){
|
||||
stepItem = "";
|
||||
}
|
||||
step.append(num + "." + stepItem + "\n");
|
||||
String resultItem = jsonArray.getJSONObject(j).getString("result");
|
||||
if(StringUtils.isEmpty(resultItem)){
|
||||
resultItem = "";
|
||||
}
|
||||
result.append(num + "." + resultItem + "\n");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue