fix(接口自动化): 提取参数给默认值

This commit is contained in:
fit2-zhao 2021-01-29 17:53:30 +08:00
parent 16e51fc8a5
commit dffdc19fe0
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class MsExtract extends MsTestElement {
if (Optional.ofNullable(extract).orElse(extract).length() > 0) {
JSR223PostProcessor shell = new JSR223PostProcessor();
shell.setEnabled(true);
shell.setName(this.getName());
shell.setName(StringUtils.isEmpty(this.getName()) ? "JSR223PostProcessor" : this.getName());
shell.setProperty(TestElement.TEST_CLASS, JSR223PostProcessor.class.getName());
shell.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
shell.setProperty("script", "io.metersphere.api.jmeter.JMeterVars.addVars(prev.hashCode(),vars," + "\"" + extract.toString() + "\"" + ");");