测试计划关联测试报告界面调整
This commit is contained in:
@@ -68,16 +68,22 @@ public class TestReportServiceImpl implements ITestReportService {
|
||||
List<TestCaseResult> testCaseResults = testCaseResultMapper.selectTestCaseResultList(testCaseResult);
|
||||
int count = testCaseResults.size();
|
||||
int passNum = (int)testCaseResults.stream().filter(result -> "成功".equals(result.getStatus())).count();
|
||||
if (count == passNum) {
|
||||
testReportAddQO.setResult("1");
|
||||
}
|
||||
TestCaseReportVO testCaseReportVO = new TestCaseReportVO();
|
||||
testCaseReportVO.setName(testReportAddQO.getName());
|
||||
testCaseReportVO.setResult("success");
|
||||
testCaseReportVO.setResult("0");
|
||||
testCaseReportVO.setCaseNum(count);
|
||||
testCaseReportVO.setPassNum(passNum);
|
||||
String reportJson = JSONObject.toJSONString(testCaseReportVO);
|
||||
TestReport testReport = new TestReport();
|
||||
if (count == passNum) {
|
||||
testReport.setResult("1");
|
||||
}
|
||||
BeanUtils.copyProperties(testReportAddQO,testReport);
|
||||
testReport.setSerialNumber(generateSerialNumber());
|
||||
testReport.setResult("1");
|
||||
testReport.setResult("0");
|
||||
testReport.setStatus("0");
|
||||
testReport.setReport(reportJson);
|
||||
testReport.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
Reference in New Issue
Block a user