refactor(测试计划): 移除失败重试相关配置&&补充报告功能用例执行详情
This commit is contained in:
parent
09d8a97398
commit
1b6938e013
|
@ -66,17 +66,10 @@ public class TestPlanCollection implements Serializable {
|
||||||
@NotNull(message = "{test_plan_collection.retry_on_fail.not_blank}", groups = {Created.class})
|
@NotNull(message = "{test_plan_collection.retry_on_fail.not_blank}", groups = {Created.class})
|
||||||
private Boolean retryOnFail;
|
private Boolean retryOnFail;
|
||||||
|
|
||||||
@Schema(description = "失败重试类型(步骤/场景)", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "失败重试次数")
|
||||||
@NotBlank(message = "{test_plan_collection.retry_type.not_blank}", groups = {Created.class})
|
|
||||||
@Size(min = 1, max = 50, message = "{test_plan_collection.retry_type.length_range}", groups = {Created.class, Updated.class})
|
|
||||||
private String retryType;
|
|
||||||
|
|
||||||
@Schema(description = "失败重试次数", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotNull(message = "{test_plan_collection.retry_times.not_blank}", groups = {Created.class})
|
|
||||||
private Integer retryTimes;
|
private Integer retryTimes;
|
||||||
|
|
||||||
@Schema(description = "失败重试间隔(单位: ms)", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "失败重试间隔(单位: ms)")
|
||||||
@NotNull(message = "{test_plan_collection.retry_interval.not_blank}", groups = {Created.class})
|
|
||||||
private Integer retryInterval;
|
private Integer retryInterval;
|
||||||
|
|
||||||
@Schema(description = "是否失败停止", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "是否失败停止", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ -107,7 +100,6 @@ public class TestPlanCollection implements Serializable {
|
||||||
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
environmentId("environment_id", "environmentId", "VARCHAR", false),
|
||||||
testResourcePoolId("test_resource_pool_id", "testResourcePoolId", "VARCHAR", false),
|
testResourcePoolId("test_resource_pool_id", "testResourcePoolId", "VARCHAR", false),
|
||||||
retryOnFail("retry_on_fail", "retryOnFail", "BIT", false),
|
retryOnFail("retry_on_fail", "retryOnFail", "BIT", false),
|
||||||
retryType("retry_type", "retryType", "VARCHAR", false),
|
|
||||||
retryTimes("retry_times", "retryTimes", "INTEGER", false),
|
retryTimes("retry_times", "retryTimes", "INTEGER", false),
|
||||||
retryInterval("retry_interval", "retryInterval", "INTEGER", false),
|
retryInterval("retry_interval", "retryInterval", "INTEGER", false),
|
||||||
stopOnFail("stop_on_fail", "stopOnFail", "BIT", false),
|
stopOnFail("stop_on_fail", "stopOnFail", "BIT", false),
|
||||||
|
|
|
@ -844,76 +844,6 @@ public class TestPlanCollectionExample {
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Criteria andRetryTypeIsNull() {
|
|
||||||
addCriterion("retry_type is null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeIsNotNull() {
|
|
||||||
addCriterion("retry_type is not null");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeEqualTo(String value) {
|
|
||||||
addCriterion("retry_type =", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeNotEqualTo(String value) {
|
|
||||||
addCriterion("retry_type <>", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeGreaterThan(String value) {
|
|
||||||
addCriterion("retry_type >", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeGreaterThanOrEqualTo(String value) {
|
|
||||||
addCriterion("retry_type >=", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeLessThan(String value) {
|
|
||||||
addCriterion("retry_type <", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeLessThanOrEqualTo(String value) {
|
|
||||||
addCriterion("retry_type <=", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeLike(String value) {
|
|
||||||
addCriterion("retry_type like", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeNotLike(String value) {
|
|
||||||
addCriterion("retry_type not like", value, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeIn(List<String> values) {
|
|
||||||
addCriterion("retry_type in", values, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeNotIn(List<String> values) {
|
|
||||||
addCriterion("retry_type not in", values, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeBetween(String value1, String value2) {
|
|
||||||
addCriterion("retry_type between", value1, value2, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTypeNotBetween(String value1, String value2) {
|
|
||||||
addCriterion("retry_type not between", value1, value2, "retryType");
|
|
||||||
return (Criteria) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Criteria andRetryTimesIsNull() {
|
public Criteria andRetryTimesIsNull() {
|
||||||
addCriterion("retry_times is null");
|
addCriterion("retry_times is null");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
<result column="environment_id" jdbcType="VARCHAR" property="environmentId" />
|
||||||
<result column="test_resource_pool_id" jdbcType="VARCHAR" property="testResourcePoolId" />
|
<result column="test_resource_pool_id" jdbcType="VARCHAR" property="testResourcePoolId" />
|
||||||
<result column="retry_on_fail" jdbcType="BIT" property="retryOnFail" />
|
<result column="retry_on_fail" jdbcType="BIT" property="retryOnFail" />
|
||||||
<result column="retry_type" jdbcType="VARCHAR" property="retryType" />
|
|
||||||
<result column="retry_times" jdbcType="INTEGER" property="retryTimes" />
|
<result column="retry_times" jdbcType="INTEGER" property="retryTimes" />
|
||||||
<result column="retry_interval" jdbcType="INTEGER" property="retryInterval" />
|
<result column="retry_interval" jdbcType="INTEGER" property="retryInterval" />
|
||||||
<result column="stop_on_fail" jdbcType="BIT" property="stopOnFail" />
|
<result column="stop_on_fail" jdbcType="BIT" property="stopOnFail" />
|
||||||
|
@ -81,7 +80,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, test_plan_id, parent_id, `name`, `type`, execute_method, extended, grouped, environment_id,
|
id, test_plan_id, parent_id, `name`, `type`, execute_method, extended, grouped, environment_id,
|
||||||
test_resource_pool_id, retry_on_fail, retry_type, retry_times, retry_interval, stop_on_fail,
|
test_resource_pool_id, retry_on_fail, retry_times, retry_interval, stop_on_fail,
|
||||||
create_user, create_time, pos
|
create_user, create_time, pos
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanCollectionExample" resultMap="BaseResultMap">
|
<select id="selectByExample" parameterType="io.metersphere.plan.domain.TestPlanCollectionExample" resultMap="BaseResultMap">
|
||||||
|
@ -118,17 +117,15 @@
|
||||||
insert into test_plan_collection (id, test_plan_id, parent_id,
|
insert into test_plan_collection (id, test_plan_id, parent_id,
|
||||||
`name`, `type`, execute_method,
|
`name`, `type`, execute_method,
|
||||||
extended, grouped, environment_id,
|
extended, grouped, environment_id,
|
||||||
test_resource_pool_id, retry_on_fail, retry_type,
|
test_resource_pool_id, retry_on_fail, retry_times,
|
||||||
retry_times, retry_interval, stop_on_fail,
|
retry_interval, stop_on_fail, create_user,
|
||||||
create_user, create_time, pos
|
create_time, pos)
|
||||||
)
|
|
||||||
values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR},
|
||||||
#{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{executeMethod,jdbcType=VARCHAR},
|
#{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{executeMethod,jdbcType=VARCHAR},
|
||||||
#{extended,jdbcType=BIT}, #{grouped,jdbcType=BIT}, #{environmentId,jdbcType=VARCHAR},
|
#{extended,jdbcType=BIT}, #{grouped,jdbcType=BIT}, #{environmentId,jdbcType=VARCHAR},
|
||||||
#{testResourcePoolId,jdbcType=VARCHAR}, #{retryOnFail,jdbcType=BIT}, #{retryType,jdbcType=VARCHAR},
|
#{testResourcePoolId,jdbcType=VARCHAR}, #{retryOnFail,jdbcType=BIT}, #{retryTimes,jdbcType=INTEGER},
|
||||||
#{retryTimes,jdbcType=INTEGER}, #{retryInterval,jdbcType=INTEGER}, #{stopOnFail,jdbcType=BIT},
|
#{retryInterval,jdbcType=INTEGER}, #{stopOnFail,jdbcType=BIT}, #{createUser,jdbcType=VARCHAR},
|
||||||
#{createUser,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{pos,jdbcType=BIGINT}
|
#{createTime,jdbcType=BIGINT}, #{pos,jdbcType=BIGINT})
|
||||||
)
|
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanCollection">
|
<insert id="insertSelective" parameterType="io.metersphere.plan.domain.TestPlanCollection">
|
||||||
insert into test_plan_collection
|
insert into test_plan_collection
|
||||||
|
@ -166,9 +163,6 @@
|
||||||
<if test="retryOnFail != null">
|
<if test="retryOnFail != null">
|
||||||
retry_on_fail,
|
retry_on_fail,
|
||||||
</if>
|
</if>
|
||||||
<if test="retryType != null">
|
|
||||||
retry_type,
|
|
||||||
</if>
|
|
||||||
<if test="retryTimes != null">
|
<if test="retryTimes != null">
|
||||||
retry_times,
|
retry_times,
|
||||||
</if>
|
</if>
|
||||||
|
@ -222,9 +216,6 @@
|
||||||
<if test="retryOnFail != null">
|
<if test="retryOnFail != null">
|
||||||
#{retryOnFail,jdbcType=BIT},
|
#{retryOnFail,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="retryType != null">
|
|
||||||
#{retryType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="retryTimes != null">
|
<if test="retryTimes != null">
|
||||||
#{retryTimes,jdbcType=INTEGER},
|
#{retryTimes,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
@ -287,9 +278,6 @@
|
||||||
<if test="record.retryOnFail != null">
|
<if test="record.retryOnFail != null">
|
||||||
retry_on_fail = #{record.retryOnFail,jdbcType=BIT},
|
retry_on_fail = #{record.retryOnFail,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="record.retryType != null">
|
|
||||||
retry_type = #{record.retryType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="record.retryTimes != null">
|
<if test="record.retryTimes != null">
|
||||||
retry_times = #{record.retryTimes,jdbcType=INTEGER},
|
retry_times = #{record.retryTimes,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
@ -326,7 +314,6 @@
|
||||||
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
environment_id = #{record.environmentId,jdbcType=VARCHAR},
|
||||||
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
test_resource_pool_id = #{record.testResourcePoolId,jdbcType=VARCHAR},
|
||||||
retry_on_fail = #{record.retryOnFail,jdbcType=BIT},
|
retry_on_fail = #{record.retryOnFail,jdbcType=BIT},
|
||||||
retry_type = #{record.retryType,jdbcType=VARCHAR},
|
|
||||||
retry_times = #{record.retryTimes,jdbcType=INTEGER},
|
retry_times = #{record.retryTimes,jdbcType=INTEGER},
|
||||||
retry_interval = #{record.retryInterval,jdbcType=INTEGER},
|
retry_interval = #{record.retryInterval,jdbcType=INTEGER},
|
||||||
stop_on_fail = #{record.stopOnFail,jdbcType=BIT},
|
stop_on_fail = #{record.stopOnFail,jdbcType=BIT},
|
||||||
|
@ -370,9 +357,6 @@
|
||||||
<if test="retryOnFail != null">
|
<if test="retryOnFail != null">
|
||||||
retry_on_fail = #{retryOnFail,jdbcType=BIT},
|
retry_on_fail = #{retryOnFail,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
<if test="retryType != null">
|
|
||||||
retry_type = #{retryType,jdbcType=VARCHAR},
|
|
||||||
</if>
|
|
||||||
<if test="retryTimes != null">
|
<if test="retryTimes != null">
|
||||||
retry_times = #{retryTimes,jdbcType=INTEGER},
|
retry_times = #{retryTimes,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
@ -406,7 +390,6 @@
|
||||||
environment_id = #{environmentId,jdbcType=VARCHAR},
|
environment_id = #{environmentId,jdbcType=VARCHAR},
|
||||||
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
test_resource_pool_id = #{testResourcePoolId,jdbcType=VARCHAR},
|
||||||
retry_on_fail = #{retryOnFail,jdbcType=BIT},
|
retry_on_fail = #{retryOnFail,jdbcType=BIT},
|
||||||
retry_type = #{retryType,jdbcType=VARCHAR},
|
|
||||||
retry_times = #{retryTimes,jdbcType=INTEGER},
|
retry_times = #{retryTimes,jdbcType=INTEGER},
|
||||||
retry_interval = #{retryInterval,jdbcType=INTEGER},
|
retry_interval = #{retryInterval,jdbcType=INTEGER},
|
||||||
stop_on_fail = #{stopOnFail,jdbcType=BIT},
|
stop_on_fail = #{stopOnFail,jdbcType=BIT},
|
||||||
|
@ -418,17 +401,17 @@
|
||||||
<insert id="batchInsert" parameterType="map">
|
<insert id="batchInsert" parameterType="map">
|
||||||
insert into test_plan_collection
|
insert into test_plan_collection
|
||||||
(id, test_plan_id, parent_id, `name`, `type`, execute_method, extended, grouped,
|
(id, test_plan_id, parent_id, `name`, `type`, execute_method, extended, grouped,
|
||||||
environment_id, test_resource_pool_id, retry_on_fail, retry_type, retry_times,
|
environment_id, test_resource_pool_id, retry_on_fail, retry_times, retry_interval,
|
||||||
retry_interval, stop_on_fail, create_user, create_time, pos)
|
stop_on_fail, create_user, create_time, pos)
|
||||||
values
|
values
|
||||||
<foreach collection="list" item="item" separator=",">
|
<foreach collection="list" item="item" separator=",">
|
||||||
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.parentId,jdbcType=VARCHAR},
|
(#{item.id,jdbcType=VARCHAR}, #{item.testPlanId,jdbcType=VARCHAR}, #{item.parentId,jdbcType=VARCHAR},
|
||||||
#{item.name,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.executeMethod,jdbcType=VARCHAR},
|
#{item.name,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.executeMethod,jdbcType=VARCHAR},
|
||||||
#{item.extended,jdbcType=BIT}, #{item.grouped,jdbcType=BIT}, #{item.environmentId,jdbcType=VARCHAR},
|
#{item.extended,jdbcType=BIT}, #{item.grouped,jdbcType=BIT}, #{item.environmentId,jdbcType=VARCHAR},
|
||||||
#{item.testResourcePoolId,jdbcType=VARCHAR}, #{item.retryOnFail,jdbcType=BIT},
|
#{item.testResourcePoolId,jdbcType=VARCHAR}, #{item.retryOnFail,jdbcType=BIT},
|
||||||
#{item.retryType,jdbcType=VARCHAR}, #{item.retryTimes,jdbcType=INTEGER}, #{item.retryInterval,jdbcType=INTEGER},
|
#{item.retryTimes,jdbcType=INTEGER}, #{item.retryInterval,jdbcType=INTEGER}, #{item.stopOnFail,jdbcType=BIT},
|
||||||
#{item.stopOnFail,jdbcType=BIT}, #{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT},
|
#{item.createUser,jdbcType=VARCHAR}, #{item.createTime,jdbcType=BIGINT}, #{item.pos,jdbcType=BIGINT}
|
||||||
#{item.pos,jdbcType=BIGINT})
|
)
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="batchInsertSelective" parameterType="map">
|
<insert id="batchInsertSelective" parameterType="map">
|
||||||
|
@ -474,9 +457,6 @@
|
||||||
<if test="'retry_on_fail'.toString() == column.value">
|
<if test="'retry_on_fail'.toString() == column.value">
|
||||||
#{item.retryOnFail,jdbcType=BIT}
|
#{item.retryOnFail,jdbcType=BIT}
|
||||||
</if>
|
</if>
|
||||||
<if test="'retry_type'.toString() == column.value">
|
|
||||||
#{item.retryType,jdbcType=VARCHAR}
|
|
||||||
</if>
|
|
||||||
<if test="'retry_times'.toString() == column.value">
|
<if test="'retry_times'.toString() == column.value">
|
||||||
#{item.retryTimes,jdbcType=INTEGER}
|
#{item.retryTimes,jdbcType=INTEGER}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -98,9 +98,8 @@ CREATE TABLE IF NOT EXISTS test_plan_collection(
|
||||||
`environment_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '环境ID/环境组ID' ,
|
`environment_id` VARCHAR(50) NOT NULL DEFAULT 'NONE' COMMENT '环境ID/环境组ID' ,
|
||||||
`test_resource_pool_id` VARCHAR(50) NOT NULL COMMENT '测试资源池ID' ,
|
`test_resource_pool_id` VARCHAR(50) NOT NULL COMMENT '测试资源池ID' ,
|
||||||
`retry_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败重试' ,
|
`retry_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败重试' ,
|
||||||
`retry_type` VARCHAR(50) NOT NULL DEFAULT 'STEP' COMMENT '失败重试类型(步骤/场景)' ,
|
`retry_times` INT DEFAULT 1 COMMENT '失败重试次数' ,
|
||||||
`retry_times` INT NOT NULL DEFAULT 1 COMMENT '失败重试次数' ,
|
`retry_interval` INT DEFAULT 1000 COMMENT '失败重试间隔(单位: ms)' ,
|
||||||
`retry_interval` INT NOT NULL DEFAULT 1000 COMMENT '失败重试间隔(单位: ms)' ,
|
|
||||||
`stop_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败停止' ,
|
`stop_on_fail` BIT NOT NULL DEFAULT 0 COMMENT '是否失败停止' ,
|
||||||
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
`create_user` VARCHAR(50) NOT NULL COMMENT '创建人' ,
|
||||||
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
`create_time` BIGINT NOT NULL COMMENT '创建时间' ,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
tpc.id, tpc.test_plan_id, tpc.parent_id,
|
tpc.id, tpc.test_plan_id, tpc.parent_id,
|
||||||
tpc.`name`, tpc.`type`, tpc.execute_method,
|
tpc.`name`, tpc.`type`, tpc.execute_method,
|
||||||
tpc.extended, tpc.grouped, tpc.environment_id,
|
tpc.extended, tpc.grouped, tpc.environment_id,
|
||||||
tpc.test_resource_pool_id, tpc.retry_on_fail, tpc.retry_type,
|
tpc.test_resource_pool_id, tpc.retry_on_fail,
|
||||||
tpc.retry_times, tpc.retry_interval, tpc.stop_on_fail,
|
tpc.retry_times, tpc.retry_interval, tpc.stop_on_fail,
|
||||||
tpc.create_user, tpc.create_time, tpc.pos,
|
tpc.create_user, tpc.create_time, tpc.pos,
|
||||||
trp.name as poolName,
|
trp.name as poolName,
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
select distinct tprfc.function_case_id as id, tprfc.function_case_num as num, tprfc.function_case_name as name,
|
select distinct tprfc.function_case_id as id, tprfc.function_case_num as num, tprfc.function_case_name as name,
|
||||||
tprfc.function_case_module as moduleName, tprfc.function_case_priority as priority,
|
tprfc.function_case_module as moduleName, tprfc.function_case_priority as priority,
|
||||||
tprfc.function_case_execute_result as executeResult, tprfc.function_case_execute_user as executeUser,
|
tprfc.function_case_execute_result as executeResult, tprfc.function_case_execute_user as executeUser,
|
||||||
ifnull(tprfc.function_case_bug_count, 0) as bugCount
|
ifnull(tprfc.function_case_bug_count, 0) as bugCount, tprfc.function_case_execute_report_id reportId
|
||||||
from test_plan_report_function_case tprfc
|
from test_plan_report_function_case tprfc
|
||||||
where tprfc.test_plan_report_id = #{request.reportId}
|
where tprfc.test_plan_report_id = #{request.reportId}
|
||||||
<include refid="filter"/>
|
<include refid="filter"/>
|
||||||
|
|
|
@ -216,8 +216,8 @@ public class TestPlanReportService {
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
* @param currentUser 当前用户
|
* @param currentUser 当前用户
|
||||||
*/
|
*/
|
||||||
public Map<String, String> genReportByManual(TestPlanReportGenRequest request, String currentUser) {
|
public void genReportByManual(TestPlanReportGenRequest request, String currentUser) {
|
||||||
return genReport(IDGenerator.nextStr(),request, true, currentUser, "/test-plan/report/gen");
|
genReport(IDGenerator.nextStr(),request, true, currentUser, "/test-plan/report/gen");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -254,8 +254,8 @@ public class TestPlanReportService {
|
||||||
TestPlanReportGenPreParam genPreParam = buildReportGenParam(request, plan, prepareReportId);
|
TestPlanReportGenPreParam genPreParam = buildReportGenParam(request, plan, prepareReportId);
|
||||||
genPreParam.setUseManual(manual);
|
genPreParam.setUseManual(manual);
|
||||||
//如果是测试计划的独立报告,使用参数中的预生成的报告id。否则只有测试计划组报告使用该id
|
//如果是测试计划的独立报告,使用参数中的预生成的报告id。否则只有测试计划组报告使用该id
|
||||||
String prepareItemReportId = isGroupReports?IDGenerator.nextStr() : prepareReportId;
|
String prepareItemReportId = isGroupReports ? IDGenerator.nextStr() : prepareReportId;
|
||||||
TestPlanReport preReport = preGenReport(prepareItemReportId,genPreParam, currentUser, logPath, moduleParam, childPlanIds);
|
TestPlanReport preReport = preGenReport(prepareItemReportId, genPreParam, currentUser, logPath, moduleParam, childPlanIds);
|
||||||
if (manual) {
|
if (manual) {
|
||||||
// 汇总
|
// 汇总
|
||||||
if (genPreParam.getIntegrated()) {
|
if (genPreParam.getIntegrated()) {
|
||||||
|
@ -359,7 +359,7 @@ public class TestPlanReportService {
|
||||||
List<TestPlanCaseExecuteHistory> hisList = functionalExecMap.get(reportFunctionalCase.getTestPlanFunctionCaseId());
|
List<TestPlanCaseExecuteHistory> hisList = functionalExecMap.get(reportFunctionalCase.getTestPlanFunctionCaseId());
|
||||||
if (CollectionUtils.isNotEmpty(hisList)) {
|
if (CollectionUtils.isNotEmpty(hisList)) {
|
||||||
Optional<String> lastExecuteHisOpt = hisList.stream().sorted(Comparator.comparing(TestPlanCaseExecuteHistory::getCreateTime).reversed()).map(TestPlanCaseExecuteHistory::getId).findFirst();
|
Optional<String> lastExecuteHisOpt = hisList.stream().sorted(Comparator.comparing(TestPlanCaseExecuteHistory::getCreateTime).reversed()).map(TestPlanCaseExecuteHistory::getId).findFirst();
|
||||||
reportFunctionalCase.setFunctionCaseExecuteReportId(lastExecuteHisOpt.get());
|
reportFunctionalCase.setFunctionCaseExecuteReportId(lastExecuteHisOpt.orElse(null));
|
||||||
} else {
|
} else {
|
||||||
reportFunctionalCase.setFunctionCaseExecuteReportId(null);
|
reportFunctionalCase.setFunctionCaseExecuteReportId(null);
|
||||||
}
|
}
|
||||||
|
@ -612,7 +612,7 @@ public class TestPlanReportService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 汇总生成的计划组报告
|
* 汇总生成的计划组报告
|
||||||
* @param reportId
|
* @param reportId 报告ID
|
||||||
*/
|
*/
|
||||||
public void summaryGroupReport(String reportId) {
|
public void summaryGroupReport(String reportId) {
|
||||||
TestPlanReportSummaryExample summaryExample = new TestPlanReportSummaryExample();
|
TestPlanReportSummaryExample summaryExample = new TestPlanReportSummaryExample();
|
||||||
|
|
|
@ -7,7 +7,6 @@ import io.metersphere.plan.dto.request.*;
|
||||||
import io.metersphere.plan.dto.response.TestPlanDetailResponse;
|
import io.metersphere.plan.dto.response.TestPlanDetailResponse;
|
||||||
import io.metersphere.plan.dto.response.TestPlanOperationResponse;
|
import io.metersphere.plan.dto.response.TestPlanOperationResponse;
|
||||||
import io.metersphere.plan.enums.ExecuteMethod;
|
import io.metersphere.plan.enums.ExecuteMethod;
|
||||||
import io.metersphere.plan.enums.RetryType;
|
|
||||||
import io.metersphere.plan.job.TestPlanScheduleJob;
|
import io.metersphere.plan.job.TestPlanScheduleJob;
|
||||||
import io.metersphere.plan.mapper.*;
|
import io.metersphere.plan.mapper.*;
|
||||||
import io.metersphere.project.request.ProjectApplicationRequest;
|
import io.metersphere.project.request.ProjectApplicationRequest;
|
||||||
|
@ -919,9 +918,6 @@ public class TestPlanService extends TestPlanBaseUtilsService {
|
||||||
defaultCollection.setEnvironmentId("NONE");
|
defaultCollection.setEnvironmentId("NONE");
|
||||||
defaultCollection.setTestResourcePoolId(configMap.getOrDefault(ProjectApplicationType.API.API_RESOURCE_POOL_ID.name(), StringUtils.EMPTY).toString());
|
defaultCollection.setTestResourcePoolId(configMap.getOrDefault(ProjectApplicationType.API.API_RESOURCE_POOL_ID.name(), StringUtils.EMPTY).toString());
|
||||||
defaultCollection.setRetryOnFail(false);
|
defaultCollection.setRetryOnFail(false);
|
||||||
defaultCollection.setRetryType(RetryType.STEP.name());
|
|
||||||
defaultCollection.setRetryTimes(10);
|
|
||||||
defaultCollection.setRetryInterval(1);
|
|
||||||
defaultCollection.setStopOnFail(false);
|
defaultCollection.setStopOnFail(false);
|
||||||
defaultCollection.setCreateUser(currentUser);
|
defaultCollection.setCreateUser(currentUser);
|
||||||
defaultCollection.setCreateTime(System.currentTimeMillis());
|
defaultCollection.setCreateTime(System.currentTimeMillis());
|
||||||
|
|
Loading…
Reference in New Issue