fix(接口测试): 修复mock请求体可以设置jmeter内置函数的问题
--bug=1010903 --user=宋天阳 【接口测试】github#11208,设置了Mock后 字段 为什么是null值? {#_orginal_url#}
This commit is contained in:
parent
53ff4027d5
commit
b1ddc4016f
|
@ -709,11 +709,13 @@ public class MockApiUtils {
|
|||
}
|
||||
|
||||
public static boolean checkParamsCompliance(JSONArray jsonArray, List<MockConfigRequestParams> mockConfigRequestParamList, boolean isAllMatch) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject obj = jsonArray.getJSONObject(i);
|
||||
boolean isMatch = checkParamsCompliance(obj, mockConfigRequestParamList, isAllMatch);
|
||||
if (isMatch) {
|
||||
return true;
|
||||
if (jsonArray != null) {
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject obj = jsonArray.getJSONObject(i);
|
||||
boolean isMatch = checkParamsCompliance(obj, mockConfigRequestParamList, isAllMatch);
|
||||
if (isMatch) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
value-key="name"
|
||||
highlight-first-item
|
||||
@select="change">
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit pointer" @click="advanced(mock)"></i>
|
||||
<i slot="suffix" class="el-input__icon el-icon-edit pointer" v-if="!showMockVars" @click="advanced(mock)"></i>
|
||||
</el-autocomplete>
|
||||
<ms-api-variable-advance :show-mock-vars="showMockVars" :scenario-definition="scenarioDefinition" :current-item="mock" ref="variableAdvance"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue