fix(接口自动化): 修复测试用例模块匹配问题。

This commit is contained in:
fit2-zhao 2021-06-16 15:41:50 +08:00 committed by fit2-zhao
parent f9db1b51da
commit e958370006
1 changed files with 11 additions and 6 deletions

View File

@ -635,12 +635,17 @@ public class MsHTTPSamplerProxy extends MsTestElement {
} else {
apiDefinition = apiDefinitionService.get(this.getId());
if (apiDefinition == null) {
TestPlanApiCaseService testPlanApiCaseService = CommonBeanFactory.getBean(TestPlanApiCaseService.class);
TestPlanApiCase testPlanApiCase = testPlanApiCaseService.getById(this.getId());
if (testPlanApiCase != null) {
ApiTestCaseWithBLOBs caseWithBLOBs = apiTestCaseService.get(testPlanApiCase.getApiCaseId());
if (caseWithBLOBs != null) {
apiDefinition = apiDefinitionService.get(caseWithBLOBs.getApiDefinitionId());
ApiTestCaseWithBLOBs apiTestCaseWithBLOBs = apiTestCaseService.get(this.getId());
if (apiTestCaseWithBLOBs != null) {
apiDefinition = apiDefinitionService.get(apiTestCaseWithBLOBs.getApiDefinitionId());
} else {
TestPlanApiCaseService testPlanApiCaseService = CommonBeanFactory.getBean(TestPlanApiCaseService.class);
TestPlanApiCase testPlanApiCase = testPlanApiCaseService.getById(this.getId());
if (testPlanApiCase != null) {
ApiTestCaseWithBLOBs caseWithBLOBs = apiTestCaseService.get(testPlanApiCase.getApiCaseId());
if (caseWithBLOBs != null) {
apiDefinition = apiDefinitionService.get(caseWithBLOBs.getApiDefinitionId());
}
}
}
}