fix(测试跟踪): 修复https://github.com/metersphere/metersphere/issues/659 对应问题
This commit is contained in:
parent
6e3391c6fe
commit
bf81de8926
|
@ -276,22 +276,19 @@ public class XmindCaseParser {
|
||||||
testCase.setType("functional");
|
testCase.setType("functional");
|
||||||
|
|
||||||
String tc = title.replace(":", ":");
|
String tc = title.replace(":", ":");
|
||||||
String[] tcArr = tc.split(":");
|
String[] tcArrs = tc.split(":");
|
||||||
if (tcArr.length < 1) {
|
if (tcArrs.length < 1) {
|
||||||
process.add(Translator.get("test_case_name") + Translator.get("incorrect_format"), title);
|
process.add(Translator.get("test_case_name") + Translator.get("incorrect_format"), title);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 用例名称
|
// 用例名称
|
||||||
StringBuffer name = new StringBuffer();
|
String name = title.replace(tcArrs[0] + ":", "").replace(tcArrs[0] + ":", "");
|
||||||
for (int i = 1; i < tcArr.length; i++) {
|
testCase.setName(name);
|
||||||
name.append(tcArr[i]);
|
|
||||||
}
|
|
||||||
testCase.setName(name.toString());
|
|
||||||
testCase.setNodePath(nodePath);
|
testCase.setNodePath(nodePath);
|
||||||
|
|
||||||
// 用例等级和用例性质处理
|
// 用例等级和用例性质处理
|
||||||
if (tcArr[0].indexOf("-") != -1) {
|
if (tcArrs[0].indexOf("-") != -1) {
|
||||||
for (String item : tcArr[0].split("-")) {
|
for (String item : tcArrs[0].split("-")) {
|
||||||
if (isAvailable(item, TC_REGEX)) {
|
if (isAvailable(item, TC_REGEX)) {
|
||||||
continue;
|
continue;
|
||||||
} else if (item.toUpperCase().startsWith("P")) {
|
} else if (item.toUpperCase().startsWith("P")) {
|
||||||
|
|
Loading…
Reference in New Issue