fix(接口自动化): 导入JMX无全路径问题处理

This commit is contained in:
fit2-zhao 2021-04-01 18:08:43 +08:00 committed by fit2-zhao
parent 31040c0107
commit b101be03a0
1 changed files with 6 additions and 2 deletions

View File

@ -153,6 +153,10 @@ public class MsJmeterParser extends ApiImportAbstractParser<ScenarioImport> {
public String getUrl(HTTPSamplerProxy source) throws MalformedURLException { public String getUrl(HTTPSamplerProxy source) throws MalformedURLException {
String path = source.getPath(); String path = source.getPath();
// Request Defaults
if (StringUtils.isEmpty(source.getDomain())) {
return null;
}
if (!path.startsWith("http://") && !path.startsWith("https://")) { if (!path.startsWith("http://") && !path.startsWith("https://")) {
String domain = source.getDomain(); String domain = source.getDomain();
String protocol = source.getProtocol(); String protocol = source.getProtocol();