refactor(接口测试): 统一规范代码格式化
This commit is contained in:
parent
8adb3bf69d
commit
ab63f3867e
|
@ -1,4 +1,5 @@
|
|||
package io.metersphere.api.dto;
|
||||
|
||||
import io.metersphere.request.BodyFile;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
|
@ -22,7 +22,9 @@ public class GenScenarioRequest extends ApiScenarioWithBLOBs {
|
|||
|
||||
private String runMode;
|
||||
|
||||
/**测试情景和测试计划的关联ID*/
|
||||
/**
|
||||
* 测试情景和测试计划的关联ID
|
||||
*/
|
||||
private String planScenarioId;
|
||||
|
||||
private List<String> planCaseIds;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package io.metersphere.api.dto.datacount.request;
|
||||
|
||||
import io.metersphere.request.OrderRequest;
|
||||
import io.metersphere.request.TestPlanRequest;
|
||||
import lombok.Getter;
|
||||
|
|
|
@ -48,7 +48,6 @@ public class MsDebugSampler extends MsTestElement {
|
|||
}
|
||||
|
||||
|
||||
|
||||
private DebugSampler debugSampler() {
|
||||
DebugSampler debugSampler = new DebugSampler();
|
||||
debugSampler.setEnabled(this.isEnable());
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package io.metersphere.api.dto.scenario;
|
||||
|
||||
import io.metersphere.base.domain.ApiDefinition;
|
||||
import io.metersphere.base.mapper.ApiDefinitionMapper;
|
||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||
import io.metersphere.base.mapper.ApiTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
public class ApiScenarioParamDTO {
|
||||
private ApiScenarioMapper batchMapper;
|
||||
private ExtApiScenarioMapper extApiScenarioMapper;
|
||||
private ApiTestCaseMapper apiTestCaseMapper;
|
||||
private ApiDefinitionMapper apiDefinitionMapper;
|
||||
private Map<String, ApiDefinition> definitionMap;
|
||||
private Map<String, Set<String>> apiIdCaseNameMap;
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
package io.metersphere.api.dto.scenario.environment.item;
|
||||
|
||||
import io.metersphere.commons.constants.ElementConstants;
|
||||
import lombok.Data;
|
||||
|
||||
|
|
|
@ -236,7 +236,6 @@ public class ESBParser extends EsbAbstractParser {
|
|||
setCellValue(StringUtils.EMPTY, row6.createCell(9), font, cellStyleMap.get(PropertyConstant.DEFAULT));
|
||||
|
||||
|
||||
|
||||
XSSFRow row7 = sheet.createRow(6);
|
||||
setCellValue(StringUtils.EMPTY, row7.createCell(1), font, cellStyleMap.get(PropertyConstant.DEFAULT));
|
||||
setCellValue(StringUtils.EMPTY, row7.createCell(2), font, cellStyleMap.get(PropertyConstant.DEFAULT));
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -35,5 +33,4 @@ public class HarCreator {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -44,7 +42,6 @@ public class HarEntry implements Comparable<HarEntry> {
|
|||
public String comment;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HarEntry [pageref=" + pageref + ", startedDateTime=" + startedDateTime + ", time=" + time + ", request="
|
||||
|
@ -53,7 +50,6 @@ public class HarEntry implements Comparable<HarEntry> {
|
|||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int compareTo(HarEntry o) {
|
||||
if (o == null) {
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -46,5 +44,4 @@ public class HarLog {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -38,7 +36,6 @@ public class HarPage {
|
|||
public transient List<HarEntry> entries;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HarPage [startedDateTime=" + startedDateTime + ", id=" + id + ", title=" + title + ", pageTimings="
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -35,5 +33,4 @@ public class HarPageTiming {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
|
|
@ -1,22 +1,20 @@
|
|||
/**
|
||||
*
|
||||
* har - HAR file reader, writer and viewer
|
||||
* Copyright (c) 2014, Sandeep Gupta
|
||||
*
|
||||
* <p>
|
||||
* http://sangupta.com/projects/har
|
||||
*
|
||||
* <p>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* <p>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* <p>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
package io.metersphere.api.parse.api.har.model;
|
||||
|
@ -46,5 +44,4 @@ public class HarTiming {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ import io.metersphere.service.BaseCheckPermissionService;
|
|||
import io.metersphere.service.definition.ApiDefinitionService;
|
||||
import io.metersphere.service.definition.ApiTestCaseService;
|
||||
import io.metersphere.service.scenario.ApiScenarioModuleService;
|
||||
import io.metersphere.service.scenario.dto.ApiScenarioParamDto;
|
||||
import io.metersphere.api.dto.scenario.ApiScenarioParamDTO;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -161,7 +161,7 @@ public class ApiScenarioImportUtil {
|
|||
}
|
||||
}
|
||||
|
||||
public static void checkCase(JSONObject object, String versionId, String projectId, ApiScenarioParamDto apiScenarioParamDto) {
|
||||
public static void checkCase(JSONObject object, String versionId, String projectId, ApiScenarioParamDTO apiScenarioParamDto) {
|
||||
Map<String, ApiDefinition> definitionMap = apiScenarioParamDto.getDefinitionMap();
|
||||
ApiTestCaseMapper apiTestCaseMapper = apiScenarioParamDto.getApiTestCaseMapper();
|
||||
Map<String, Set<String>> apiIdCaseNameMap = apiScenarioParamDto.getApiIdCaseNameMap();
|
||||
|
|
|
@ -16,7 +16,8 @@ public class TCPPool {
|
|||
|
||||
private static HashMap<Integer, TCPServer> serverSockedMap = new HashMap<>();
|
||||
|
||||
private TCPPool(){}
|
||||
private TCPPool() {
|
||||
}
|
||||
|
||||
public static String createTcp(int port) {
|
||||
String returnString = StringUtils.EMPTY;
|
||||
|
|
|
@ -22,6 +22,7 @@ public class MockTestDataUtil {
|
|||
}
|
||||
return testDataRequestList;
|
||||
}
|
||||
|
||||
public String getTestData(MockTestDataRequest request) {
|
||||
if (StringUtils.equals(MockApiUtils.parseCondition(request.getCondition()), MockParamConditionEnums.VALUE_EQUALS.name())) {
|
||||
return request.getValue();
|
||||
|
|
|
@ -230,6 +230,7 @@ public class TestPlanScenarioCaseController {
|
|||
public Map<String, List<String>> getPlanProjectEnvMap(@RequestBody List<String> resourceIds) {
|
||||
return testPlanScenarioCaseService.getPlanProjectEnvMap(resourceIds);
|
||||
}
|
||||
|
||||
@GetMapping("/get-scenario-id/{id}")
|
||||
public String getScenarioId(@PathVariable("id") String planScenarioId) {
|
||||
return testPlanScenarioCaseService.getScenarioId(planScenarioId);
|
||||
|
|
|
@ -413,6 +413,7 @@ public class ApiScenarioController {
|
|||
public List<String> getEnvProjects(@RequestBody RunScenarioRequest request) {
|
||||
return apiAutomationService.getProjects(request);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/env/map")
|
||||
public Map<String, List<String>> getProjectEnvMap(@RequestBody RunScenarioRequest request) {
|
||||
return apiAutomationService.getProjectEnvMap(request);
|
||||
|
|
|
@ -28,7 +28,8 @@ public class TestPlanDeletedListener {
|
|||
@KafkaListener(id = CONSUME_ID, topics = KafkaTopicConstants.TEST_PLAN_DELETED_TOPIC, groupId = "${spring.application.name}")
|
||||
public void consume(ConsumerRecord<?, String> record) {
|
||||
try {
|
||||
List<String> planIds = objectMapper.readValue(record.value(), new TypeReference<>() {});
|
||||
List<String> planIds = objectMapper.readValue(record.value(), new TypeReference<>() {
|
||||
});
|
||||
if (CollectionUtils.isEmpty(planIds)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ public class ExtFileAssociationService extends FileAssociationService {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getHashTree(List<MsTestElement> testElements, List<BodyFile> files) {
|
||||
testElements.forEach(item -> {
|
||||
if (StringUtils.equalsIgnoreCase(item.getType(), HTTPSamplerProxy.class.getSimpleName())) {
|
||||
|
|
|
@ -56,7 +56,7 @@ import io.metersphere.service.definition.TcpApiParamService;
|
|||
import io.metersphere.service.ext.ExtApiScheduleService;
|
||||
import io.metersphere.service.ext.ExtFileAssociationService;
|
||||
import io.metersphere.service.plan.TestPlanScenarioCaseService;
|
||||
import io.metersphere.service.scenario.dto.ApiScenarioParamDto;
|
||||
import io.metersphere.api.dto.scenario.ApiScenarioParamDTO;
|
||||
import io.metersphere.xpack.api.service.ApiAutomationRelationshipEdgeService;
|
||||
import io.metersphere.xpack.quota.service.QuotaService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
@ -415,7 +415,7 @@ public class ApiScenarioService {
|
|||
return scenario;
|
||||
}
|
||||
|
||||
private void checkReferenceCase(ApiScenarioWithBLOBs scenario, ApiScenarioParamDto apiScenarioParamDto) {
|
||||
private void checkReferenceCase(ApiScenarioWithBLOBs scenario, ApiScenarioParamDTO apiScenarioParamDto) {
|
||||
if (scenario == null || StringUtils.isEmpty(scenario.getScenarioDefinition())) {
|
||||
return;
|
||||
}
|
||||
|
@ -1184,7 +1184,7 @@ public class ApiScenarioService {
|
|||
}
|
||||
}
|
||||
|
||||
private void _importCreate(List<ApiScenarioWithBLOBs> sameRequest, ApiScenarioWithBLOBs scenarioWithBLOBs, ApiTestImportRequest apiTestImportRequest, ApiScenarioParamDto apiScenarioParamDto) {
|
||||
private void _importCreate(List<ApiScenarioWithBLOBs> sameRequest, ApiScenarioWithBLOBs scenarioWithBLOBs, ApiTestImportRequest apiTestImportRequest, ApiScenarioParamDTO apiScenarioParamDto) {
|
||||
ApiScenarioMapper batchMapper = apiScenarioParamDto.getBatchMapper();
|
||||
ExtApiScenarioMapper extApiScenarioMapper = apiScenarioParamDto.getExtApiScenarioMapper();
|
||||
if (CollectionUtils.isEmpty(sameRequest)) {
|
||||
|
@ -1251,7 +1251,7 @@ public class ApiScenarioService {
|
|||
}
|
||||
}
|
||||
|
||||
private ApiScenarioWithBLOBs importCreate(ApiScenarioWithBLOBs request, ApiTestImportRequest apiTestImportRequest, List<ApiScenarioWithBLOBs> sameList, ApiScenarioParamDto apiScenarioParamDto) {
|
||||
private ApiScenarioWithBLOBs importCreate(ApiScenarioWithBLOBs request, ApiTestImportRequest apiTestImportRequest, List<ApiScenarioWithBLOBs> sameList, ApiScenarioParamDTO apiScenarioParamDto) {
|
||||
final ApiScenarioWithBLOBs scenarioWithBLOBs = new ApiScenarioWithBLOBs();
|
||||
ApiScenarioMapper batchMapper = apiScenarioParamDto.getBatchMapper();
|
||||
ExtApiScenarioMapper extApiScenarioMapper = apiScenarioParamDto.getExtApiScenarioMapper();
|
||||
|
@ -1443,7 +1443,7 @@ public class ApiScenarioService {
|
|||
item.setUserId(SessionUtils.getUserId());
|
||||
item.setPrincipal(SessionUtils.getUserId());
|
||||
// 导入之后刷新latest
|
||||
ApiScenarioParamDto apiScenarioParamDto = buildParamDto(batchMapper, extApiScenarioMapper, apiTestCaseMapper, apiDefinitionMapper, definitionMap, apiIdCaseNameMap);
|
||||
ApiScenarioParamDTO apiScenarioParamDto = buildParamDto(batchMapper, extApiScenarioMapper, apiTestCaseMapper, apiDefinitionMapper, definitionMap, apiIdCaseNameMap);
|
||||
importCreate(item, request, sameList, apiScenarioParamDto);
|
||||
|
||||
if (i % 300 == 0) {
|
||||
|
@ -1458,8 +1458,8 @@ public class ApiScenarioService {
|
|||
}
|
||||
|
||||
@NotNull
|
||||
private static ApiScenarioParamDto buildParamDto(ApiScenarioMapper batchMapper, ExtApiScenarioMapper extApiScenarioMapper, ApiTestCaseMapper apiTestCaseMapper, ApiDefinitionMapper apiDefinitionMapper, Map<String, ApiDefinition> definitionMap, Map<String, Set<String>> apiIdCaseNameMap) {
|
||||
ApiScenarioParamDto apiScenarioParamDto = new ApiScenarioParamDto();
|
||||
private static ApiScenarioParamDTO buildParamDto(ApiScenarioMapper batchMapper, ExtApiScenarioMapper extApiScenarioMapper, ApiTestCaseMapper apiTestCaseMapper, ApiDefinitionMapper apiDefinitionMapper, Map<String, ApiDefinition> definitionMap, Map<String, Set<String>> apiIdCaseNameMap) {
|
||||
ApiScenarioParamDTO apiScenarioParamDto = new ApiScenarioParamDTO();
|
||||
apiScenarioParamDto.setBatchMapper(batchMapper);
|
||||
apiScenarioParamDto.setExtApiScenarioMapper(extApiScenarioMapper);
|
||||
apiScenarioParamDto.setApiTestCaseMapper(apiTestCaseMapper);
|
||||
|
@ -2115,7 +2115,7 @@ public class ApiScenarioService {
|
|||
return strings;
|
||||
}
|
||||
|
||||
private void setReferenced(JSONArray hashTree, String projectId, String versionId, ApiScenarioParamDto apiScenarioParamDto) {
|
||||
private void setReferenced(JSONArray hashTree, String projectId, String versionId, ApiScenarioParamDTO apiScenarioParamDto) {
|
||||
// 将引用转成复制
|
||||
if (hashTree == null) {
|
||||
return;
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
package io.metersphere.service.scenario.dto;
|
||||
|
||||
import io.metersphere.base.domain.ApiDefinition;
|
||||
import io.metersphere.base.mapper.ApiDefinitionMapper;
|
||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||
import io.metersphere.base.mapper.ApiTestCaseMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtApiScenarioMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@Data
|
||||
public class ApiScenarioParamDto {
|
||||
private ApiScenarioMapper batchMapper;
|
||||
private ExtApiScenarioMapper extApiScenarioMapper;
|
||||
private ApiTestCaseMapper apiTestCaseMapper;
|
||||
private ApiDefinitionMapper apiDefinitionMapper;
|
||||
private Map<String, ApiDefinition> definitionMap;
|
||||
private Map<String, Set<String>> apiIdCaseNameMap;
|
||||
}
|
Loading…
Reference in New Issue