feat(接口自动化): 存储过程执行报告
This commit is contained in:
parent
c7da0346ab
commit
de06ed0432
|
@ -2,10 +2,10 @@ package io.metersphere.api.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.api.dto.APIReportResult;
|
|
||||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||||
|
import io.metersphere.api.dto.automation.ExecuteType;
|
||||||
import io.metersphere.api.service.ApiScenarioReportService;
|
import io.metersphere.api.service.ApiScenarioReportService;
|
||||||
import io.metersphere.commons.constants.RoleConstants;
|
import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
|
@ -27,8 +27,8 @@ public class APIScenarioReportController {
|
||||||
private ApiScenarioReportService apiReportService;
|
private ApiScenarioReportService apiReportService;
|
||||||
|
|
||||||
@GetMapping("/get/{reportId}/{infoDb}")
|
@GetMapping("/get/{reportId}/{infoDb}")
|
||||||
public APIReportResult get(@PathVariable String reportId,@PathVariable Boolean infoDb) {
|
public APIScenarioReportResult get(@PathVariable String reportId, @PathVariable Boolean infoDb) {
|
||||||
if(infoDb){
|
if (infoDb) {
|
||||||
return apiReportService.get(reportId);
|
return apiReportService.get(reportId);
|
||||||
}
|
}
|
||||||
return apiReportService.getCacheResult(reportId);
|
return apiReportService.getCacheResult(reportId);
|
||||||
|
@ -44,12 +44,14 @@ public class APIScenarioReportController {
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||||
public String add(@RequestBody APIScenarioReportResult node) {
|
public String add(@RequestBody APIScenarioReportResult node) {
|
||||||
return apiReportService.add(node);
|
node.setExecuteType(ExecuteType.Saved.name());
|
||||||
|
return apiReportService.save(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||||
public String update(@RequestBody APIScenarioReportResult node) {
|
public String update(@RequestBody APIScenarioReportResult node) {
|
||||||
|
node.setExecuteType(ExecuteType.Saved.name());
|
||||||
return apiReportService.update(node);
|
return apiReportService.update(node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import io.metersphere.api.dto.automation.*;
|
||||||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||||
import io.metersphere.api.service.ApiAutomationService;
|
import io.metersphere.api.service.ApiAutomationService;
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenario;
|
||||||
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import io.metersphere.commons.constants.RoleConstants;
|
import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
|
@ -69,17 +70,19 @@ public class ApiAutomationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/getApiScenarios")
|
@PostMapping("/getApiScenarios")
|
||||||
public List<ApiScenario> getApiScenarios(@RequestBody List<String> ids) {
|
public List<ApiScenarioWithBLOBs> getApiScenarios(@RequestBody List<String> ids) {
|
||||||
return apiAutomationService.getApiScenarios(ids);
|
return apiAutomationService.getApiScenarios(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/run/debug")
|
@PostMapping(value = "/run/debug")
|
||||||
public void runDebug(@RequestPart("request") RunDefinitionRequest request, @RequestPart(value = "files") List<MultipartFile> bodyFiles) {
|
public void runDebug(@RequestPart("request") RunDefinitionRequest request, @RequestPart(value = "files") List<MultipartFile> bodyFiles) {
|
||||||
|
request.setExecuteType(ExecuteType.Debug.name());
|
||||||
apiAutomationService.run(request, bodyFiles);
|
apiAutomationService.run(request, bodyFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(value = "/run")
|
@PostMapping(value = "/run")
|
||||||
public void run(@RequestBody RunScenarioRequest request) {
|
public void run(@RequestBody RunScenarioRequest request) {
|
||||||
|
request.setExecuteType(ExecuteType.Completed.name());
|
||||||
apiAutomationService.run(request);
|
apiAutomationService.run(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ import io.metersphere.base.domain.ApiScenarioReport;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Setter
|
@Setter
|
||||||
@Getter
|
@Getter
|
||||||
public class APIScenarioReportResult extends ApiScenarioReport {
|
public class APIScenarioReportResult extends ApiScenarioReport {
|
||||||
|
@ -12,7 +14,11 @@ public class APIScenarioReportResult extends ApiScenarioReport {
|
||||||
|
|
||||||
private String projectName;
|
private String projectName;
|
||||||
|
|
||||||
|
private String testId;
|
||||||
|
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
|
private List<String> scenarioIds;
|
||||||
|
|
||||||
private String content;
|
private String content;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package io.metersphere.api.dto.automation;
|
||||||
|
|
||||||
|
public enum ExecuteType {
|
||||||
|
Saved, Completed, Debug
|
||||||
|
}
|
|
@ -13,9 +13,13 @@ public class RunScenarioRequest {
|
||||||
|
|
||||||
private String reportId;
|
private String reportId;
|
||||||
|
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
private String environmentId;
|
private String environmentId;
|
||||||
|
|
||||||
private String triggerMode;
|
private String triggerMode;
|
||||||
|
|
||||||
|
private String executeType;
|
||||||
|
|
||||||
private List<String> scenarioIds;
|
private List<String> scenarioIds;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,14 @@ public class RunDefinitionRequest {
|
||||||
|
|
||||||
private String reportId;
|
private String reportId;
|
||||||
|
|
||||||
|
private String projectId;
|
||||||
|
|
||||||
private String environmentId;
|
private String environmentId;
|
||||||
|
|
||||||
private MsTestElement testElement;
|
private MsTestElement testElement;
|
||||||
|
|
||||||
|
private String executeType;
|
||||||
|
|
||||||
private Response response;
|
private Response response;
|
||||||
|
|
||||||
private List<String> bodyUploadIds;
|
private List<String> bodyUploadIds;
|
||||||
|
|
|
@ -11,17 +11,17 @@ import io.metersphere.api.dto.scenario.KeyValue;
|
||||||
import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
|
import io.metersphere.api.dto.scenario.environment.EnvironmentConfig;
|
||||||
import io.metersphere.api.service.ApiAutomationService;
|
import io.metersphere.api.service.ApiAutomationService;
|
||||||
import io.metersphere.api.service.ApiTestEnvironmentService;
|
import io.metersphere.api.service.ApiTestEnvironmentService;
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
|
import io.metersphere.base.domain.ApiTestEnvironmentWithBLOBs;
|
||||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.jmeter.config.Arguments;
|
||||||
import org.apache.jmeter.save.SaveService;
|
import org.apache.jmeter.save.SaveService;
|
||||||
import org.apache.jmeter.testelement.TestElement;
|
import org.apache.jmeter.testelement.TestElement;
|
||||||
import org.apache.jorphan.collections.HashTree;
|
import org.apache.jorphan.collections.HashTree;
|
||||||
import org.apache.jmeter.config.Arguments;
|
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -67,7 +67,7 @@ public class MsScenario extends MsTestElement {
|
||||||
ApiAutomationService apiAutomationService = CommonBeanFactory.getBean(ApiAutomationService.class);
|
ApiAutomationService apiAutomationService = CommonBeanFactory.getBean(ApiAutomationService.class);
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
ApiScenario scenario = apiAutomationService.getApiScenario(this.getId());
|
ApiScenarioWithBLOBs scenario = apiAutomationService.getApiScenario(this.getId());
|
||||||
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
JSONObject element = JSON.parseObject(scenario.getScenarioDefinition());
|
||||||
LinkedList<MsTestElement> elements = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
LinkedList<MsTestElement> elements = mapper.readValue(element.getString("hashTree"), new TypeReference<LinkedList<MsTestElement>>() {
|
||||||
});
|
});
|
||||||
|
|
|
@ -101,7 +101,7 @@ public abstract class MsTestElement {
|
||||||
return baos.toString();
|
return baos.toString();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
LogUtil.warn("HashTree error, can't log jmx content");
|
LogUtil.warn("HashTree error, can't log jmx scenarioDefinition");
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ public abstract class ApiImportAbstractParser implements ApiImportParser {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// if (!hasContentType) {
|
// if (!hasContentType) {
|
||||||
// headers.add(new KeyValue(key, value));
|
// headers.save(new KeyValue(key, value));
|
||||||
// }
|
// }
|
||||||
// request.setHeaders(headers);
|
// request.setHeaders(headers);
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -26,7 +26,6 @@ import io.swagger.models.properties.Property;
|
||||||
import io.swagger.models.properties.RefProperty;
|
import io.swagger.models.properties.RefProperty;
|
||||||
import io.swagger.parser.SwaggerParser;
|
import io.swagger.parser.SwaggerParser;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.jorphan.collections.HashTree;
|
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
@ -80,7 +79,7 @@ public class Swagger2Parser extends ApiImportAbstractParser {
|
||||||
headerManager.setName(res.getName() + "Postman MsHeaderManager");
|
headerManager.setName(res.getName() + "Postman MsHeaderManager");
|
||||||
headerManager.setHeaders(res.getHeaders());
|
headerManager.setHeaders(res.getHeaders());
|
||||||
// HashTree tree = new HashTree();
|
// HashTree tree = new HashTree();
|
||||||
// tree.add(headerManager);
|
// tree.save(headerManager);
|
||||||
LinkedList<MsTestElement> list = new LinkedList<>();
|
LinkedList<MsTestElement> list = new LinkedList<>();
|
||||||
list.add(headerManager);
|
list.add(headerManager);
|
||||||
requestElement.setHashTree(list);
|
requestElement.setHashTree(list);
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.metersphere.api.dto.APIReportResult;
|
|
||||||
import io.metersphere.api.dto.automation.*;
|
import io.metersphere.api.dto.automation.*;
|
||||||
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
import io.metersphere.api.dto.definition.RunDefinitionRequest;
|
||||||
import io.metersphere.api.dto.definition.request.*;
|
import io.metersphere.api.dto.definition.request.*;
|
||||||
|
@ -105,7 +104,7 @@ public class ApiAutomationService {
|
||||||
request.setId(UUID.randomUUID().toString());
|
request.setId(UUID.randomUUID().toString());
|
||||||
checkNameExist(request);
|
checkNameExist(request);
|
||||||
|
|
||||||
final ApiScenario scenario = new ApiScenario();
|
final ApiScenarioWithBLOBs scenario = new ApiScenarioWithBLOBs();
|
||||||
scenario.setId(request.getId());
|
scenario.setId(request.getId());
|
||||||
scenario.setName(request.getName());
|
scenario.setName(request.getName());
|
||||||
scenario.setProjectId(request.getProjectId());
|
scenario.setProjectId(request.getProjectId());
|
||||||
|
@ -142,7 +141,7 @@ public class ApiAutomationService {
|
||||||
List<String> bodyUploadIds = request.getBodyUploadIds();
|
List<String> bodyUploadIds = request.getBodyUploadIds();
|
||||||
apiDefinitionService.createBodyFiles(bodyUploadIds, bodyFiles);
|
apiDefinitionService.createBodyFiles(bodyUploadIds, bodyFiles);
|
||||||
|
|
||||||
final ApiScenario scenario = new ApiScenario();
|
final ApiScenarioWithBLOBs scenario = new ApiScenarioWithBLOBs();
|
||||||
scenario.setId(request.getId());
|
scenario.setId(request.getId());
|
||||||
scenario.setName(request.getName());
|
scenario.setName(request.getName());
|
||||||
scenario.setProjectId(request.getProjectId());
|
scenario.setProjectId(request.getProjectId());
|
||||||
|
@ -181,7 +180,7 @@ public class ApiAutomationService {
|
||||||
|
|
||||||
public void reduction(List<SaveApiScenarioRequest> requests) {
|
public void reduction(List<SaveApiScenarioRequest> requests) {
|
||||||
List<String> apiIds = new ArrayList<>();
|
List<String> apiIds = new ArrayList<>();
|
||||||
requests.forEach(item->{
|
requests.forEach(item -> {
|
||||||
checkNameExist(item);
|
checkNameExist(item);
|
||||||
apiIds.add(item.getId());
|
apiIds.add(item.getId());
|
||||||
});
|
});
|
||||||
|
@ -196,11 +195,11 @@ public class ApiAutomationService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiScenario getApiScenario(String id) {
|
public ApiScenarioWithBLOBs getApiScenario(String id) {
|
||||||
return apiScenarioMapper.selectByPrimaryKey(id);
|
return apiScenarioMapper.selectByPrimaryKey(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ApiScenario> getApiScenarios(List<String> ids) {
|
public List<ApiScenarioWithBLOBs> getApiScenarios(List<String> ids) {
|
||||||
if (CollectionUtils.isNotEmpty(ids)) {
|
if (CollectionUtils.isNotEmpty(ids)) {
|
||||||
return extApiScenarioMapper.selectIds(ids);
|
return extApiScenarioMapper.selectIds(ids);
|
||||||
}
|
}
|
||||||
|
@ -208,7 +207,7 @@ public class ApiAutomationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteTag(String id) {
|
public void deleteTag(String id) {
|
||||||
List<ApiScenario> list = extApiScenarioMapper.selectByTagId(id);
|
List<ApiScenarioWithBLOBs> list = extApiScenarioMapper.selectByTagId(id);
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
Gson gs = new Gson();
|
Gson gs = new Gson();
|
||||||
list.forEach(item -> {
|
list.forEach(item -> {
|
||||||
|
@ -220,17 +219,17 @@ public class ApiAutomationService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createAPIReportResult(String id, String triggerMode) {
|
private void createAPIScenarioReportResult(String id, String triggerMode, String execType, String projectId) {
|
||||||
APIReportResult report = new APIReportResult();
|
APIScenarioReportResult report = new APIScenarioReportResult();
|
||||||
report.setId(id);
|
report.setId(id);
|
||||||
report.setTestId(id);
|
report.setName("测试执行结果");
|
||||||
report.setName("");
|
|
||||||
report.setTriggerMode(null);
|
|
||||||
report.setCreateTime(System.currentTimeMillis());
|
report.setCreateTime(System.currentTimeMillis());
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
report.setStatus(APITestStatus.Running.name());
|
report.setStatus(APITestStatus.Running.name());
|
||||||
report.setUserId(SessionUtils.getUserId());
|
report.setUserId(SessionUtils.getUserId());
|
||||||
report.setTriggerMode(triggerMode);
|
report.setTriggerMode(triggerMode);
|
||||||
|
report.setExecuteType(execType);
|
||||||
|
report.setProjectId(projectId);
|
||||||
apiReportService.addResult(report);
|
apiReportService.addResult(report);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -242,11 +241,11 @@ public class ApiAutomationService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String run(RunScenarioRequest request) {
|
public String run(RunScenarioRequest request) {
|
||||||
List<ApiScenario> apiScenarios = extApiScenarioMapper.selectIds(request.getScenarioIds());
|
List<ApiScenarioWithBLOBs> apiScenarios = extApiScenarioMapper.selectIds(request.getScenarioIds());
|
||||||
MsTestPlan testPlan = new MsTestPlan();
|
MsTestPlan testPlan = new MsTestPlan();
|
||||||
testPlan.setHashTree(new LinkedList<>());
|
testPlan.setHashTree(new LinkedList<>());
|
||||||
HashTree jmeterTestPlanHashTree = new ListedHashTree();
|
HashTree jmeterTestPlanHashTree = new ListedHashTree();
|
||||||
for (ApiScenario item : apiScenarios) {
|
for (ApiScenarioWithBLOBs item : apiScenarios) {
|
||||||
MsThreadGroup group = new MsThreadGroup();
|
MsThreadGroup group = new MsThreadGroup();
|
||||||
group.setLabel(item.getName());
|
group.setLabel(item.getName());
|
||||||
group.setName(item.getName());
|
group.setName(item.getName());
|
||||||
|
@ -280,7 +279,8 @@ public class ApiAutomationService {
|
||||||
// 调用执行方法
|
// 调用执行方法
|
||||||
jMeterService.runDefinition(request.getId(), jmeterTestPlanHashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
jMeterService.runDefinition(request.getId(), jmeterTestPlanHashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
||||||
|
|
||||||
createAPIReportResult(request.getId(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode());
|
createAPIScenarioReportResult(request.getId(), request.getTriggerMode() == null ? ReportTriggerMode.MANUAL.name() : request.getTriggerMode(),
|
||||||
|
request.getExecuteType(), request.getProjectId());
|
||||||
return request.getId();
|
return request.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,7 +305,7 @@ public class ApiAutomationService {
|
||||||
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
HashTree hashTree = request.getTestElement().generateHashTree(config);
|
||||||
// 调用执行方法
|
// 调用执行方法
|
||||||
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
jMeterService.runDefinition(request.getId(), hashTree, request.getReportId(), ApiRunMode.SCENARIO.name());
|
||||||
createAPIReportResult(request.getId(), ReportTriggerMode.MANUAL.name());
|
createAPIScenarioReportResult(request.getId(), ReportTriggerMode.MANUAL.name(), request.getExecuteType(), request.getProjectId());
|
||||||
return request.getId();
|
return request.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,10 +371,10 @@ public class ApiAutomationService {
|
||||||
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
||||||
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
||||||
|
|
||||||
if(firstTime==null || lastTime == null){
|
if (firstTime == null || lastTime == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}else {
|
} else {
|
||||||
return extApiScenarioMapper.countByProjectIDAndCreatInThisWeek(projectId,firstTime.getTime(),lastTime.getTime());
|
return extApiScenarioMapper.countByProjectIDAndCreatInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,10 +2,10 @@ package io.metersphere.api.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.metersphere.api.dto.APIReportResult;
|
|
||||||
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
import io.metersphere.api.dto.DeleteAPIReportRequest;
|
||||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||||
|
import io.metersphere.api.dto.automation.ExecuteType;
|
||||||
import io.metersphere.api.jmeter.TestResult;
|
import io.metersphere.api.jmeter.TestResult;
|
||||||
import io.metersphere.base.domain.*;
|
import io.metersphere.base.domain.*;
|
||||||
import io.metersphere.base.mapper.ApiScenarioMapper;
|
import io.metersphere.base.mapper.ApiScenarioMapper;
|
||||||
|
@ -49,11 +49,12 @@ public class ApiScenarioReportService {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
MSException.throwException(Translator.get("api_report_is_null"));
|
MSException.throwException(Translator.get("api_report_is_null"));
|
||||||
}
|
}
|
||||||
APIReportResult report = (APIReportResult) obj;
|
APIScenarioReportResult report = (APIScenarioReportResult) obj;
|
||||||
// report detail
|
// report detail
|
||||||
ApiTestReportDetail detail = new ApiTestReportDetail();
|
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
||||||
detail.setReportId(result.getTestId());
|
detail.setReportId(result.getTestId());
|
||||||
detail.setTestId(report.getTestId());
|
detail.setProjectId(report.getProjectId());
|
||||||
|
report.setTestId(result.getTestId());
|
||||||
detail.setContent(JSONObject.toJSONString(result).getBytes(StandardCharsets.UTF_8));
|
detail.setContent(JSONObject.toJSONString(result).getBytes(StandardCharsets.UTF_8));
|
||||||
// report
|
// report
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
|
@ -65,11 +66,8 @@ public class ApiScenarioReportService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
report.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
report.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
||||||
cache.put(report.getTestId(), report);
|
this.save(report);
|
||||||
}
|
cache.put(report.getId(), report);
|
||||||
|
|
||||||
public void addResult(APIReportResult res) {
|
|
||||||
cache.put(res.getTestId(), res);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,10 +75,10 @@ public class ApiScenarioReportService {
|
||||||
*
|
*
|
||||||
* @param testId
|
* @param testId
|
||||||
*/
|
*/
|
||||||
public APIReportResult getCacheResult(String testId) {
|
public APIScenarioReportResult getCacheResult(String testId) {
|
||||||
Object res = cache.get(testId);
|
Object res = cache.get(testId);
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
APIReportResult reportResult = (APIReportResult) res;
|
APIScenarioReportResult reportResult = (APIScenarioReportResult) res;
|
||||||
if (!reportResult.getStatus().equals(APITestStatus.Running.name())) {
|
if (!reportResult.getStatus().equals(APITestStatus.Running.name())) {
|
||||||
cache.remove(testId);
|
cache.remove(testId);
|
||||||
}
|
}
|
||||||
|
@ -89,8 +87,13 @@ public class ApiScenarioReportService {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public APIReportResult get(String reportId) {
|
|
||||||
APIReportResult reportResult = extApiScenarioReportMapper.get(reportId);
|
public void addResult(APIScenarioReportResult res) {
|
||||||
|
cache.put(res.getId(), res);
|
||||||
|
}
|
||||||
|
|
||||||
|
public APIScenarioReportResult get(String reportId) {
|
||||||
|
APIScenarioReportResult reportResult = extApiScenarioReportMapper.get(reportId);
|
||||||
ApiScenarioReportDetail detail = apiScenarioReportDetailMapper.selectByPrimaryKey(reportId);
|
ApiScenarioReportDetail detail = apiScenarioReportDetailMapper.selectByPrimaryKey(reportId);
|
||||||
if (detail != null) {
|
if (detail != null) {
|
||||||
reportResult.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
reportResult.setContent(new String(detail.getContent(), StandardCharsets.UTF_8));
|
||||||
|
@ -105,7 +108,7 @@ public class ApiScenarioReportService {
|
||||||
|
|
||||||
private void checkNameExist(APIScenarioReportResult request) {
|
private void checkNameExist(APIScenarioReportResult request) {
|
||||||
ApiScenarioReportExample example = new ApiScenarioReportExample();
|
ApiScenarioReportExample example = new ApiScenarioReportExample();
|
||||||
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()).andIdNotEqualTo(request.getId());
|
example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()).andExecuteTypeEqualTo(ExecuteType.Saved.name()).andIdNotEqualTo(request.getId());
|
||||||
if (apiScenarioReportMapper.countByExample(example) > 0) {
|
if (apiScenarioReportMapper.countByExample(example) > 0) {
|
||||||
MSException.throwException(Translator.get("load_test_already_exists"));
|
MSException.throwException(Translator.get("load_test_already_exists"));
|
||||||
}
|
}
|
||||||
|
@ -123,6 +126,7 @@ public class ApiScenarioReportService {
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
report.setStatus(test.getStatus());
|
report.setStatus(test.getStatus());
|
||||||
report.setUserId(test.getUserId());
|
report.setUserId(test.getUserId());
|
||||||
|
report.setExecuteType(test.getExecuteType());
|
||||||
apiScenarioReportMapper.insert(report);
|
apiScenarioReportMapper.insert(report);
|
||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
@ -139,12 +143,13 @@ public class ApiScenarioReportService {
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
report.setStatus(test.getStatus());
|
report.setStatus(test.getStatus());
|
||||||
report.setUserId(test.getUserId());
|
report.setUserId(test.getUserId());
|
||||||
|
report.setExecuteType(test.getExecuteType());
|
||||||
apiScenarioReportMapper.updateByPrimaryKey(report);
|
apiScenarioReportMapper.updateByPrimaryKey(report);
|
||||||
return report;
|
return report;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String add(APIScenarioReportResult test) {
|
public String save(APIScenarioReportResult test) {
|
||||||
ApiScenarioReport report = createReport(test);
|
ApiScenarioReport report = createReport(test);
|
||||||
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
||||||
TestResult result = JSON.parseObject(test.getContent(), TestResult.class);
|
TestResult result = JSON.parseObject(test.getContent(), TestResult.class);
|
||||||
|
@ -218,10 +223,10 @@ public class ApiScenarioReportService {
|
||||||
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
Date firstTime = startAndEndDateInWeek.get("firstTime");
|
||||||
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
Date lastTime = startAndEndDateInWeek.get("lastTime");
|
||||||
|
|
||||||
if(firstTime==null || lastTime == null){
|
if (firstTime == null || lastTime == null) {
|
||||||
return 0;
|
return 0;
|
||||||
}else {
|
} else {
|
||||||
return extApiScenarioReportMapper.countByProjectIDAndCreateInThisWeek(projectId,firstTime.getTime(),lastTime.getTime());
|
return extApiScenarioReportMapper.countByProjectIDAndCreateInThisWeek(projectId, firstTime.getTime(), lastTime.getTime());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiDefinition implements Serializable {
|
public class ApiDefinition implements Serializable {
|
||||||
|
@ -16,8 +15,6 @@ public class ApiDefinition implements Serializable {
|
||||||
|
|
||||||
private String modulePath;
|
private String modulePath;
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
private String environmentId;
|
private String environmentId;
|
||||||
|
|
||||||
private String schedule;
|
private String schedule;
|
||||||
|
|
|
@ -454,76 +454,6 @@ public class ApiDefinitionExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDescriptionIsNull() {
|
|
||||||
addCriterion("description is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIsNotNull() {
|
|
||||||
addCriterion("description is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionEqualTo(String value) {
|
|
||||||
addCriterion("description =", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotEqualTo(String value) {
|
|
||||||
addCriterion("description <>", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThan(String value) {
|
|
||||||
addCriterion("description >", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description >=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThan(String value) {
|
|
||||||
addCriterion("description <", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description <=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLike(String value) {
|
|
||||||
addCriterion("description like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotLike(String value) {
|
|
||||||
addCriterion("description not like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIn(List<String> values) {
|
|
||||||
addCriterion("description in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotIn(List<String> values) {
|
|
||||||
addCriterion("description not in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
|
||||||
addCriterion("description between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("description not between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andEnvironmentIdIsNull() {
|
public Criteria andEnvironmentIdIsNull() {
|
||||||
addCriterion("environment_id is null");
|
addCriterion("environment_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class ApiDefinitionWithBLOBs extends ApiDefinition implements Serializable {
|
public class ApiDefinitionWithBLOBs extends ApiDefinition implements Serializable {
|
||||||
|
private String description;
|
||||||
|
|
||||||
private String request;
|
private String request;
|
||||||
|
|
||||||
private String response;
|
private String response;
|
||||||
|
|
|
@ -31,8 +31,6 @@ public class ApiScenario implements Serializable {
|
||||||
|
|
||||||
private String schedule;
|
private String schedule;
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
private Long createTime;
|
private Long createTime;
|
||||||
|
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
@ -43,7 +41,5 @@ public class ApiScenario implements Serializable {
|
||||||
|
|
||||||
private String reportId;
|
private String reportId;
|
||||||
|
|
||||||
private String scenarioDefinition;
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -1004,76 +1004,6 @@ public class ApiScenarioExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDescriptionIsNull() {
|
|
||||||
addCriterion("description is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIsNotNull() {
|
|
||||||
addCriterion("description is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionEqualTo(String value) {
|
|
||||||
addCriterion("description =", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotEqualTo(String value) {
|
|
||||||
addCriterion("description <>", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThan(String value) {
|
|
||||||
addCriterion("description >", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description >=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThan(String value) {
|
|
||||||
addCriterion("description <", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description <=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLike(String value) {
|
|
||||||
addCriterion("description like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotLike(String value) {
|
|
||||||
addCriterion("description not like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIn(List<String> values) {
|
|
||||||
addCriterion("description in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotIn(List<String> values) {
|
|
||||||
addCriterion("description not in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
|
||||||
addCriterion("description between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("description not between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeIsNull() {
|
public Criteria andCreateTimeIsNull() {
|
||||||
addCriterion("create_time is null");
|
addCriterion("create_time is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiScenarioReport implements Serializable {
|
public class ApiScenarioReport implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
@ -11,8 +12,6 @@ public class ApiScenarioReport implements Serializable {
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
private Long createTime;
|
private Long createTime;
|
||||||
|
|
||||||
private Long updateTime;
|
private Long updateTime;
|
||||||
|
@ -23,5 +22,9 @@ public class ApiScenarioReport implements Serializable {
|
||||||
|
|
||||||
private String triggerMode;
|
private String triggerMode;
|
||||||
|
|
||||||
|
private String executeType;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
|
@ -314,76 +314,6 @@ public class ApiScenarioReportExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDescriptionIsNull() {
|
|
||||||
addCriterion("description is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIsNotNull() {
|
|
||||||
addCriterion("description is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionEqualTo(String value) {
|
|
||||||
addCriterion("description =", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotEqualTo(String value) {
|
|
||||||
addCriterion("description <>", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThan(String value) {
|
|
||||||
addCriterion("description >", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description >=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThan(String value) {
|
|
||||||
addCriterion("description <", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description <=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLike(String value) {
|
|
||||||
addCriterion("description like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotLike(String value) {
|
|
||||||
addCriterion("description not like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIn(List<String> values) {
|
|
||||||
addCriterion("description in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotIn(List<String> values) {
|
|
||||||
addCriterion("description not in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
|
||||||
addCriterion("description between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("description not between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateTimeIsNull() {
|
public Criteria andCreateTimeIsNull() {
|
||||||
addCriterion("create_time is null");
|
addCriterion("create_time is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
@ -713,6 +643,76 @@ public class ApiScenarioReportExample {
|
||||||
addCriterion("trigger_mode not between", value1, value2, "triggerMode");
|
addCriterion("trigger_mode not between", value1, value2, "triggerMode");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeIsNull() {
|
||||||
|
addCriterion("execute_type is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeIsNotNull() {
|
||||||
|
addCriterion("execute_type is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeEqualTo(String value) {
|
||||||
|
addCriterion("execute_type =", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeNotEqualTo(String value) {
|
||||||
|
addCriterion("execute_type <>", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeGreaterThan(String value) {
|
||||||
|
addCriterion("execute_type >", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeGreaterThanOrEqualTo(String value) {
|
||||||
|
addCriterion("execute_type >=", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeLessThan(String value) {
|
||||||
|
addCriterion("execute_type <", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeLessThanOrEqualTo(String value) {
|
||||||
|
addCriterion("execute_type <=", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeLike(String value) {
|
||||||
|
addCriterion("execute_type like", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeNotLike(String value) {
|
||||||
|
addCriterion("execute_type not like", value, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeIn(List<String> values) {
|
||||||
|
addCriterion("execute_type in", values, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeNotIn(List<String> values) {
|
||||||
|
addCriterion("execute_type not in", values, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeBetween(String value1, String value2) {
|
||||||
|
addCriterion("execute_type between", value1, value2, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andExecuteTypeNotBetween(String value1, String value2) {
|
||||||
|
addCriterion("execute_type not between", value1, value2, "executeType");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ApiScenarioWithBLOBs extends ApiScenario implements Serializable {
|
||||||
|
private String scenarioDefinition;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiTestCase implements Serializable {
|
public class ApiTestCase implements Serializable {
|
||||||
|
@ -16,8 +15,6 @@ public class ApiTestCase implements Serializable {
|
||||||
|
|
||||||
private String apiDefinitionId;
|
private String apiDefinitionId;
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
private String createUserId;
|
private String createUserId;
|
||||||
|
|
||||||
private String updateUserId;
|
private String updateUserId;
|
||||||
|
|
|
@ -454,76 +454,6 @@ public class ApiTestCaseExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andDescriptionIsNull() {
|
|
||||||
addCriterion("description is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIsNotNull() {
|
|
||||||
addCriterion("description is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionEqualTo(String value) {
|
|
||||||
addCriterion("description =", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotEqualTo(String value) {
|
|
||||||
addCriterion("description <>", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThan(String value) {
|
|
||||||
addCriterion("description >", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description >=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThan(String value) {
|
|
||||||
addCriterion("description <", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("description <=", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionLike(String value) {
|
|
||||||
addCriterion("description like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotLike(String value) {
|
|
||||||
addCriterion("description not like", value, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionIn(List<String> values) {
|
|
||||||
addCriterion("description in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotIn(List<String> values) {
|
|
||||||
addCriterion("description not in", values, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionBetween(String value1, String value2) {
|
|
||||||
addCriterion("description between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andDescriptionNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("description not between", value1, value2, "description");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andCreateUserIdIsNull() {
|
public Criteria andCreateUserIdIsNull() {
|
||||||
addCriterion("create_user_id is null");
|
addCriterion("create_user_id is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -9,6 +9,8 @@ import lombok.ToString;
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class ApiTestCaseWithBLOBs extends ApiTestCase implements Serializable {
|
public class ApiTestCaseWithBLOBs extends ApiTestCase implements Serializable {
|
||||||
|
private String description;
|
||||||
|
|
||||||
private String request;
|
private String request;
|
||||||
|
|
||||||
private String response;
|
private String response;
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
package io.metersphere.base.mapper;
|
package io.metersphere.base.mapper;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
|
||||||
import io.metersphere.api.dto.dataCount.response.ApiDataCountDTO;
|
|
||||||
import io.metersphere.base.domain.ApiDefinition;
|
import io.metersphere.base.domain.ApiDefinition;
|
||||||
import io.metersphere.base.domain.ApiDefinitionExample;
|
import io.metersphere.base.domain.ApiDefinitionExample;
|
||||||
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
|
import io.metersphere.base.domain.ApiDefinitionWithBLOBs;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface ApiDefinitionMapper {
|
public interface ApiDefinitionMapper {
|
||||||
long countByExample(ApiDefinitionExample example);
|
long countByExample(ApiDefinitionExample example);
|
||||||
|
@ -38,5 +34,4 @@ public interface ApiDefinitionMapper {
|
||||||
int updateByPrimaryKeyWithBLOBs(ApiDefinitionWithBLOBs record);
|
int updateByPrimaryKeyWithBLOBs(ApiDefinitionWithBLOBs record);
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiDefinition record);
|
int updateByPrimaryKey(ApiDefinition record);
|
||||||
|
|
||||||
}
|
}
|
|
@ -7,7 +7,6 @@
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="method" jdbcType="VARCHAR" property="method" />
|
<result column="method" jdbcType="VARCHAR" property="method" />
|
||||||
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
<result column="module_path" jdbcType="VARCHAR" property="modulePath" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
||||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||||
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
|
@ -19,6 +18,7 @@
|
||||||
<result column="path" jdbcType="VARCHAR" property="path" />
|
<result column="path" jdbcType="VARCHAR" property="path" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||||
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
||||||
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -81,11 +81,11 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, `name`, `method`, module_path, description, environment_id, schedule,
|
id, project_id, `name`, `method`, module_path, environment_id, schedule, `status`,
|
||||||
`status`, module_id, user_id, create_time, update_time, protocol, `path`
|
module_id, user_id, create_time, update_time, protocol, `path`
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
request, response
|
description, request, response
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiDefinitionExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiDefinitionExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
|
@ -137,16 +137,16 @@
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
<insert id="insert" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||||
insert into api_definition (id, project_id, `name`,
|
insert into api_definition (id, project_id, `name`,
|
||||||
`method`, module_path, description,
|
`method`, module_path, environment_id,
|
||||||
environment_id, schedule, `status`,
|
schedule, `status`, module_id,
|
||||||
module_id, user_id, create_time,
|
user_id, create_time, update_time,
|
||||||
update_time, protocol, `path`,
|
protocol, `path`, description,
|
||||||
request, response)
|
request, response)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
#{method,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR}, #{environmentId,jdbcType=VARCHAR},
|
||||||
#{environmentId,jdbcType=VARCHAR}, #{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
#{schedule,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{moduleId,jdbcType=VARCHAR},
|
||||||
#{moduleId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{userId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
|
#{protocol,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR},
|
||||||
#{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR})
|
#{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiDefinitionWithBLOBs">
|
||||||
|
@ -167,9 +167,6 @@
|
||||||
<if test="modulePath != null">
|
<if test="modulePath != null">
|
||||||
module_path,
|
module_path,
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="environmentId != null">
|
<if test="environmentId != null">
|
||||||
environment_id,
|
environment_id,
|
||||||
</if>
|
</if>
|
||||||
|
@ -197,6 +194,9 @@
|
||||||
<if test="path != null">
|
<if test="path != null">
|
||||||
`path`,
|
`path`,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
request,
|
request,
|
||||||
</if>
|
</if>
|
||||||
|
@ -220,9 +220,6 @@
|
||||||
<if test="modulePath != null">
|
<if test="modulePath != null">
|
||||||
#{modulePath,jdbcType=VARCHAR},
|
#{modulePath,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
#{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="environmentId != null">
|
<if test="environmentId != null">
|
||||||
#{environmentId,jdbcType=VARCHAR},
|
#{environmentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -250,6 +247,9 @@
|
||||||
<if test="path != null">
|
<if test="path != null">
|
||||||
#{path,jdbcType=VARCHAR},
|
#{path,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
#{request,jdbcType=LONGVARCHAR},
|
#{request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -282,9 +282,6 @@
|
||||||
<if test="record.modulePath != null">
|
<if test="record.modulePath != null">
|
||||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.description != null">
|
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.environmentId != null">
|
<if test="record.environmentId != null">
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -312,6 +309,9 @@
|
||||||
<if test="record.path != null">
|
<if test="record.path != null">
|
||||||
`path` = #{record.path,jdbcType=VARCHAR},
|
`path` = #{record.path,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.description != null">
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="record.request != null">
|
<if test="record.request != null">
|
||||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -330,7 +330,6 @@
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
`method` = #{record.method,jdbcType=VARCHAR},
|
`method` = #{record.method,jdbcType=VARCHAR},
|
||||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||||
`status` = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
@ -340,6 +339,7 @@
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
protocol = #{record.protocol,jdbcType=VARCHAR},
|
protocol = #{record.protocol,jdbcType=VARCHAR},
|
||||||
`path` = #{record.path,jdbcType=VARCHAR},
|
`path` = #{record.path,jdbcType=VARCHAR},
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
|
@ -353,7 +353,6 @@
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
`method` = #{record.method,jdbcType=VARCHAR},
|
`method` = #{record.method,jdbcType=VARCHAR},
|
||||||
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
module_path = #{record.modulePath,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||||
`status` = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
@ -382,9 +381,6 @@
|
||||||
<if test="modulePath != null">
|
<if test="modulePath != null">
|
||||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="environmentId != null">
|
<if test="environmentId != null">
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -412,6 +408,9 @@
|
||||||
<if test="path != null">
|
<if test="path != null">
|
||||||
`path` = #{path,jdbcType=VARCHAR},
|
`path` = #{path,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
request = #{request,jdbcType=LONGVARCHAR},
|
request = #{request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -427,7 +426,6 @@
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
`method` = #{method,jdbcType=VARCHAR},
|
`method` = #{method,jdbcType=VARCHAR},
|
||||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
schedule = #{schedule,jdbcType=VARCHAR},
|
schedule = #{schedule,jdbcType=VARCHAR},
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
@ -437,6 +435,7 @@
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
protocol = #{protocol,jdbcType=VARCHAR},
|
protocol = #{protocol,jdbcType=VARCHAR},
|
||||||
`path` = #{path,jdbcType=VARCHAR},
|
`path` = #{path,jdbcType=VARCHAR},
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
request = #{request,jdbcType=LONGVARCHAR},
|
request = #{request,jdbcType=LONGVARCHAR},
|
||||||
response = #{response,jdbcType=LONGVARCHAR}
|
response = #{response,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
@ -447,7 +446,6 @@
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
`method` = #{method,jdbcType=VARCHAR},
|
`method` = #{method,jdbcType=VARCHAR},
|
||||||
module_path = #{modulePath,jdbcType=VARCHAR},
|
module_path = #{modulePath,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
schedule = #{schedule,jdbcType=VARCHAR},
|
schedule = #{schedule,jdbcType=VARCHAR},
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
|
|
@ -2,9 +2,9 @@ package io.metersphere.base.mapper;
|
||||||
|
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenario;
|
||||||
import io.metersphere.base.domain.ApiScenarioExample;
|
import io.metersphere.base.domain.ApiScenarioExample;
|
||||||
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
public interface ApiScenarioMapper {
|
public interface ApiScenarioMapper {
|
||||||
long countByExample(ApiScenarioExample example);
|
long countByExample(ApiScenarioExample example);
|
||||||
|
@ -13,26 +13,25 @@ public interface ApiScenarioMapper {
|
||||||
|
|
||||||
int deleteByPrimaryKey(String id);
|
int deleteByPrimaryKey(String id);
|
||||||
|
|
||||||
int insert(ApiScenario record);
|
int insert(ApiScenarioWithBLOBs record);
|
||||||
|
|
||||||
int insertSelective(ApiScenario record);
|
int insertSelective(ApiScenarioWithBLOBs record);
|
||||||
|
|
||||||
List<ApiScenario> selectByExampleWithBLOBs(ApiScenarioExample example);
|
List<ApiScenarioWithBLOBs> selectByExampleWithBLOBs(ApiScenarioExample example);
|
||||||
|
|
||||||
List<ApiScenario> selectByExample(ApiScenarioExample example);
|
List<ApiScenario> selectByExample(ApiScenarioExample example);
|
||||||
|
|
||||||
ApiScenario selectByPrimaryKey(String id);
|
ApiScenarioWithBLOBs selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
int updateByExampleSelective(@Param("record") ApiScenarioWithBLOBs record, @Param("example") ApiScenarioExample example);
|
||||||
|
|
||||||
int updateByExampleWithBLOBs(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
int updateByExampleWithBLOBs(@Param("record") ApiScenarioWithBLOBs record, @Param("example") ApiScenarioExample example);
|
||||||
|
|
||||||
int updateByExample(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
int updateByExample(@Param("record") ApiScenario record, @Param("example") ApiScenarioExample example);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(ApiScenario record);
|
int updateByPrimaryKeySelective(ApiScenarioWithBLOBs record);
|
||||||
|
|
||||||
int updateByPrimaryKeyWithBLOBs(ApiScenario record);
|
int updateByPrimaryKeyWithBLOBs(ApiScenarioWithBLOBs record);
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiScenario record);
|
int updateByPrimaryKey(ApiScenario record);
|
||||||
|
|
||||||
}
|
}
|
|
@ -15,15 +15,15 @@
|
||||||
<result column="step_total" jdbcType="INTEGER" property="stepTotal" />
|
<result column="step_total" jdbcType="INTEGER" property="stepTotal" />
|
||||||
<result column="follow_people" jdbcType="VARCHAR" property="followPeople" />
|
<result column="follow_people" jdbcType="VARCHAR" property="followPeople" />
|
||||||
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
<result column="schedule" jdbcType="VARCHAR" property="schedule" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
<result column="pass_rate" jdbcType="VARCHAR" property="passRate" />
|
<result column="pass_rate" jdbcType="VARCHAR" property="passRate" />
|
||||||
<result column="last_result" jdbcType="VARCHAR" property="lastResult" />
|
<result column="last_result" jdbcType="VARCHAR" property="lastResult" />
|
||||||
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
<result column="report_id" jdbcType="VARCHAR" property="reportId" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenario">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
<result column="scenario_definition" jdbcType="LONGVARCHAR" property="scenarioDefinition" />
|
<result column="scenario_definition" jdbcType="LONGVARCHAR" property="scenarioDefinition" />
|
||||||
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -85,11 +85,11 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, tag_id, user_id, api_scenario_module_id, module_path, `name`, `level`,
|
id, project_id, tag_id, user_id, api_scenario_module_id, module_path, `name`, `level`,
|
||||||
`status`, principal, step_total, follow_people, schedule, description, create_time,
|
`status`, principal, step_total, follow_people, schedule, create_time, update_time,
|
||||||
update_time, pass_rate, last_result, report_id
|
pass_rate, last_result, report_id
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
scenario_definition
|
scenario_definition, description
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
|
@ -139,23 +139,25 @@
|
||||||
<include refid="Example_Where_Clause" />
|
<include refid="Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenario">
|
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
insert into api_scenario (id, project_id, tag_id,
|
insert into api_scenario (id, project_id, tag_id,
|
||||||
user_id, api_scenario_module_id, module_path,
|
user_id, api_scenario_module_id, module_path,
|
||||||
`name`, `level`, `status`,
|
`name`, `level`, `status`,
|
||||||
principal, step_total, follow_people,
|
principal, step_total, follow_people,
|
||||||
schedule, description, create_time,
|
schedule, create_time, update_time,
|
||||||
update_time, pass_rate, last_result,
|
pass_rate, last_result, report_id,
|
||||||
report_id, scenario_definition)
|
scenario_definition, description
|
||||||
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tagId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{tagId,jdbcType=VARCHAR},
|
||||||
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
|
#{userId,jdbcType=VARCHAR}, #{apiScenarioModuleId,jdbcType=VARCHAR}, #{modulePath,jdbcType=VARCHAR},
|
||||||
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR}, #{level,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||||
#{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{followPeople,jdbcType=VARCHAR},
|
#{principal,jdbcType=VARCHAR}, #{stepTotal,jdbcType=INTEGER}, #{followPeople,jdbcType=VARCHAR},
|
||||||
#{schedule,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{schedule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR},
|
#{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||||
#{reportId,jdbcType=VARCHAR}, #{scenarioDefinition,jdbcType=LONGVARCHAR})
|
#{scenarioDefinition,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenario">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
insert into api_scenario
|
insert into api_scenario
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -197,9 +199,6 @@
|
||||||
<if test="schedule != null">
|
<if test="schedule != null">
|
||||||
schedule,
|
schedule,
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
|
@ -218,6 +217,9 @@
|
||||||
<if test="scenarioDefinition != null">
|
<if test="scenarioDefinition != null">
|
||||||
scenario_definition,
|
scenario_definition,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -259,9 +261,6 @@
|
||||||
<if test="schedule != null">
|
<if test="schedule != null">
|
||||||
#{schedule,jdbcType=VARCHAR},
|
#{schedule,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
#{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=BIGINT},
|
#{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -280,6 +279,9 @@
|
||||||
<if test="scenarioDefinition != null">
|
<if test="scenarioDefinition != null">
|
||||||
#{scenarioDefinition,jdbcType=LONGVARCHAR},
|
#{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioExample" resultType="java.lang.Long">
|
||||||
|
@ -330,9 +332,6 @@
|
||||||
<if test="record.schedule != null">
|
<if test="record.schedule != null">
|
||||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.description != null">
|
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
<if test="record.createTime != null">
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -351,6 +350,9 @@
|
||||||
<if test="record.scenarioDefinition != null">
|
<if test="record.scenarioDefinition != null">
|
||||||
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
|
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.description != null">
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
@ -371,13 +373,13 @@
|
||||||
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
||||||
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
||||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||||
last_result = #{record.lastResult,jdbcType=VARCHAR},
|
last_result = #{record.lastResult,jdbcType=VARCHAR},
|
||||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||||
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR}
|
scenario_definition = #{record.scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -397,7 +399,6 @@
|
||||||
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
step_total = #{record.stepTotal,jdbcType=INTEGER},
|
||||||
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
follow_people = #{record.followPeople,jdbcType=VARCHAR},
|
||||||
schedule = #{record.schedule,jdbcType=VARCHAR},
|
schedule = #{record.schedule,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||||
|
@ -407,7 +408,7 @@
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.ApiScenario">
|
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
update api_scenario
|
update api_scenario
|
||||||
<set>
|
<set>
|
||||||
<if test="projectId != null">
|
<if test="projectId != null">
|
||||||
|
@ -446,9 +447,6 @@
|
||||||
<if test="schedule != null">
|
<if test="schedule != null">
|
||||||
schedule = #{schedule,jdbcType=VARCHAR},
|
schedule = #{schedule,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -467,10 +465,13 @@
|
||||||
<if test="scenarioDefinition != null">
|
<if test="scenarioDefinition != null">
|
||||||
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
|
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenario">
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
update api_scenario
|
update api_scenario
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
tag_id = #{tagId,jdbcType=VARCHAR},
|
tag_id = #{tagId,jdbcType=VARCHAR},
|
||||||
|
@ -484,13 +485,13 @@
|
||||||
step_total = #{stepTotal,jdbcType=INTEGER},
|
step_total = #{stepTotal,jdbcType=INTEGER},
|
||||||
follow_people = #{followPeople,jdbcType=VARCHAR},
|
follow_people = #{followPeople,jdbcType=VARCHAR},
|
||||||
schedule = #{schedule,jdbcType=VARCHAR},
|
schedule = #{schedule,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||||
last_result = #{lastResult,jdbcType=VARCHAR},
|
last_result = #{lastResult,jdbcType=VARCHAR},
|
||||||
report_id = #{reportId,jdbcType=VARCHAR},
|
report_id = #{reportId,jdbcType=VARCHAR},
|
||||||
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR}
|
scenario_definition = #{scenarioDefinition,jdbcType=LONGVARCHAR},
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenario">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenario">
|
||||||
|
@ -507,7 +508,6 @@
|
||||||
step_total = #{stepTotal,jdbcType=INTEGER},
|
step_total = #{stepTotal,jdbcType=INTEGER},
|
||||||
follow_people = #{followPeople,jdbcType=VARCHAR},
|
follow_people = #{followPeople,jdbcType=VARCHAR},
|
||||||
schedule = #{schedule,jdbcType=VARCHAR},
|
schedule = #{schedule,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||||
|
|
|
@ -2,9 +2,9 @@ package io.metersphere.base.mapper;
|
||||||
|
|
||||||
import io.metersphere.base.domain.ApiScenarioReport;
|
import io.metersphere.base.domain.ApiScenarioReport;
|
||||||
import io.metersphere.base.domain.ApiScenarioReportExample;
|
import io.metersphere.base.domain.ApiScenarioReportExample;
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ApiScenarioReportMapper {
|
public interface ApiScenarioReportMapper {
|
||||||
long countByExample(ApiScenarioReportExample example);
|
long countByExample(ApiScenarioReportExample example);
|
||||||
|
@ -17,16 +17,21 @@ public interface ApiScenarioReportMapper {
|
||||||
|
|
||||||
int insertSelective(ApiScenarioReport record);
|
int insertSelective(ApiScenarioReport record);
|
||||||
|
|
||||||
|
List<ApiScenarioReport> selectByExampleWithBLOBs(ApiScenarioReportExample example);
|
||||||
|
|
||||||
List<ApiScenarioReport> selectByExample(ApiScenarioReportExample example);
|
List<ApiScenarioReport> selectByExample(ApiScenarioReportExample example);
|
||||||
|
|
||||||
ApiScenarioReport selectByPrimaryKey(String id);
|
ApiScenarioReport selectByPrimaryKey(String id);
|
||||||
|
|
||||||
int updateByExampleSelective(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
int updateByExampleSelective(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||||
|
|
||||||
|
int updateByExampleWithBLOBs(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||||
|
|
||||||
int updateByExample(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
int updateByExample(@Param("record") ApiScenarioReport record, @Param("example") ApiScenarioReportExample example);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(ApiScenarioReport record);
|
int updateByPrimaryKeySelective(ApiScenarioReport record);
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiScenarioReport record);
|
int updateByPrimaryKeyWithBLOBs(ApiScenarioReport record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(ApiScenarioReport record);
|
||||||
}
|
}
|
|
@ -5,12 +5,15 @@
|
||||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||||
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
||||||
<result column="trigger_mode" jdbcType="VARCHAR" property="triggerMode" />
|
<result column="trigger_mode" jdbcType="VARCHAR" property="triggerMode" />
|
||||||
|
<result column="execute_type" jdbcType="VARCHAR" property="executeType" />
|
||||||
|
</resultMap>
|
||||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
|
@ -71,9 +74,28 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, `name`, description, create_time, update_time, `status`, user_id,
|
id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode,
|
||||||
trigger_mode
|
execute_type
|
||||||
</sql>
|
</sql>
|
||||||
|
<sql id="Blob_Column_List">
|
||||||
|
description
|
||||||
|
</sql>
|
||||||
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultMap="ResultMapWithBLOBs">
|
||||||
|
select
|
||||||
|
<if test="distinct">
|
||||||
|
distinct
|
||||||
|
</if>
|
||||||
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
|
from api_scenario_report
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
<if test="orderByClause != null">
|
||||||
|
order by ${orderByClause}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
<if test="distinct">
|
<if test="distinct">
|
||||||
|
@ -88,9 +110,11 @@
|
||||||
order by ${orderByClause}
|
order by ${orderByClause}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
<include refid="Base_Column_List" />
|
<include refid="Base_Column_List" />
|
||||||
|
,
|
||||||
|
<include refid="Blob_Column_List" />
|
||||||
from api_scenario_report
|
from api_scenario_report
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
@ -106,13 +130,13 @@
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
<insert id="insert" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
insert into api_scenario_report (id, project_id, `name`,
|
insert into api_scenario_report (id, project_id, `name`,
|
||||||
description, create_time, update_time,
|
create_time, update_time, `status`,
|
||||||
`status`, user_id, trigger_mode
|
user_id, trigger_mode, execute_type,
|
||||||
)
|
description)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
||||||
#{status,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}
|
#{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{executeType,jdbcType=VARCHAR},
|
||||||
)
|
#{description,jdbcType=LONGVARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
insert into api_scenario_report
|
insert into api_scenario_report
|
||||||
|
@ -126,9 +150,6 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
`name`,
|
`name`,
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
|
@ -144,6 +165,12 @@
|
||||||
<if test="triggerMode != null">
|
<if test="triggerMode != null">
|
||||||
trigger_mode,
|
trigger_mode,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeType != null">
|
||||||
|
execute_type,
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
@ -155,9 +182,6 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
#{name,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
#{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=BIGINT},
|
#{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -173,6 +197,12 @@
|
||||||
<if test="triggerMode != null">
|
<if test="triggerMode != null">
|
||||||
#{triggerMode,jdbcType=VARCHAR},
|
#{triggerMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeType != null">
|
||||||
|
#{executeType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultType="java.lang.Long">
|
<select id="countByExample" parameterType="io.metersphere.base.domain.ApiScenarioReportExample" resultType="java.lang.Long">
|
||||||
|
@ -193,9 +223,6 @@
|
||||||
<if test="record.name != null">
|
<if test="record.name != null">
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.description != null">
|
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createTime != null">
|
<if test="record.createTime != null">
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -211,22 +238,44 @@
|
||||||
<if test="record.triggerMode != null">
|
<if test="record.triggerMode != null">
|
||||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.executeType != null">
|
||||||
|
execute_type = #{record.executeType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="record.description != null">
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||||
|
update api_scenario_report
|
||||||
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||||
|
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||||
|
execute_type = #{record.executeType,jdbcType=VARCHAR},
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||||
|
<if test="_parameter != null">
|
||||||
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
</if>
|
||||||
|
</update>
|
||||||
<update id="updateByExample" parameterType="map">
|
<update id="updateByExample" parameterType="map">
|
||||||
update api_scenario_report
|
update api_scenario_report
|
||||||
set id = #{record.id,jdbcType=VARCHAR},
|
set id = #{record.id,jdbcType=VARCHAR},
|
||||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
`status` = #{record.status,jdbcType=VARCHAR},
|
`status` = #{record.status,jdbcType=VARCHAR},
|
||||||
user_id = #{record.userId,jdbcType=VARCHAR},
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
||||||
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR}
|
trigger_mode = #{record.triggerMode,jdbcType=VARCHAR},
|
||||||
|
execute_type = #{record.executeType,jdbcType=VARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -240,9 +289,6 @@
|
||||||
<if test="name != null">
|
<if test="name != null">
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
@ -258,19 +304,38 @@
|
||||||
<if test="triggerMode != null">
|
<if test="triggerMode != null">
|
||||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="executeType != null">
|
||||||
|
execute_type = #{executeType,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
|
update api_scenario_report
|
||||||
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
|
user_id = #{userId,jdbcType=VARCHAR},
|
||||||
|
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||||
|
execute_type = #{executeType,jdbcType=VARCHAR},
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR}
|
||||||
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
update api_scenario_report
|
update api_scenario_report
|
||||||
set project_id = #{projectId,jdbcType=VARCHAR},
|
set project_id = #{projectId,jdbcType=VARCHAR},
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
`status` = #{status,jdbcType=VARCHAR},
|
`status` = #{status,jdbcType=VARCHAR},
|
||||||
user_id = #{userId,jdbcType=VARCHAR},
|
user_id = #{userId,jdbcType=VARCHAR},
|
||||||
trigger_mode = #{triggerMode,jdbcType=VARCHAR}
|
trigger_mode = #{triggerMode,jdbcType=VARCHAR},
|
||||||
|
execute_type = #{executeType,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,13 +1,10 @@
|
||||||
package io.metersphere.base.mapper;
|
package io.metersphere.base.mapper;
|
||||||
|
|
||||||
import io.metersphere.api.dto.dataCount.ApiDataCountResult;
|
|
||||||
import io.metersphere.base.domain.ApiTestCase;
|
import io.metersphere.base.domain.ApiTestCase;
|
||||||
import io.metersphere.base.domain.ApiTestCaseExample;
|
import io.metersphere.base.domain.ApiTestCaseExample;
|
||||||
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
|
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
public interface ApiTestCaseMapper {
|
public interface ApiTestCaseMapper {
|
||||||
long countByExample(ApiTestCaseExample example);
|
long countByExample(ApiTestCaseExample example);
|
||||||
|
@ -37,5 +34,4 @@ public interface ApiTestCaseMapper {
|
||||||
int updateByPrimaryKeyWithBLOBs(ApiTestCaseWithBLOBs record);
|
int updateByPrimaryKeyWithBLOBs(ApiTestCaseWithBLOBs record);
|
||||||
|
|
||||||
int updateByPrimaryKey(ApiTestCase record);
|
int updateByPrimaryKey(ApiTestCase record);
|
||||||
|
|
||||||
}
|
}
|
|
@ -7,13 +7,13 @@
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||||
<result column="priority" jdbcType="VARCHAR" property="priority" />
|
<result column="priority" jdbcType="VARCHAR" property="priority" />
|
||||||
<result column="api_definition_id" jdbcType="VARCHAR" property="apiDefinitionId" />
|
<result column="api_definition_id" jdbcType="VARCHAR" property="apiDefinitionId" />
|
||||||
<result column="description" jdbcType="VARCHAR" property="description" />
|
|
||||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||||
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
<result column="create_time" jdbcType="BIGINT" property="createTime" />
|
||||||
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||||
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
<result column="request" jdbcType="LONGVARCHAR" property="request" />
|
||||||
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
<result column="response" jdbcType="LONGVARCHAR" property="response" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
@ -76,11 +76,11 @@
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, `name`, priority, api_definition_id, description, create_user_id,
|
id, project_id, `name`, priority, api_definition_id, create_user_id, update_user_id,
|
||||||
update_user_id, create_time, update_time
|
create_time, update_time
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
request, response
|
description, request, response
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiTestCaseExample" resultMap="ResultMapWithBLOBs">
|
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.ApiTestCaseExample" resultMap="ResultMapWithBLOBs">
|
||||||
select
|
select
|
||||||
|
@ -132,14 +132,14 @@
|
||||||
</delete>
|
</delete>
|
||||||
<insert id="insert" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
<insert id="insert" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||||
insert into api_test_case (id, project_id, `name`,
|
insert into api_test_case (id, project_id, `name`,
|
||||||
priority, api_definition_id, description,
|
priority, api_definition_id, create_user_id,
|
||||||
create_user_id, update_user_id, create_time,
|
update_user_id, create_time, update_time,
|
||||||
update_time, request, response
|
description, request, response
|
||||||
)
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
|
#{priority,jdbcType=VARCHAR}, #{apiDefinitionId,jdbcType=VARCHAR}, #{createUserId,jdbcType=VARCHAR},
|
||||||
#{createUserId,jdbcType=VARCHAR}, #{updateUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
#{updateUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||||
#{updateTime,jdbcType=BIGINT}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}
|
#{description,jdbcType=LONGVARCHAR}, #{request,jdbcType=LONGVARCHAR}, #{response,jdbcType=LONGVARCHAR}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiTestCaseWithBLOBs">
|
||||||
|
@ -160,9 +160,6 @@
|
||||||
<if test="apiDefinitionId != null">
|
<if test="apiDefinitionId != null">
|
||||||
api_definition_id,
|
api_definition_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description,
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
<if test="createUserId != null">
|
||||||
create_user_id,
|
create_user_id,
|
||||||
</if>
|
</if>
|
||||||
|
@ -175,6 +172,9 @@
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time,
|
update_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description,
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
request,
|
request,
|
||||||
</if>
|
</if>
|
||||||
|
@ -198,9 +198,6 @@
|
||||||
<if test="apiDefinitionId != null">
|
<if test="apiDefinitionId != null">
|
||||||
#{apiDefinitionId,jdbcType=VARCHAR},
|
#{apiDefinitionId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
#{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
<if test="createUserId != null">
|
||||||
#{createUserId,jdbcType=VARCHAR},
|
#{createUserId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -213,6 +210,9 @@
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
#{updateTime,jdbcType=BIGINT},
|
#{updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
#{request,jdbcType=LONGVARCHAR},
|
#{request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -245,9 +245,6 @@
|
||||||
<if test="record.apiDefinitionId != null">
|
<if test="record.apiDefinitionId != null">
|
||||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.description != null">
|
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.createUserId != null">
|
<if test="record.createUserId != null">
|
||||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -260,6 +257,9 @@
|
||||||
<if test="record.updateTime != null">
|
<if test="record.updateTime != null">
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.description != null">
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="record.request != null">
|
<if test="record.request != null">
|
||||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -278,11 +278,11 @@
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
priority = #{record.priority,jdbcType=VARCHAR},
|
priority = #{record.priority,jdbcType=VARCHAR},
|
||||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||||
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||||
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
request = #{record.request,jdbcType=LONGVARCHAR},
|
request = #{record.request,jdbcType=LONGVARCHAR},
|
||||||
response = #{record.response,jdbcType=LONGVARCHAR}
|
response = #{record.response,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
|
@ -296,7 +296,6 @@
|
||||||
`name` = #{record.name,jdbcType=VARCHAR},
|
`name` = #{record.name,jdbcType=VARCHAR},
|
||||||
priority = #{record.priority,jdbcType=VARCHAR},
|
priority = #{record.priority,jdbcType=VARCHAR},
|
||||||
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{record.apiDefinitionId,jdbcType=VARCHAR},
|
||||||
description = #{record.description,jdbcType=VARCHAR},
|
|
||||||
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
create_user_id = #{record.createUserId,jdbcType=VARCHAR},
|
||||||
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
update_user_id = #{record.updateUserId,jdbcType=VARCHAR},
|
||||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||||
|
@ -320,9 +319,6 @@
|
||||||
<if test="apiDefinitionId != null">
|
<if test="apiDefinitionId != null">
|
||||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
<if test="description != null">
|
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="createUserId != null">
|
<if test="createUserId != null">
|
||||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -335,6 +331,9 @@
|
||||||
<if test="updateTime != null">
|
<if test="updateTime != null">
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="description != null">
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
|
</if>
|
||||||
<if test="request != null">
|
<if test="request != null">
|
||||||
request = #{request,jdbcType=LONGVARCHAR},
|
request = #{request,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -350,11 +349,11 @@
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
priority = #{priority,jdbcType=VARCHAR},
|
priority = #{priority,jdbcType=VARCHAR},
|
||||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
update_time = #{updateTime,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=BIGINT},
|
||||||
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
request = #{request,jdbcType=LONGVARCHAR},
|
request = #{request,jdbcType=LONGVARCHAR},
|
||||||
response = #{response,jdbcType=LONGVARCHAR}
|
response = #{response,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
|
@ -365,7 +364,6 @@
|
||||||
`name` = #{name,jdbcType=VARCHAR},
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
priority = #{priority,jdbcType=VARCHAR},
|
priority = #{priority,jdbcType=VARCHAR},
|
||||||
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
api_definition_id = #{apiDefinitionId,jdbcType=VARCHAR},
|
||||||
description = #{description,jdbcType=VARCHAR},
|
|
||||||
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
create_user_id = #{createUserId,jdbcType=VARCHAR},
|
||||||
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
update_user_id = #{updateUserId,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=BIGINT},
|
||||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.base.mapper.ext;
|
||||||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||||
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
import io.metersphere.api.dto.automation.ApiScenarioRequest;
|
||||||
import io.metersphere.base.domain.ApiScenario;
|
import io.metersphere.base.domain.ApiScenario;
|
||||||
|
import io.metersphere.base.domain.ApiScenarioWithBLOBs;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
@ -11,9 +12,9 @@ import java.util.List;
|
||||||
public interface ExtApiScenarioMapper {
|
public interface ExtApiScenarioMapper {
|
||||||
List<ApiScenarioDTO> list(@Param("request") ApiScenarioRequest request);
|
List<ApiScenarioDTO> list(@Param("request") ApiScenarioRequest request);
|
||||||
|
|
||||||
List<ApiScenario> selectByTagId(@Param("id") String id);
|
List<ApiScenarioWithBLOBs> selectByTagId(@Param("id") String id);
|
||||||
|
|
||||||
List<ApiScenario> selectIds(@Param("ids") List<String> ids);
|
List<ApiScenarioWithBLOBs> selectIds(@Param("ids") List<String> ids);
|
||||||
|
|
||||||
List<ApiScenario> selectReference(@Param("request") ApiScenarioRequest request);
|
List<ApiScenario> selectReference(@Param("request") ApiScenarioRequest request);
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,11 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenario">
|
<select id="selectByTagId" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
select * from api_scenario where tag_id like CONCAT('%', #{id},'%')
|
select * from api_scenario where tag_id like CONCAT('%', #{id},'%')
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenario">
|
<select id="selectIds" resultType="io.metersphere.base.domain.ApiScenarioWithBLOBs">
|
||||||
select * from api_scenario where id in
|
select * from api_scenario where id in
|
||||||
<foreach collection="ids" item="v" separator="," open="(" close=")">
|
<foreach collection="ids" item="v" separator="," open="(" close=")">
|
||||||
#{v}
|
#{v}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
import io.metersphere.api.dto.APIReportResult;
|
|
||||||
import io.metersphere.api.dto.QueryAPIReportRequest;
|
import io.metersphere.api.dto.QueryAPIReportRequest;
|
||||||
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
import io.metersphere.api.dto.automation.APIScenarioReportResult;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
@ -11,7 +10,7 @@ import java.util.List;
|
||||||
public interface ExtApiScenarioReportMapper {
|
public interface ExtApiScenarioReportMapper {
|
||||||
List<APIScenarioReportResult> list(@Param("request") QueryAPIReportRequest request);
|
List<APIScenarioReportResult> list(@Param("request") QueryAPIReportRequest request);
|
||||||
|
|
||||||
APIReportResult get(@Param("reportId") String reportId);
|
APIScenarioReportResult get(@Param("reportId") String reportId);
|
||||||
|
|
||||||
@Select("SELECT count(id) AS countNumber FROM api_scenario_report WHERE project_id = #{0} ")
|
@Select("SELECT count(id) AS countNumber FROM api_scenario_report WHERE project_id = #{0} ")
|
||||||
long countByProjectID(String projectId);
|
long countByProjectID(String projectId);
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
</if>
|
</if>
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
AND r.status != 'Debug'
|
AND r.execute_type = 'Saved'
|
||||||
</where>
|
</where>
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="get" resultType="io.metersphere.api.dto.APIReportResult">
|
<select id="get" resultType="io.metersphere.api.dto.automation.APIScenarioReportResult">
|
||||||
SELECT r.*,r.id As testId, r.name AS test_name, project.name AS project_name, user.name AS user_name
|
SELECT r.*,r.id As testId, r.name AS test_name, project.name AS project_name, user.name AS user_name
|
||||||
FROM api_scenario_report r
|
FROM api_scenario_report r
|
||||||
LEFT JOIN project ON project.id = r.project_id
|
LEFT JOIN project ON project.id = r.project_id
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b5643ac73fb4a2db3f11b23a81848990d8e78703
|
Subproject commit 61397c16728a63493507679f7e0940d9099f337f
|
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE api_scenario_report ADD execute_type varchar(200) NULL;
|
||||||
|
ALTER TABLE api_definition MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test description';
|
||||||
|
ALTER TABLE api_test_case MODIFY COLUMN description LONGTEXT NULL COMMENT 'Test case description';
|
||||||
|
ALTER TABLE api_scenario MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario description';
|
||||||
|
ALTER TABLE api_scenario_report MODIFY COLUMN description LONGTEXT NULL COMMENT 'Api scenario report description';
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<el-tooltip effect="dark" :content="request.responseResult.responseCode" placement="bottom" :open-delay="800">
|
<el-tooltip effect="dark" :content="request.responseResult.responseCode" placement="bottom" :open-delay="800">
|
||||||
<div style="color: #5daf34" v-if="request.responseResult.responseCode==='200'">{{ request.responseResult.responseCode }}</div>
|
<div style="color: #5daf34" v-if="request.success">{{ request.responseResult.responseCode }}</div>
|
||||||
<div style="color: #FE6F71" v-else>{{ request.responseResult.responseCode }}</div>
|
<div style="color: #FE6F71" v-else>{{ request.responseResult.responseCode }}</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
|
@ -199,6 +199,7 @@
|
||||||
let scenarioIds = this.selection;
|
let scenarioIds = this.selection;
|
||||||
run.id = getUUID();
|
run.id = getUUID();
|
||||||
run.scenarioIds = scenarioIds;
|
run.scenarioIds = scenarioIds;
|
||||||
|
run.projectId = getCurrentProjectID();
|
||||||
this.$post(url, run, response => {
|
this.$post(url, run, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.runVisible = true;
|
this.runVisible = true;
|
||||||
|
@ -233,6 +234,7 @@
|
||||||
let scenarioIds = [];
|
let scenarioIds = [];
|
||||||
scenarioIds.push(row.id);
|
scenarioIds.push(row.id);
|
||||||
run.id = getUUID();
|
run.id = getUUID();
|
||||||
|
run.projectId = getCurrentProjectID();
|
||||||
run.scenarioIds = scenarioIds;
|
run.scenarioIds = scenarioIds;
|
||||||
this.$post(url, run, response => {
|
this.$post(url, run, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div></div>
|
<div></div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getUUID} from "@/common/js/utils";
|
import {getUUID, getCurrentProjectID} from "@/common/js/utils";
|
||||||
import {createComponent} from "../../definition/components/jmeter/components";
|
import {createComponent} from "../../definition/components/jmeter/components";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
threadGroup.enableCookieShare = this.runData.enableCookieShare;
|
threadGroup.enableCookieShare = this.runData.enableCookieShare;
|
||||||
threadGroup.hashTree.push(this.runData);
|
threadGroup.hashTree.push(this.runData);
|
||||||
testPlan.hashTree.push(threadGroup);
|
testPlan.hashTree.push(threadGroup);
|
||||||
let reqObj = {id: this.reportId, reportId: this.reportId, environmentId: this.environment, testElement: testPlan};
|
let reqObj = {id: this.reportId, reportId: this.reportId, environmentId: this.environment, testElement: testPlan, projectId: getCurrentProjectID()};
|
||||||
let bodyFiles = this.getBodyUploadFiles(reqObj);
|
let bodyFiles = this.getBodyUploadFiles(reqObj);
|
||||||
let url = "/api/automation/run/debug";
|
let url = "/api/automation/run/debug";
|
||||||
this.$fileUpload(url, null, bodyFiles, reqObj, response => {
|
this.$fileUpload(url, null, bodyFiles, reqObj, response => {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card class="card-content">
|
<el-card class="card-content">
|
||||||
|
<div>
|
||||||
<div class="ms-main-div" @click="showAll">
|
<div class="ms-main-div" @click="showAll">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
|
@ -111,14 +112,16 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</div>
|
||||||
<!-- 场景步骤-->
|
<!-- 场景步骤-->
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
|
<div @click="showAll">
|
||||||
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
<p class="tip">{{$t('api_test.automation.scenario_step')}} </p>
|
||||||
|
</div>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="21">
|
<el-col :span="21">
|
||||||
<!-- 调试部分 -->
|
<!-- 调试部分 -->
|
||||||
<div class="ms-debug-div">
|
<div class="ms-debug-div" @click="showAll">
|
||||||
<el-row style="margin: 5px">
|
<el-row style="margin: 5px">
|
||||||
<el-col :span="6" class="ms-col-one">
|
<el-col :span="6" class="ms-col-one">
|
||||||
{{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}}
|
{{currentScenario.name ===undefined || ''? $t('api_test.scenario.name') : currentScenario.name}}
|
||||||
|
|
|
@ -844,6 +844,7 @@ export class JSR223Processor extends BaseConfig {
|
||||||
this.script = undefined;
|
this.script = undefined;
|
||||||
this.language = "beanshell";
|
this.language = "beanshell";
|
||||||
this.enable = true;
|
this.enable = true;
|
||||||
|
this.hashTree = [];
|
||||||
this.set(options);
|
this.set(options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
this.content = JSON.parse(this.report.content);
|
this.content = JSON.parse(this.report.content);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.log(this.report.content)
|
// console.log(this.report.scenarioDefinition)
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
this.getFails();
|
this.getFails();
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 010ad7a5f072a5e9d368c756a2473bbd20781433
|
Subproject commit d39dafaf84b9c7a56cb51f2caf67dd7dfde5938c
|
Loading…
Reference in New Issue