fix(接口测试): 部分请求匹配不到mock期望的问题
--bug=1019514 --user=宋天阳 【接口测试】附件里这个mock信息执行后匹配不到期望【+github#19549】 https://www.tapd.cn/55049933/s/1300813
This commit is contained in:
parent
e2a8f99301
commit
8adb3bf69d
|
@ -103,6 +103,7 @@ public class MockApiUtils {
|
|||
} else if (StringUtils.equalsIgnoreCase(type, "XML")) {
|
||||
if (bodyObj.has("raw")) {
|
||||
String xmlStr = bodyObj.optString("raw");
|
||||
xmlStr = xmlStr.replaceAll("\r","").replaceAll("\n","");
|
||||
JSONObject matchObj = XMLUtil.xmlStringToJSONObject(xmlStr);
|
||||
returnJson = matchObj;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue