feat(接口定义): case或者场景名称中带/,保存性能测试报错的缺陷
--bug=1016355 --user=王孝刚 【接口测试】github#17452,接口自动化名字带 / ,转成性能测试保存会报错:文件上传失败 https://www.tapd.cn/55049933/s/1240778
This commit is contained in:
parent
6615c6efd8
commit
6f25bbb90d
|
@ -3,6 +3,7 @@ package io.metersphere.api.dto;
|
||||||
import io.metersphere.base.domain.FileMetadata;
|
import io.metersphere.base.domain.FileMetadata;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -22,9 +23,14 @@ public class JmxInfoDTO {
|
||||||
private Map<String, String> attachFiles;
|
private Map<String, String> attachFiles;
|
||||||
private List<FileMetadata> fileMetadataList;
|
private List<FileMetadata> fileMetadataList;
|
||||||
|
|
||||||
public JmxInfoDTO(String name,String xml,Map<String, String> attachFiles){
|
public JmxInfoDTO(String name, String xml, Map<String, String> attachFiles) {
|
||||||
this.name = name;
|
this.name = StringUtils.replace(name, "/", "");
|
||||||
this.xml = xml;
|
this.xml = xml;
|
||||||
this.attachFiles = attachFiles;
|
this.attachFiles = attachFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = StringUtils.replace(name, "/", "");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.api.dto.automation;
|
||||||
import io.metersphere.base.domain.FileMetadata;
|
import io.metersphere.base.domain.FileMetadata;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -21,7 +22,8 @@ public class ApiScenarioExportJmxDTO {
|
||||||
private Map<String, List<String>> projectEnvMap;
|
private Map<String, List<String>> projectEnvMap;
|
||||||
|
|
||||||
public ApiScenarioExportJmxDTO(String name, String jmx) {
|
public ApiScenarioExportJmxDTO(String name, String jmx) {
|
||||||
this.name = name;
|
this.name = StringUtils.replace(name, "/", "");
|
||||||
this.jmx = jmx;
|
this.jmx = jmx;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,9 +143,6 @@ export default {
|
||||||
let data = returnData.scenarioJmxList;
|
let data = returnData.scenarioJmxList;
|
||||||
data.forEach(d => {
|
data.forEach(d => {
|
||||||
let jmxName = d.name + "_" + new Date().getTime() + ".jmx";
|
let jmxName = d.name + "_" + new Date().getTime() + ".jmx";
|
||||||
if (jmxName.indexOf("/") !== -1) {
|
|
||||||
jmxName = jmxName.replace(/\//g, "");
|
|
||||||
}
|
|
||||||
let threadGroups = findThreadGroup(d.jmx, jmxName);
|
let threadGroups = findThreadGroup(d.jmx, jmxName);
|
||||||
threadGroups.forEach(tg => {
|
threadGroups.forEach(tg => {
|
||||||
tg.options = {};
|
tg.options = {};
|
||||||
|
|
Loading…
Reference in New Issue