fix(jenkins): 修复jenkins执行接口用例的问题

This commit is contained in:
CaptainB 2021-11-25 15:29:06 +08:00 committed by 刘瑞斌
parent e5fba069a7
commit 73341ffcac
1 changed files with 5 additions and 0 deletions

View File

@ -801,6 +801,11 @@ public class ApiTestCaseService {
request.setReportId(request.getTestPlanId()); request.setReportId(request.getTestPlanId());
} }
if (StringUtils.equals(request.getRunMode(), ApiRunMode.JENKINS.name())) {
testCaseWithBLOBs = apiTestCaseMapper.selectByPrimaryKey(request.getCaseId());
request.setReportId(request.getEnvironmentId());
}
// 多态JSON普通转换会丢失内容需要通过 ObjectMapper 获取 // 多态JSON普通转换会丢失内容需要通过 ObjectMapper 获取
if (testCaseWithBLOBs != null && StringUtils.isNotEmpty(testCaseWithBLOBs.getRequest())) { if (testCaseWithBLOBs != null && StringUtils.isNotEmpty(testCaseWithBLOBs.getRequest())) {
try { try {