fix(接口自动化): 修复执行缺陷
This commit is contained in:
parent
b781ecaaf3
commit
97e5549bc1
|
@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jmeter.protocol.java.sampler.JSR223Sampler;
|
||||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
|
@ -32,7 +33,11 @@ public class MsJSR223Processor extends MsTestElement {
|
|||
}
|
||||
JSR223Sampler processor = new JSR223Sampler();
|
||||
processor.setEnabled(true);
|
||||
processor.setName(this.getName() + "JSR223Processor");
|
||||
if (StringUtils.isNotEmpty(this.getName())) {
|
||||
processor.setName(this.getName());
|
||||
} else {
|
||||
processor.setName("JSR223Processor");
|
||||
}
|
||||
processor.setProperty(TestElement.TEST_CLASS, JSR223Sampler.class.getName());
|
||||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jmeter.extractor.JSR223PostProcessor;
|
||||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
|
@ -33,7 +34,11 @@ public class MsJSR223PostProcessor extends MsTestElement {
|
|||
}
|
||||
JSR223PostProcessor processor = new JSR223PostProcessor();
|
||||
processor.setEnabled(true);
|
||||
processor.setName(this.getName() + "JSR223PostProcessor");
|
||||
if (StringUtils.isNotEmpty(this.getName())) {
|
||||
processor.setName(this.getName());
|
||||
} else {
|
||||
processor.setName("JSR223PostProcessor");
|
||||
}
|
||||
processor.setProperty(TestElement.TEST_CLASS, JSR223PostProcessor.class.getName());
|
||||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.api.dto.definition.request.ParameterConfig;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.jmeter.modifiers.JSR223PreProcessor;
|
||||
import org.apache.jmeter.save.SaveService;
|
||||
import org.apache.jmeter.testelement.TestElement;
|
||||
|
@ -32,7 +33,11 @@ public class MsJSR223PreProcessor extends MsTestElement {
|
|||
}
|
||||
JSR223PreProcessor processor = new JSR223PreProcessor();
|
||||
processor.setEnabled(true);
|
||||
processor.setName(this.getName() + "JSR223PreProcessor");
|
||||
if (StringUtils.isNotEmpty(this.getName())) {
|
||||
processor.setName(this.getName());
|
||||
} else {
|
||||
processor.setName("JSR223PreProcessor");
|
||||
}
|
||||
processor.setProperty(TestElement.TEST_CLASS, JSR223PreProcessor.class.getName());
|
||||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
processor.setProperty("cacheKey", "true");
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit efb49c9b4be136ce48e9550dc9c8a2975d9f4d7f
|
||||
Subproject commit 61397c16728a63493507679f7e0940d9099f337f
|
|
@ -41,6 +41,7 @@
|
|||
import {getCurrentUser, getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsDialogFooter from "@/business/components/common/components/MsDialogFooter";
|
||||
import MsTablePagination from "../../../common/pagination/TablePagination";
|
||||
|
||||
export default {
|
||||
name: "MsAddTag",
|
||||
components: {MsDialogFooter, MsTablePagination},
|
||||
|
@ -84,6 +85,7 @@
|
|||
this.result = this.$post(this.path, this.tagForm, () => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.initTable();
|
||||
this.tagForm = {};
|
||||
});
|
||||
} else {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue