fix(接口自动化): 修复jmx导入 断言规则处理问题
This commit is contained in:
parent
ce9d9c8c43
commit
032b9e16e1
|
@ -472,13 +472,13 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
|
||||||
if (assertion.getTestStrings() != null && !assertion.getTestStrings().isEmpty()) {
|
if (assertion.getTestStrings() != null && !assertion.getTestStrings().isEmpty()) {
|
||||||
assertionRegex.setExpression(assertion.getTestStrings().get(0).getStringValue());
|
assertionRegex.setExpression(assertion.getTestStrings().get(0).getStringValue());
|
||||||
}
|
}
|
||||||
if (assertion.isTestFieldRequestData()) {
|
if (assertion.isTestFieldResponseData()) {
|
||||||
assertionRegex.setSubject("Response Data");
|
assertionRegex.setSubject("Response Data");
|
||||||
}
|
}
|
||||||
if (assertion.isTestFieldResponseCode()) {
|
if (assertion.isTestFieldResponseCode()) {
|
||||||
assertionRegex.setSubject("Response Code");
|
assertionRegex.setSubject("Response Code");
|
||||||
}
|
}
|
||||||
if (assertion.isTestFieldRequestHeaders()) {
|
if (assertion.isTestFieldResponseHeaders()) {
|
||||||
assertionRegex.setSubject("Response Headers");
|
assertionRegex.setSubject("Response Headers");
|
||||||
}
|
}
|
||||||
assertions.setName(assertion.getName());
|
assertions.setName(assertion.getName());
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<el-select :disabled="isReadOnly" class="assertion-item" v-model="type"
|
<el-select :disabled="isReadOnly" class="assertion-item" v-model="type"
|
||||||
:placeholder="$t('api_test.request.assertions.select_type')"
|
:placeholder="$t('api_test.request.assertions.select_type')"
|
||||||
size="small">
|
size="small">
|
||||||
|
<el-option :label="$t('api_test.request.assertions.text')" :value="options.TEXT"/>
|
||||||
<el-option :label="$t('api_test.request.assertions.regex')" :value="options.REGEX"/>
|
<el-option :label="$t('api_test.request.assertions.regex')" :value="options.REGEX"/>
|
||||||
<el-option :label="'JSONPath'" :value="options.JSON_PATH"/>
|
<el-option :label="'JSONPath'" :value="options.JSON_PATH"/>
|
||||||
<el-option :label="'XPath'" :value="options.XPATH2"/>
|
<el-option :label="'XPath'" :value="options.XPATH2"/>
|
||||||
|
@ -24,6 +25,9 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
|
<ms-api-assertion-text :is-read-only="isReadOnly" :list="assertions.regex" v-if="type === options.TEXT"
|
||||||
|
:callback="after"/>
|
||||||
|
|
||||||
<ms-api-assertion-regex :is-read-only="isReadOnly" :list="assertions.regex" v-if="type === options.REGEX"
|
<ms-api-assertion-regex :is-read-only="isReadOnly" :list="assertions.regex" v-if="type === options.REGEX"
|
||||||
:callback="after"/>
|
:callback="after"/>
|
||||||
<ms-api-assertion-json-path :is-read-only="isReadOnly" :list="assertions.jsonPath"
|
<ms-api-assertion-json-path :is-read-only="isReadOnly" :list="assertions.jsonPath"
|
||||||
|
|
Loading…
Reference in New Issue