feat (接口自动化): 报告增加结束时间 #1002620
--story=1002620 --user=赵勇 【github#5383】[FEAT... https://www.tapd.cn/55049933/s/1036970
This commit is contained in:
parent
4453b0018a
commit
8ea0f731dd
|
@ -143,7 +143,7 @@ public class ApiScenarioReportService {
|
||||||
if (report != null) {
|
if (report != null) {
|
||||||
report.setId(report.getId());
|
report.setId(report.getId());
|
||||||
report.setName(report.getScenarioName() + "-" + DateUtils.getTimeStr(System.currentTimeMillis()));
|
report.setName(report.getScenarioName() + "-" + DateUtils.getTimeStr(System.currentTimeMillis()));
|
||||||
report.setCreateTime(startTime);
|
report.setEndTime(System.currentTimeMillis());
|
||||||
report.setUpdateTime(startTime);
|
report.setUpdateTime(startTime);
|
||||||
String status = test.getError() == 0 ? "Success" : "Error";
|
String status = test.getError() == 0 ? "Success" : "Error";
|
||||||
report.setStatus(status);
|
report.setStatus(status);
|
||||||
|
@ -165,7 +165,7 @@ public class ApiScenarioReportService {
|
||||||
report.setScenarioId(test.getScenarioId());
|
report.setScenarioId(test.getScenarioId());
|
||||||
report.setTriggerMode(test.getTriggerMode());
|
report.setTriggerMode(test.getTriggerMode());
|
||||||
report.setDescription(test.getDescription());
|
report.setDescription(test.getDescription());
|
||||||
report.setCreateTime(System.currentTimeMillis());
|
report.setEndTime(System.currentTimeMillis());
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
report.setStatus(test.getStatus());
|
report.setStatus(test.getStatus());
|
||||||
report.setUserId(test.getUserId());
|
report.setUserId(test.getUserId());
|
||||||
|
@ -235,6 +235,7 @@ public class ApiScenarioReportService {
|
||||||
if (StringUtils.isNotEmpty(report.getTriggerMode()) && report.getTriggerMode().equals("CASE")) {
|
if (StringUtils.isNotEmpty(report.getTriggerMode()) && report.getTriggerMode().equals("CASE")) {
|
||||||
report.setTriggerMode(TriggerMode.MANUAL.name());
|
report.setTriggerMode(TriggerMode.MANUAL.name());
|
||||||
}
|
}
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
apiScenarioReportMapper.updateByPrimaryKeySelective(report);
|
apiScenarioReportMapper.updateByPrimaryKeySelective(report);
|
||||||
if (scenarioResult.getError() > 0) {
|
if (scenarioResult.getError() > 0) {
|
||||||
testPlanApiScenario.setLastResult(ScenarioStatus.Fail.name());
|
testPlanApiScenario.setLastResult(ScenarioStatus.Fail.name());
|
||||||
|
@ -244,8 +245,9 @@ public class ApiScenarioReportService {
|
||||||
String passRate = new DecimalFormat("0%").format((float) scenarioResult.getSuccess() / (scenarioResult.getSuccess() + scenarioResult.getError()));
|
String passRate = new DecimalFormat("0%").format((float) scenarioResult.getSuccess() / (scenarioResult.getSuccess() + scenarioResult.getError()));
|
||||||
testPlanApiScenario.setPassRate(passRate);
|
testPlanApiScenario.setPassRate(passRate);
|
||||||
testPlanApiScenario.setReportId(report.getId());
|
testPlanApiScenario.setReportId(report.getId());
|
||||||
testPlanApiScenario.setUpdateTime(report.getCreateTime());
|
|
||||||
report.setTestPlanScenarioId(testPlanApiScenario.getId());
|
report.setTestPlanScenarioId(testPlanApiScenario.getId());
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
|
testPlanApiScenario.setUpdateTime(report.getCreateTime());
|
||||||
testPlanApiScenarioMapper.updateByPrimaryKeySelective(testPlanApiScenario);
|
testPlanApiScenarioMapper.updateByPrimaryKeySelective(testPlanApiScenario);
|
||||||
|
|
||||||
// 更新场景状态
|
// 更新场景状态
|
||||||
|
@ -259,10 +261,10 @@ public class ApiScenarioReportService {
|
||||||
scenario.setPassRate(passRate);
|
scenario.setPassRate(passRate);
|
||||||
scenario.setReportId(report.getId());
|
scenario.setReportId(report.getId());
|
||||||
int executeTimes = 0;
|
int executeTimes = 0;
|
||||||
if(scenario.getExecuteTimes() != null){
|
if (scenario.getExecuteTimes() != null) {
|
||||||
executeTimes = scenario.getExecuteTimes().intValue();
|
executeTimes = scenario.getExecuteTimes().intValue();
|
||||||
}
|
}
|
||||||
scenario.setExecuteTimes(executeTimes+1);
|
scenario.setExecuteTimes(executeTimes + 1);
|
||||||
|
|
||||||
apiScenarioMapper.updateByPrimaryKey(scenario);
|
apiScenarioMapper.updateByPrimaryKey(scenario);
|
||||||
}
|
}
|
||||||
|
@ -319,6 +321,7 @@ public class ApiScenarioReportService {
|
||||||
TestPlanApiScenario testPlanApiScenario = testPlanApiScenarioMapper.selectByPrimaryKey(planScenarioId);
|
TestPlanApiScenario testPlanApiScenario = testPlanApiScenarioMapper.selectByPrimaryKey(planScenarioId);
|
||||||
report.setScenarioId(testPlanApiScenario.getApiScenarioId());
|
report.setScenarioId(testPlanApiScenario.getApiScenarioId());
|
||||||
report.setTestPlanScenarioId(planScenarioId);
|
report.setTestPlanScenarioId(planScenarioId);
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
apiScenarioReportMapper.updateByPrimaryKeySelective(report);
|
apiScenarioReportMapper.updateByPrimaryKeySelective(report);
|
||||||
|
|
||||||
|
|
||||||
|
@ -343,6 +346,7 @@ public class ApiScenarioReportService {
|
||||||
apiScenarioReportDetailMapper.insert(detail);
|
apiScenarioReportDetailMapper.insert(detail);
|
||||||
|
|
||||||
testPlanApiScenario.setReportId(report.getId());
|
testPlanApiScenario.setReportId(report.getId());
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
testPlanApiScenario.setUpdateTime(System.currentTimeMillis());
|
testPlanApiScenario.setUpdateTime(System.currentTimeMillis());
|
||||||
testPlanApiScenarioMapper.updateByPrimaryKeySelective(testPlanApiScenario);
|
testPlanApiScenarioMapper.updateByPrimaryKeySelective(testPlanApiScenario);
|
||||||
scenarioIdList.add(testPlanApiScenario.getApiScenarioId());
|
scenarioIdList.add(testPlanApiScenario.getApiScenarioId());
|
||||||
|
@ -359,10 +363,10 @@ public class ApiScenarioReportService {
|
||||||
scenario.setPassRate(passRate);
|
scenario.setPassRate(passRate);
|
||||||
scenario.setReportId(report.getId());
|
scenario.setReportId(report.getId());
|
||||||
int executeTimes = 0;
|
int executeTimes = 0;
|
||||||
if(scenario.getExecuteTimes() != null){
|
if (scenario.getExecuteTimes() != null) {
|
||||||
executeTimes = scenario.getExecuteTimes().intValue();
|
executeTimes = scenario.getExecuteTimes().intValue();
|
||||||
}
|
}
|
||||||
scenario.setExecuteTimes(executeTimes+1);
|
scenario.setExecuteTimes(executeTimes + 1);
|
||||||
|
|
||||||
apiScenarioMapper.updateByPrimaryKey(scenario);
|
apiScenarioMapper.updateByPrimaryKey(scenario);
|
||||||
}
|
}
|
||||||
|
@ -403,6 +407,7 @@ public class ApiScenarioReportService {
|
||||||
if (CollectionUtils.isNotEmpty(reportList)) {
|
if (CollectionUtils.isNotEmpty(reportList)) {
|
||||||
reportList.forEach(report -> {
|
reportList.forEach(report -> {
|
||||||
report.setUpdateTime(System.currentTimeMillis());
|
report.setUpdateTime(System.currentTimeMillis());
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
String status = "Error";
|
String status = "Error";
|
||||||
report.setStatus(status);
|
report.setStatus(status);
|
||||||
scenarioReportMapper.updateByPrimaryKeySelective(report);
|
scenarioReportMapper.updateByPrimaryKeySelective(report);
|
||||||
|
@ -464,6 +469,7 @@ public class ApiScenarioReportService {
|
||||||
if (StringUtils.isNotEmpty(report.getTriggerMode()) && report.getTriggerMode().equals("CASE")) {
|
if (StringUtils.isNotEmpty(report.getTriggerMode()) && report.getTriggerMode().equals("CASE")) {
|
||||||
report.setTriggerMode(TriggerMode.MANUAL.name());
|
report.setTriggerMode(TriggerMode.MANUAL.name());
|
||||||
}
|
}
|
||||||
|
report.setEndTime(System.currentTimeMillis());
|
||||||
apiScenarioReportMapper.updateByPrimaryKey(report);
|
apiScenarioReportMapper.updateByPrimaryKey(report);
|
||||||
|
|
||||||
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
ApiScenarioReportDetail detail = new ApiScenarioReportDetail();
|
||||||
|
@ -557,10 +563,10 @@ public class ApiScenarioReportService {
|
||||||
scenario.setPassRate(passRate);
|
scenario.setPassRate(passRate);
|
||||||
scenario.setReportId(report.getId());
|
scenario.setReportId(report.getId());
|
||||||
int executeTimes = 0;
|
int executeTimes = 0;
|
||||||
if(scenario.getExecuteTimes() != null){
|
if (scenario.getExecuteTimes() != null) {
|
||||||
executeTimes = scenario.getExecuteTimes().intValue();
|
executeTimes = scenario.getExecuteTimes().intValue();
|
||||||
}
|
}
|
||||||
scenario.setExecuteTimes(executeTimes+1);
|
scenario.setExecuteTimes(executeTimes + 1);
|
||||||
|
|
||||||
apiScenarioMapper.updateByPrimaryKey(scenario);
|
apiScenarioMapper.updateByPrimaryKey(scenario);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package io.metersphere.base.domain;
|
package io.metersphere.base.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ApiScenarioReport implements Serializable {
|
public class ApiScenarioReport implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
@ -35,5 +36,7 @@ public class ApiScenarioReport implements Serializable {
|
||||||
|
|
||||||
private String testPlanScenarioId;
|
private String testPlanScenarioId;
|
||||||
|
|
||||||
|
private Long endTime;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
}
|
}
|
||||||
|
|
|
@ -993,6 +993,66 @@ public class ApiScenarioReportExample {
|
||||||
addCriterion("actuator not between", value1, value2, "actuator");
|
addCriterion("actuator not between", value1, value2, "actuator");
|
||||||
return (Criteria) this;
|
return (Criteria) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeIsNull() {
|
||||||
|
addCriterion("end_time is null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeIsNotNull() {
|
||||||
|
addCriterion("end_time is not null");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeEqualTo(Long value) {
|
||||||
|
addCriterion("end_time =", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeNotEqualTo(Long value) {
|
||||||
|
addCriterion("end_time <>", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeGreaterThan(Long value) {
|
||||||
|
addCriterion("end_time >", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeGreaterThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("end_time >=", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeLessThan(Long value) {
|
||||||
|
addCriterion("end_time <", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeLessThanOrEqualTo(Long value) {
|
||||||
|
addCriterion("end_time <=", value, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeIn(List<Long> values) {
|
||||||
|
addCriterion("end_time in", values, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeNotIn(List<Long> values) {
|
||||||
|
addCriterion("end_time not in", values, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("end_time between", value1, value2, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Criteria andEndTimeNotBetween(Long value1, Long value2) {
|
||||||
|
addCriterion("end_time not between", value1, value2, "endTime");
|
||||||
|
return (Criteria) this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Criteria extends GeneratedCriteria {
|
public static class Criteria extends GeneratedCriteria {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
|
<result column="scenario_id" jdbcType="VARCHAR" property="scenarioId" />
|
||||||
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
<result column="create_user" jdbcType="VARCHAR" property="createUser" />
|
||||||
<result column="actuator" jdbcType="VARCHAR" property="actuator" />
|
<result column="actuator" jdbcType="VARCHAR" property="actuator" />
|
||||||
|
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioReport">
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
<result column="description" jdbcType="LONGVARCHAR" property="description" />
|
||||||
|
@ -79,7 +80,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode,
|
id, project_id, `name`, create_time, update_time, `status`, user_id, trigger_mode,
|
||||||
execute_type, scenario_name, scenario_id, create_user, actuator
|
execute_type, scenario_name, scenario_id, create_user, actuator, end_time
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
description
|
description
|
||||||
|
@ -137,12 +138,14 @@
|
||||||
create_time, update_time, `status`,
|
create_time, update_time, `status`,
|
||||||
user_id, trigger_mode, execute_type,
|
user_id, trigger_mode, execute_type,
|
||||||
scenario_name, scenario_id, create_user,
|
scenario_name, scenario_id, create_user,
|
||||||
actuator, description)
|
actuator, end_time, description
|
||||||
|
)
|
||||||
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
|
||||||
#{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{executeType,jdbcType=VARCHAR},
|
#{userId,jdbcType=VARCHAR}, #{triggerMode,jdbcType=VARCHAR}, #{executeType,jdbcType=VARCHAR},
|
||||||
#{scenarioName,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
#{scenarioName,jdbcType=VARCHAR}, #{scenarioId,jdbcType=VARCHAR}, #{createUser,jdbcType=VARCHAR},
|
||||||
#{actuator,jdbcType=VARCHAR}, #{description,jdbcType=LONGVARCHAR})
|
#{actuator,jdbcType=VARCHAR}, #{endTime,jdbcType=BIGINT}, #{description,jdbcType=LONGVARCHAR}
|
||||||
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
<insert id="insertSelective" parameterType="io.metersphere.base.domain.ApiScenarioReport">
|
||||||
insert into api_scenario_report
|
insert into api_scenario_report
|
||||||
|
@ -186,6 +189,9 @@
|
||||||
<if test="actuator != null">
|
<if test="actuator != null">
|
||||||
actuator,
|
actuator,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time,
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description,
|
description,
|
||||||
</if>
|
</if>
|
||||||
|
@ -230,6 +236,9 @@
|
||||||
<if test="actuator != null">
|
<if test="actuator != null">
|
||||||
#{actuator,jdbcType=VARCHAR},
|
#{actuator,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
#{endTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
#{description,jdbcType=LONGVARCHAR},
|
#{description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -283,6 +292,9 @@
|
||||||
<if test="record.actuator != null">
|
<if test="record.actuator != null">
|
||||||
actuator = #{record.actuator,jdbcType=VARCHAR},
|
actuator = #{record.actuator,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="record.endTime != null">
|
||||||
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
<if test="record.description != null">
|
<if test="record.description != null">
|
||||||
description = #{record.description,jdbcType=LONGVARCHAR},
|
description = #{record.description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -306,6 +318,7 @@
|
||||||
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
||||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||||
actuator = #{record.actuator,jdbcType=VARCHAR},
|
actuator = #{record.actuator,jdbcType=VARCHAR},
|
||||||
|
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||||
description = #{record.description,jdbcType=LONGVARCHAR}
|
description = #{record.description,jdbcType=LONGVARCHAR}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
|
@ -325,7 +338,8 @@
|
||||||
scenario_name = #{record.scenarioName,jdbcType=VARCHAR},
|
scenario_name = #{record.scenarioName,jdbcType=VARCHAR},
|
||||||
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{record.scenarioId,jdbcType=VARCHAR},
|
||||||
create_user = #{record.createUser,jdbcType=VARCHAR},
|
create_user = #{record.createUser,jdbcType=VARCHAR},
|
||||||
actuator = #{record.actuator,jdbcType=VARCHAR}
|
actuator = #{record.actuator,jdbcType=VARCHAR},
|
||||||
|
end_time = #{record.endTime,jdbcType=BIGINT}
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="Update_By_Example_Where_Clause" />
|
<include refid="Update_By_Example_Where_Clause" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -369,6 +383,9 @@
|
||||||
<if test="actuator != null">
|
<if test="actuator != null">
|
||||||
actuator = #{actuator,jdbcType=VARCHAR},
|
actuator = #{actuator,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
end_time = #{endTime,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
<if test="description != null">
|
<if test="description != null">
|
||||||
description = #{description,jdbcType=LONGVARCHAR},
|
description = #{description,jdbcType=LONGVARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
@ -389,6 +406,7 @@
|
||||||
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
||||||
create_user = #{createUser,jdbcType=VARCHAR},
|
create_user = #{createUser,jdbcType=VARCHAR},
|
||||||
actuator = #{actuator,jdbcType=VARCHAR},
|
actuator = #{actuator,jdbcType=VARCHAR},
|
||||||
|
end_time = #{endTime,jdbcType=BIGINT},
|
||||||
description = #{description,jdbcType=LONGVARCHAR}
|
description = #{description,jdbcType=LONGVARCHAR}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
|
@ -405,7 +423,8 @@
|
||||||
scenario_name = #{scenarioName,jdbcType=VARCHAR},
|
scenario_name = #{scenarioName,jdbcType=VARCHAR},
|
||||||
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
scenario_id = #{scenarioId,jdbcType=VARCHAR},
|
||||||
create_user = #{createUser,jdbcType=VARCHAR},
|
create_user = #{createUser,jdbcType=VARCHAR},
|
||||||
actuator = #{actuator,jdbcType=VARCHAR}
|
actuator = #{actuator,jdbcType=VARCHAR},
|
||||||
|
end_time = #{endTime,jdbcType=BIGINT}
|
||||||
where id = #{id,jdbcType=VARCHAR}
|
where id = #{id,jdbcType=VARCHAR}
|
||||||
</update>
|
</update>
|
||||||
</mapper>
|
</mapper>
|
|
@ -99,7 +99,7 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="list" resultMap="BaseResultMap">
|
<select id="list" resultMap="BaseResultMap">
|
||||||
SELECT r.name AS test_name,
|
SELECT r.name AS test_name,r.end_time,
|
||||||
r.name, r.description, r.id, r.project_id, r.create_time, r.update_time, r.status, r.trigger_mode,IfNULL(s.name,r.scenario_name) as scenario_name,
|
r.name, r.description, r.id, r.project_id, r.create_time, r.update_time, r.status, r.trigger_mode,IfNULL(s.name,r.scenario_name) as scenario_name,
|
||||||
project.name AS project_name, user.name AS user_name
|
project.name AS project_name, user.name AS user_name
|
||||||
FROM api_scenario_report r
|
FROM api_scenario_report r
|
||||||
|
|
|
@ -87,3 +87,4 @@ ALTER TABLE `project`
|
||||||
ALTER TABLE `api_scenario`
|
ALTER TABLE `api_scenario`
|
||||||
ADD `execute_times` int(11) NULL;
|
ADD `execute_times` int(11) NULL;
|
||||||
|
|
||||||
|
ALTER TABLE `api_scenario_report` ADD `end_time` bigint(13) ;
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="endTime" width="250" :label="$t('report.test_end_time')" sortable>
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<span>{{ scope.row.endTime | timestampFormatDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="triggerMode" width="150" :label="$t('commons.trigger_mode.name')"
|
<el-table-column prop="triggerMode" width="150" :label="$t('commons.trigger_mode.name')"
|
||||||
column-key="triggerMode" :filters="triggerFilters">
|
column-key="triggerMode" :filters="triggerFilters">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
|
|
Loading…
Reference in New Issue