fix(测试跟踪): 修复测试试试报告中执行失败的场景用例不显示的问题
--bug=1010005 --user=宋天阳 【测试跟踪】测试计划 - 报告统计,失败用例没显示失败的场景 https://www.tapd.cn/55049933/s/1099026
This commit is contained in:
parent
493ed748f9
commit
4c0f8d2f94
|
@ -248,9 +248,12 @@
|
||||||
api_scenario c
|
api_scenario c
|
||||||
on t.api_scenario_id = c.id and (c.status != 'Trash' or c.status is null)
|
on t.api_scenario_id = c.id and (c.status != 'Trash' or c.status is null)
|
||||||
and t.test_plan_id = #{planId}
|
and t.test_plan_id = #{planId}
|
||||||
<if test="status != null">
|
<if test="status != null and status != 'Fail'">
|
||||||
and t.last_result = #{status}
|
and t.last_result = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="status == 'Fail'">
|
||||||
|
and t.last_result in ('Fail','Error')
|
||||||
|
</if>
|
||||||
where t.test_plan_id = #{planId}
|
where t.test_plan_id = #{planId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -1571,7 +1571,7 @@ public class TestPlanService {
|
||||||
List<TestPlanFailureScenarioDTO> failureScenarios = new ArrayList<>();
|
List<TestPlanFailureScenarioDTO> failureScenarios = new ArrayList<>();
|
||||||
List<TestPlanFailureScenarioDTO> errorReportScenarios = new ArrayList<>();
|
List<TestPlanFailureScenarioDTO> errorReportScenarios = new ArrayList<>();
|
||||||
for (TestPlanFailureScenarioDTO scenario : scenarios) {
|
for (TestPlanFailureScenarioDTO scenario : scenarios) {
|
||||||
if (StringUtils.equalsIgnoreCase(scenario.getLastResult(), "Fail")) {
|
if (StringUtils.equalsAnyIgnoreCase(scenario.getLastResult(), "Fail", "Error")) {
|
||||||
failureScenarios.add(scenario);
|
failureScenarios.add(scenario);
|
||||||
} else if (StringUtils.equalsIgnoreCase(scenario.getLastResult(), ExecuteResult.errorReportResult.name())) {
|
} else if (StringUtils.equalsIgnoreCase(scenario.getLastResult(), ExecuteResult.errorReportResult.name())) {
|
||||||
errorReportScenarios.add(scenario);
|
errorReportScenarios.add(scenario);
|
||||||
|
|
Loading…
Reference in New Issue