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) {
|
public static boolean checkParamsCompliance(JSONArray jsonArray, List<MockConfigRequestParams> mockConfigRequestParamList, boolean isAllMatch) {
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
if (jsonArray != null) {
|
||||||
JSONObject obj = jsonArray.getJSONObject(i);
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
boolean isMatch = checkParamsCompliance(obj, mockConfigRequestParamList, isAllMatch);
|
JSONObject obj = jsonArray.getJSONObject(i);
|
||||||
if (isMatch) {
|
boolean isMatch = checkParamsCompliance(obj, mockConfigRequestParamList, isAllMatch);
|
||||||
return true;
|
if (isMatch) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
value-key="name"
|
value-key="name"
|
||||||
highlight-first-item
|
highlight-first-item
|
||||||
@select="change">
|
@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>
|
</el-autocomplete>
|
||||||
<ms-api-variable-advance :show-mock-vars="showMockVars" :scenario-definition="scenarioDefinition" :current-item="mock" ref="variableAdvance"/>
|
<ms-api-variable-advance :show-mock-vars="showMockVars" :scenario-definition="scenarioDefinition" :current-item="mock" ref="variableAdvance"/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue