fix(测试跟踪): 修复测试计划失败重跑时基础信息没有重新统计的问题
--bug=1015262 --user=宋天阳 【测试跟踪】接口 测试失败重跑后,测试计划报告的通过率没更新 https://www.tapd.cn/55049933/s/1209613
This commit is contained in:
parent
9f9f678760
commit
60725f475c
|
@ -21,5 +21,7 @@ public interface ExtTestPlanReportMapper {
|
||||||
@MapKey("id")
|
@MapKey("id")
|
||||||
Map<String, ParamsDTO> reportCount(@Param("planIds") Set<String> planIds);
|
Map<String, ParamsDTO> reportCount(@Param("planIds") Set<String> planIds);
|
||||||
|
|
||||||
|
void setApiBaseCountAndPassRateIsNullById(String id);
|
||||||
|
|
||||||
void updateAllStatus();
|
void updateAllStatus();
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,6 +154,13 @@
|
||||||
GROUP BY t.test_plan_id
|
GROUP BY t.test_plan_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="setApiBaseCountAndPassRateIsNullById">
|
||||||
|
update test_plan_report_content
|
||||||
|
SET api_base_count = NULL AND pass_rate = NULL
|
||||||
|
WHERE id = #{0}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updateAllStatus">
|
<update id="updateAllStatus">
|
||||||
update test_plan_report set status="COMPLETED" where status in ('Rerunning','Running')
|
update test_plan_report set status="COMPLETED" where status in ('Rerunning','Running')
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -540,6 +540,9 @@ public class TestPlanReportService {
|
||||||
List<TestPlanReportContentWithBLOBs> contents = testPlanReportContentMapper.selectByExampleWithBLOBs(contentExample);
|
List<TestPlanReportContentWithBLOBs> contents = testPlanReportContentMapper.selectByExampleWithBLOBs(contentExample);
|
||||||
if (CollectionUtils.isNotEmpty(contents)) {
|
if (CollectionUtils.isNotEmpty(contents)) {
|
||||||
content = contents.get(0);
|
content = contents.get(0);
|
||||||
|
content.setApiBaseCount(null);
|
||||||
|
content.setPassRate(null);
|
||||||
|
extTestPlanReportMapper.setApiBaseCountAndPassRateIsNullById(content.getId());
|
||||||
}
|
}
|
||||||
if (content != null) {
|
if (content != null) {
|
||||||
//更新content表对结束日期
|
//更新content表对结束日期
|
||||||
|
|
Loading…
Reference in New Issue