fix(接口定义) 修复用例全选问题
--bug=1006483 --user=赵勇 【接口测试】case批量执行的时候只执行了第一页的case https://www.tapd.cn/55049933/s/1051212
This commit is contained in:
parent
2bcfbd5a4d
commit
a5605230c7
|
@ -1,5 +1,6 @@
|
|||
package io.metersphere.api.dto;
|
||||
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.base.domain.ApiTestCaseWithBLOBs;
|
||||
import io.metersphere.controller.request.BaseQueryRequest;
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
|
@ -15,5 +16,5 @@ public class ApiCaseBatchRequest extends ApiTestCaseWithBLOBs {
|
|||
private List<OrderRequest> orders;
|
||||
private String projectId;
|
||||
private String environmentId;
|
||||
private BaseQueryRequest condition;
|
||||
private ApiTestCaseRequest condition;
|
||||
}
|
||||
|
|
|
@ -701,7 +701,7 @@ public class ApiTestCaseService {
|
|||
|
||||
public void batchRun(ApiCaseBatchRequest request) {
|
||||
ServiceUtils.getSelectAllIds(request, request.getCondition(),
|
||||
(query) -> extApiTestCaseMapper.selectIdsByQuery(query));
|
||||
(query) -> extApiTestCaseMapper.selectIdsByQuery((ApiTestCaseRequest)query));
|
||||
Map<String, ApiDefinitionExecResult> executeQueue = new HashMap<>();
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
|
||||
ApiDefinitionExecResultMapper batchMapper = sqlSession.getMapper(ApiDefinitionExecResultMapper.class);
|
||||
|
|
|
@ -48,7 +48,7 @@ public interface ExtApiTestCaseMapper {
|
|||
List<String> selectNameByIdIn(@Param("ids")List<String> ids);
|
||||
String selectNameById(String id);
|
||||
|
||||
List<String> selectIdsByQuery(BaseQueryRequest query);
|
||||
List<String> selectIdsByQuery(@Param("request") ApiTestCaseRequest request);
|
||||
|
||||
List<String> selectProjectIds();
|
||||
|
||||
|
|
|
@ -508,9 +508,15 @@ export default {
|
|||
this.$refs.batchRun.open();
|
||||
},
|
||||
runBatch(environment) {
|
||||
this.condition.environmentId = environment.id;
|
||||
this.condition.ids = this.$refs.caseTable.selectIds;
|
||||
this.$post('/api/testcase/batch/run', this.condition, () => {
|
||||
let obj = {};
|
||||
obj.projectId = this.projectId;
|
||||
obj.selectAllDate = this.selectAll;
|
||||
obj.unSelectIds = this.unSelection;
|
||||
obj.ids = Array.from(this.selectRows).map(row => row.id);
|
||||
obj.environmentId = environment.id;
|
||||
obj.condition = this.condition;
|
||||
|
||||
this.$post('/api/testcase/batch/run', obj, () => {
|
||||
this.condition.ids = [];
|
||||
this.$refs.batchRun.close();
|
||||
this.search();
|
||||
|
|
Loading…
Reference in New Issue