fix(测试计划报告): 修复测试计划没有自动更新进度的事情
--bug=1009863 --user=宋天阳 测试计划进度不自动更新 https://www.tapd.cn/55049933/s/1096437
This commit is contained in:
parent
bfc9647498
commit
0a193d6421
|
@ -63,7 +63,9 @@ public class MsThreadGroup extends MsTestElement {
|
||||||
boolean isConnScenarioPost = false;
|
boolean isConnScenarioPost = false;
|
||||||
//获取projectConfig
|
//获取projectConfig
|
||||||
String projectId = this.checkProjectId(hashTree);
|
String projectId = this.checkProjectId(hashTree);
|
||||||
|
if(StringUtils.isNotEmpty(projectId)){
|
||||||
this.checkEnvironmentConfig(projectId,config,hashTree);
|
this.checkEnvironmentConfig(projectId,config,hashTree);
|
||||||
|
}
|
||||||
if (config.getConfig() != null) {
|
if (config.getConfig() != null) {
|
||||||
if (config.isEffective(projectId)) {
|
if (config.isEffective(projectId)) {
|
||||||
EnvironmentConfig environmentConfig = config.getConfig().get(projectId);
|
EnvironmentConfig environmentConfig = config.getConfig().get(projectId);
|
||||||
|
|
|
@ -173,6 +173,7 @@ public class ApiScenarioSerialService {
|
||||||
MsThreadGroup group = new MsThreadGroup();
|
MsThreadGroup group = new MsThreadGroup();
|
||||||
group.setLabel(caseWithBLOBs.getName());
|
group.setLabel(caseWithBLOBs.getName());
|
||||||
group.setName(caseWithBLOBs.getName());
|
group.setName(caseWithBLOBs.getName());
|
||||||
|
group.setProjectId(caseWithBLOBs.getProjectId());
|
||||||
|
|
||||||
MsTestElement testElement = parse(caseWithBLOBs, testId, envId);
|
MsTestElement testElement = parse(caseWithBLOBs, testId, envId);
|
||||||
group.setHashTree(new LinkedList<>());
|
group.setHashTree(new LinkedList<>());
|
||||||
|
|
|
@ -228,6 +228,9 @@ public class ApiScenarioReportStructureService {
|
||||||
if (StringUtils.isNotEmpty(dto.getType()) && requests.contains(dto.getType()) && dto.getValue() == null) {
|
if (StringUtils.isNotEmpty(dto.getType()) && requests.contains(dto.getType()) && dto.getValue() == null) {
|
||||||
RequestResultExpandDTO requestResultExpandDTO = new RequestResultExpandDTO();
|
RequestResultExpandDTO requestResultExpandDTO = new RequestResultExpandDTO();
|
||||||
requestResultExpandDTO.setStatus("unexecute");
|
requestResultExpandDTO.setStatus("unexecute");
|
||||||
|
if(StringUtils.equalsAnyIgnoreCase(dto.getType(),"AbstractSampler")){
|
||||||
|
requestResultExpandDTO.setSuccess(true);
|
||||||
|
}
|
||||||
requestResultExpandDTO.setName(dto.getLabel());
|
requestResultExpandDTO.setName(dto.getLabel());
|
||||||
dto.setValue(requestResultExpandDTO);
|
dto.setValue(requestResultExpandDTO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,6 +279,7 @@
|
||||||
from
|
from
|
||||||
test_plan_api_case
|
test_plan_api_case
|
||||||
where test_plan_id = #{planId}
|
where test_plan_id = #{planId}
|
||||||
|
AND api_case_id in (SELECT id FROM api_test_case WHERE (`status` is null or `status` != 'Trash'))
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getIdsByPlanId" resultType="java.lang.String">
|
<select id="getIdsByPlanId" resultType="java.lang.String">
|
||||||
|
|
|
@ -176,6 +176,7 @@
|
||||||
from
|
from
|
||||||
test_plan_api_scenario
|
test_plan_api_scenario
|
||||||
where test_plan_id = #{planId}
|
where test_plan_id = #{planId}
|
||||||
|
AND api_scenario_id in (SELECT id FROM api_test_case WHERE (`status` is null or `status` != 'Trash'))
|
||||||
</select>
|
</select>
|
||||||
<select id="getIdsByPlanId" resultType="java.lang.String">
|
<select id="getIdsByPlanId" resultType="java.lang.String">
|
||||||
select id
|
select id
|
||||||
|
|
|
@ -277,7 +277,8 @@
|
||||||
inner join test_case on test_plan_test_case.case_id = test_case.id
|
inner join test_case on test_plan_test_case.case_id = test_case.id
|
||||||
left join test_case_node on test_case_node.id = test_case.node_id
|
left join test_case_node on test_case_node.id = test_case.node_id
|
||||||
inner join project on project.id = test_case.project_id
|
inner join project on project.id = test_case.project_id
|
||||||
left join project_version on project_version.id = test_case.version_id and project.id = project_version.project_id
|
left join project_version on project_version.id = test_case.version_id and project.id =
|
||||||
|
project_version.project_id
|
||||||
<include refid="queryWhereCondition"/>
|
<include refid="queryWhereCondition"/>
|
||||||
<if test="request.orders != null and request.orders.size() > 0">
|
<if test="request.orders != null and request.orders.size() > 0">
|
||||||
order by
|
order by
|
||||||
|
@ -418,6 +419,7 @@
|
||||||
select status
|
select status
|
||||||
from test_plan_test_case
|
from test_plan_test_case
|
||||||
where plan_id = #{planId}
|
where plan_id = #{planId}
|
||||||
|
AND case_id in (SELECT id FROM test_case WHERE (`status` is null or `status` != 'Trash'))
|
||||||
</select>
|
</select>
|
||||||
<select id="listByPlanId" resultType="io.metersphere.track.dto.TestPlanCaseDTO">
|
<select id="listByPlanId" resultType="io.metersphere.track.dto.TestPlanCaseDTO">
|
||||||
SELECT test_plan_api_case.id as reportId,test_plan_api_case.api_case_id as id,"definition" as
|
SELECT test_plan_api_case.id as reportId,test_plan_api_case.api_case_id as id,"definition" as
|
||||||
|
@ -492,7 +494,9 @@
|
||||||
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
<include refid="io.metersphere.base.mapper.ext.ExtBaseMapper.orders"/>
|
||||||
</select>
|
</select>
|
||||||
<select id="listTestCaseTest" resultType="io.metersphere.track.dto.TestCaseTestDTO">
|
<select id="listTestCaseTest" resultType="io.metersphere.track.dto.TestCaseTestDTO">
|
||||||
select * from test_case_test where test_case_id = #{caseId};
|
select *
|
||||||
|
from test_case_test
|
||||||
|
where test_case_id = #{caseId};
|
||||||
</select>
|
</select>
|
||||||
<select id="selectIdsByQuery" resultType="java.lang.String">
|
<select id="selectIdsByQuery" resultType="java.lang.String">
|
||||||
select test_plan_test_case.id
|
select test_plan_test_case.id
|
||||||
|
@ -556,10 +560,14 @@
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="selectPlanIds" resultType="java.lang.String">
|
<select id="selectPlanIds" resultType="java.lang.String">
|
||||||
select DISTINCT plan_id from test_plan_test_case;
|
select DISTINCT plan_id
|
||||||
|
from test_plan_test_case;
|
||||||
</select>
|
</select>
|
||||||
<select id="getIdsOrderByUpdateTime" resultType="java.lang.String">
|
<select id="getIdsOrderByUpdateTime" resultType="java.lang.String">
|
||||||
select id from test_plan_test_case where plan_id = #{planId} order by update_time ASC;
|
select id
|
||||||
|
from test_plan_test_case
|
||||||
|
where plan_id = #{planId}
|
||||||
|
order by update_time ASC;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getLastOrder" resultType="java.lang.Long">
|
<select id="getLastOrder" resultType="java.lang.Long">
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
$t('api_test.home_page.detail_card.unexecute')
|
$t('api_test.home_page.detail_card.unexecute')
|
||||||
}}
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag size="mini" v-else-if="request.status && request.status==='unexecute'">{{
|
<el-tag size="mini" v-else-if="!request.success && request.status && request.status==='unexecute'">{{
|
||||||
$t('api_test.home_page.detail_card.unexecute')
|
$t('api_test.home_page.detail_card.unexecute')
|
||||||
}}
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|
Loading…
Reference in New Issue