revert(测试跟踪): 功能用例关联了接口测试,执行测试计划功能用例状态未更新
This reverts commit 703d0dafb4
.
This commit is contained in:
parent
c66dd128ce
commit
40eeaec018
|
@ -8,7 +8,10 @@ import io.metersphere.base.mapper.*;
|
|||
import io.metersphere.base.mapper.ext.ExtApiDefinitionExecResultMapper;
|
||||
import io.metersphere.base.mapper.ext.ExtApiTestCaseMapper;
|
||||
import io.metersphere.base.mapper.plan.TestPlanApiCaseMapper;
|
||||
import io.metersphere.commons.constants.*;
|
||||
import io.metersphere.commons.constants.ApiRunMode;
|
||||
import io.metersphere.commons.constants.CommonConstants;
|
||||
import io.metersphere.commons.constants.NoticeConstants;
|
||||
import io.metersphere.commons.constants.TriggerMode;
|
||||
import io.metersphere.commons.enums.ApiReportStatus;
|
||||
import io.metersphere.commons.enums.ExecutionExecuteTypeEnum;
|
||||
import io.metersphere.commons.utils.*;
|
||||
|
@ -17,7 +20,6 @@ import io.metersphere.dto.RequestResult;
|
|||
import io.metersphere.dto.ResultDTO;
|
||||
import io.metersphere.notice.sender.NoticeModel;
|
||||
import io.metersphere.notice.service.NoticeSendService;
|
||||
import io.metersphere.service.MicroService;
|
||||
import io.metersphere.service.ServiceUtils;
|
||||
import io.metersphere.utils.LoggerUtil;
|
||||
import org.apache.commons.beanutils.BeanMap;
|
||||
|
@ -62,8 +64,6 @@ public class ApiDefinitionExecResultService {
|
|||
private ApiCaseExecutionInfoService apiCaseExecutionInfoService;
|
||||
@Resource
|
||||
private ExtApiTestCaseMapper extApiTestCaseMapper;
|
||||
@Resource
|
||||
private MicroService microService;
|
||||
|
||||
/**
|
||||
* API/CASE 重试结果保留一条
|
||||
|
@ -103,15 +103,6 @@ public class ApiDefinitionExecResultService {
|
|||
if (apiTestCase != null) {
|
||||
apiTestCase.setLastResultId(dto.getReportId());
|
||||
apiTestCaseMapper.updateByPrimaryKeySelective(apiTestCase);
|
||||
try {
|
||||
HttpHeaderUtils.runAsUser(result.getUserId());
|
||||
microService.getForData(MicroServiceName.TEST_TRACK,
|
||||
String.format("/test/plan/case/update/case/status/%s/%s/%s/%s",
|
||||
testPlanApiCase.getApiCaseId(), apiTestCase.getName(), testPlanApiCase.getTestPlanId(), "testcase"));
|
||||
HttpHeaderUtils.clearUser();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("auto update test plan api case error.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 发送通知
|
||||
|
@ -344,17 +335,6 @@ public class ApiDefinitionExecResultService {
|
|||
if (apiTestCase != null) {
|
||||
apiTestCase.setLastResultId(dto.getReportId());
|
||||
apiTestCaseMapper.updateByPrimaryKeySelective(apiTestCase);
|
||||
|
||||
try {
|
||||
HttpHeaderUtils.runAsUser(reportResult.getUserId());
|
||||
microService.getForData(MicroServiceName.TEST_TRACK,
|
||||
String.format("/test/plan/case/update/case/status/%s/%s/%s/%s",
|
||||
apiTestCase.getId(), apiTestCase.getName(), apiCase.getTestPlanId(), "testcase"));
|
||||
HttpHeaderUtils.clearUser();
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("auto update test plan api case error.", e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -130,11 +130,6 @@ public class TestPlanTestCaseController {
|
|||
testPlanTestCaseService.deleteTestCaseBath(request);
|
||||
}
|
||||
|
||||
@GetMapping("/update/case/status/{testId}/{testName}/{planId}/{testType}")
|
||||
public void updateCaseStatus(@PathVariable String testId, @PathVariable String testName,@PathVariable String planId,@PathVariable String testType) {
|
||||
testPlanTestCaseService.updateTestCaseStates(testId, testName, planId, testType);
|
||||
}
|
||||
|
||||
@PostMapping("/delete/{id}")
|
||||
@MsAuditLog(module = OperLogModule.TRACK_TEST_PLAN, type = OperLogConstants.UN_ASSOCIATE_CASE, beforeEvent = "#msClass.getLogDetails(#id)", msClass = TestPlanTestCaseService.class)
|
||||
public int deleteTestCase(@PathVariable String id) {
|
||||
|
|
Loading…
Reference in New Issue