fix(接口测试): 修复ssl认证别名获取不到问题
This commit is contained in:
parent
25c766c337
commit
becbe88097
|
@ -580,7 +580,8 @@ public class ElementUtil {
|
|||
public static JSR223PreProcessor argumentsToProcessor(Arguments arguments) {
|
||||
JSR223PreProcessor processor = new JSR223PreProcessor();
|
||||
processor.setEnabled(true);
|
||||
processor.setName("scene variable");
|
||||
processor.setName("User Defined Variables");
|
||||
processor.setProperty("scriptLanguage", "beanshell");
|
||||
processor.setProperty(TestElement.TEST_CLASS, JSR223PreProcessor.class.getName());
|
||||
processor.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("TestBeanGUI"));
|
||||
StringBuffer script = new StringBuffer();
|
||||
|
|
|
@ -57,7 +57,6 @@ import java.net.URLEncoder;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -533,7 +532,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(this.alias)) {
|
||||
String aliasVar = UUID.randomUUID().toString();
|
||||
String aliasVar = "User-Defined-KeyStore-" + this.alias.trim();
|
||||
this.addArguments(httpSamplerTree, aliasVar, this.alias.trim());
|
||||
// 校验 keystore
|
||||
commandService.checkKeyStore(msKeyStore.getPassword(), msKeyStore.getPath());
|
||||
|
@ -744,7 +743,7 @@ public class MsHTTPSamplerProxy extends MsTestElement {
|
|||
private void addArguments(HashTree tree, String key, String value) {
|
||||
Arguments arguments = new Arguments();
|
||||
arguments.setEnabled(true);
|
||||
arguments.setName(StringUtils.isNotEmpty(this.getName()) ? this.getName() + "-KeyStoreAlias" : "KeyStoreAlias");
|
||||
arguments.setName("User Defined KeyStoreAlias");
|
||||
arguments.setProperty(TestElement.TEST_CLASS, Arguments.class.getName());
|
||||
arguments.setProperty(TestElement.GUI_CLASS, SaveService.aliasToClass("ArgumentsPanel"));
|
||||
arguments.addArgument(key, value, "=");
|
||||
|
|
Loading…
Reference in New Issue