添加性能测试创建人和报告创建人

This commit is contained in:
shiziyuan9527 2020-05-25 14:31:16 +08:00
parent afcd60c6f7
commit 928539f1c1
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper;
import io.metersphere.commons.constants.PerformanceTestStatus;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.LogUtil;
import io.metersphere.commons.utils.SessionUtils;
import io.metersphere.dto.DashboardTestDTO;
import io.metersphere.dto.LoadTestDTO;
import io.metersphere.i18n.Translator;
@ -127,6 +128,7 @@ public class PerformanceTestService {
}
final LoadTestWithBLOBs loadTest = new LoadTestWithBLOBs();
loadTest.setUserId(SessionUtils.getUser().getId());
loadTest.setId(UUID.randomUUID().toString());
loadTest.setName(request.getName());
loadTest.setProjectId(request.getProjectId());
@ -210,6 +212,7 @@ public class PerformanceTestService {
testReport.setUpdateTime(engine.getStartTime());
testReport.setTestId(loadTest.getId());
testReport.setName(loadTest.getName());
testReport.setUserId(SessionUtils.getUser().getId());
// 启动测试
try {