Merge branch 'master' of github.com:metersphere/metersphere
This commit is contained in:
commit
87ea2e0253
|
@ -1,8 +1,9 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TestCaseReviewScenario implements Serializable {
|
||||
private String id;
|
||||
|
@ -13,8 +14,6 @@ public class TestCaseReviewScenario implements Serializable {
|
|||
|
||||
private String status;
|
||||
|
||||
private String environment;
|
||||
|
||||
private Long createTime;
|
||||
|
||||
private Long updateTime;
|
||||
|
@ -25,5 +24,7 @@ public class TestCaseReviewScenario implements Serializable {
|
|||
|
||||
private String reportId;
|
||||
|
||||
private String environment;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -384,76 +384,6 @@ public class TestCaseReviewScenarioExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIsNull() {
|
||||
addCriterion("environment is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIsNotNull() {
|
||||
addCriterion("environment is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentEqualTo(String value) {
|
||||
addCriterion("environment =", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentNotEqualTo(String value) {
|
||||
addCriterion("environment <>", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentGreaterThan(String value) {
|
||||
addCriterion("environment >", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("environment >=", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentLessThan(String value) {
|
||||
addCriterion("environment <", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentLessThanOrEqualTo(String value) {
|
||||
addCriterion("environment <=", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentLike(String value) {
|
||||
addCriterion("environment like", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentNotLike(String value) {
|
||||
addCriterion("environment not like", value, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentIn(List<String> values) {
|
||||
addCriterion("environment in", values, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentNotIn(List<String> values) {
|
||||
addCriterion("environment not in", values, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentBetween(String value1, String value2) {
|
||||
addCriterion("environment between", value1, value2, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEnvironmentNotBetween(String value1, String value2) {
|
||||
addCriterion("environment not between", value1, value2, "environment");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCreateTimeIsNull() {
|
||||
addCriterion("create_time is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class TestPlan implements Serializable {
|
||||
private String id;
|
||||
|
@ -41,6 +42,8 @@ public class TestPlan implements Serializable {
|
|||
|
||||
private String projectId;
|
||||
|
||||
private Integer executionTimes;
|
||||
|
||||
private String tags;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
|
@ -1303,6 +1303,66 @@ public class TestPlanExample {
|
|||
addCriterion("project_id not between", value1, value2, "projectId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIsNull() {
|
||||
addCriterion("execution_times is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIsNotNull() {
|
||||
addCriterion("execution_times is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesEqualTo(Integer value) {
|
||||
addCriterion("execution_times =", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotEqualTo(Integer value) {
|
||||
addCriterion("execution_times <>", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesGreaterThan(Integer value) {
|
||||
addCriterion("execution_times >", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("execution_times >=", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesLessThan(Integer value) {
|
||||
addCriterion("execution_times <", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("execution_times <=", value, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesIn(List<Integer> values) {
|
||||
addCriterion("execution_times in", values, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotIn(List<Integer> values) {
|
||||
addCriterion("execution_times not in", values, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesBetween(Integer value1, Integer value2) {
|
||||
addCriterion("execution_times between", value1, value2, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecutionTimesNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("execution_times not between", value1, value2, "executionTimes");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -2,9 +2,10 @@ package io.metersphere.base.mapper;
|
|||
|
||||
import io.metersphere.base.domain.TestCaseReviewScenario;
|
||||
import io.metersphere.base.domain.TestCaseReviewScenarioExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TestCaseReviewScenarioMapper {
|
||||
long countByExample(TestCaseReviewScenarioExample example);
|
||||
|
||||
|
@ -16,15 +17,21 @@ public interface TestCaseReviewScenarioMapper {
|
|||
|
||||
int insertSelective(TestCaseReviewScenario record);
|
||||
|
||||
List<TestCaseReviewScenario> selectByExampleWithBLOBs(TestCaseReviewScenarioExample example);
|
||||
|
||||
List<TestCaseReviewScenario> selectByExample(TestCaseReviewScenarioExample example);
|
||||
|
||||
TestCaseReviewScenario selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestCaseReviewScenario record, @Param("example") TestCaseReviewScenarioExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestCaseReviewScenario record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TestCaseReviewScenario record);
|
||||
|
||||
int updateByPrimaryKey(TestCaseReviewScenario record);
|
||||
}
|
|
@ -6,13 +6,15 @@
|
|||
<result column="test_case_review_id" jdbcType="VARCHAR" property="testCaseReviewId"/>
|
||||
<result column="api_scenario_id" jdbcType="VARCHAR" property="apiScenarioId"/>
|
||||
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||
<result column="environment" jdbcType="VARCHAR" property="environment" />
|
||||
<result column="create_time" jdbcType="BIGINT" property="createTime"/>
|
||||
<result column="update_time" jdbcType="BIGINT" property="updateTime"/>
|
||||
<result column="pass_rate" jdbcType="VARCHAR" property="passRate"/>
|
||||
<result column="last_result" jdbcType="VARCHAR" property="lastResult"/>
|
||||
<result column="report_id" jdbcType="VARCHAR" property="reportId"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
<result column="environment" jdbcType="LONGVARCHAR" property="environment"/>
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
|
@ -72,10 +74,31 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_case_review_id, api_scenario_id, `status`, environment, create_time, update_time,
|
||||
pass_rate, last_result, report_id
|
||||
id, test_case_review_id, api_scenario_id, `status`, create_time, update_time, pass_rate,
|
||||
last_result, report_id
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample" resultMap="BaseResultMap">
|
||||
<sql id="Blob_Column_List">
|
||||
environment
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample"
|
||||
resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from test_case_review_scenario
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause"/>
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
|
@ -89,9 +112,11 @@
|
|||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
,
|
||||
<include refid="Blob_Column_List"/>
|
||||
from test_case_review_scenario
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
@ -107,13 +132,13 @@
|
|||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
insert into test_case_review_scenario (id, test_case_review_id, api_scenario_id,
|
||||
`status`, environment, create_time,
|
||||
update_time, pass_rate, last_result,
|
||||
report_id)
|
||||
`status`, create_time, update_time,
|
||||
pass_rate, last_result, report_id,
|
||||
environment)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testCaseReviewId,jdbcType=VARCHAR}, #{apiScenarioId,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{environment,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR},
|
||||
#{reportId,jdbcType=VARCHAR})
|
||||
#{status,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{passRate,jdbcType=VARCHAR}, #{lastResult,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{environment,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
insert into test_case_review_scenario
|
||||
|
@ -130,9 +155,6 @@
|
|||
<if test="status != null">
|
||||
`status`,
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
|
@ -148,6 +170,9 @@
|
|||
<if test="reportId != null">
|
||||
report_id,
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -162,9 +187,6 @@
|
|||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
#{environment,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -180,6 +202,9 @@
|
|||
<if test="reportId != null">
|
||||
#{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
#{environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestCaseReviewScenarioExample" resultType="java.lang.Long">
|
||||
|
@ -203,9 +228,6 @@
|
|||
<if test="record.status != null">
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environment != null">
|
||||
environment = #{record.environment,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -221,18 +243,36 @@
|
|||
<if test="record.reportId != null">
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.environment != null">
|
||||
environment = #{record.environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_case_review_scenario
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||
last_result = #{record.lastResult,jdbcType=VARCHAR},
|
||||
report_id = #{record.reportId,jdbcType=VARCHAR},
|
||||
environment = #{record.environment,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause"/>
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_case_review_scenario
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_case_review_id = #{record.testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{record.apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{record.status,jdbcType=VARCHAR},
|
||||
environment = #{record.environment,jdbcType=VARCHAR},
|
||||
create_time = #{record.createTime,jdbcType=BIGINT},
|
||||
update_time = #{record.updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{record.passRate,jdbcType=VARCHAR},
|
||||
|
@ -254,9 +294,6 @@
|
|||
<if test="status != null">
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment = #{environment,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
|
@ -272,15 +309,30 @@
|
|||
<if test="reportId != null">
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="environment != null">
|
||||
environment = #{environment,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
update test_case_review_scenario
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||
last_result = #{lastResult,jdbcType=VARCHAR},
|
||||
report_id = #{reportId,jdbcType=VARCHAR},
|
||||
environment = #{environment,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCaseReviewScenario">
|
||||
update test_case_review_scenario
|
||||
set test_case_review_id = #{testCaseReviewId,jdbcType=VARCHAR},
|
||||
api_scenario_id = #{apiScenarioId,jdbcType=VARCHAR},
|
||||
`status` = #{status,jdbcType=VARCHAR},
|
||||
environment = #{environment,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=BIGINT},
|
||||
update_time = #{updateTime,jdbcType=BIGINT},
|
||||
pass_rate = #{passRate,jdbcType=VARCHAR},
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<result column="actual_start_time" jdbcType="BIGINT" property="actualStartTime" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="execution_times" jdbcType="INTEGER" property="executionTimes"/>
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlan">
|
||||
<result column="tags" jdbcType="LONGVARCHAR" property="tags" />
|
||||
|
@ -85,7 +86,7 @@
|
|||
<sql id="Base_Column_List">
|
||||
id, workspace_id, report_id, `name`, description, `status`, stage, principal, test_case_match_rule,
|
||||
executor_match_rule, create_time, update_time, actual_end_time, planned_start_time,
|
||||
planned_end_time, actual_start_time, creator, project_id
|
||||
planned_end_time, actual_start_time, creator, project_id, execution_times
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
tags
|
||||
|
@ -145,14 +146,14 @@
|
|||
executor_match_rule, create_time, update_time,
|
||||
actual_end_time, planned_start_time, planned_end_time,
|
||||
actual_start_time, creator, project_id,
|
||||
tags)
|
||||
execution_times, tags)
|
||||
values (#{id,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{reportId,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{stage,jdbcType=VARCHAR}, #{principal,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR},
|
||||
#{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{actualEndTime,jdbcType=BIGINT}, #{plannedStartTime,jdbcType=BIGINT}, #{plannedEndTime,jdbcType=BIGINT},
|
||||
#{actualStartTime,jdbcType=BIGINT}, #{creator,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
|
||||
#{tags,jdbcType=LONGVARCHAR})
|
||||
#{executionTimes,jdbcType=INTEGER}, #{tags,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlan">
|
||||
insert into test_plan
|
||||
|
@ -211,6 +212,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
execution_times,
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags,
|
||||
</if>
|
||||
|
@ -270,6 +274,9 @@
|
|||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
#{executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
#{tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -338,6 +345,9 @@
|
|||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.executionTimes != null">
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.tags != null">
|
||||
tags = #{record.tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -366,6 +376,7 @@
|
|||
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER},
|
||||
tags = #{record.tags,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -390,7 +401,8 @@
|
|||
planned_end_time = #{record.plannedEndTime,jdbcType=BIGINT},
|
||||
actual_start_time = #{record.actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR}
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{record.executionTimes,jdbcType=INTEGER}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -449,6 +461,9 @@
|
|||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="executionTimes != null">
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="tags != null">
|
||||
tags = #{tags,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
|
@ -474,6 +489,7 @@
|
|||
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER},
|
||||
tags = #{tags,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
@ -495,7 +511,8 @@
|
|||
planned_end_time = #{plannedEndTime,jdbcType=BIGINT},
|
||||
actual_start_time = #{actualStartTime,jdbcType=BIGINT},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR}
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
execution_times = #{executionTimes,jdbcType=INTEGER}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -16,6 +16,7 @@ public class ShiroUtils {
|
|||
filterChainDefinitionMap.put("/signin", "anon");
|
||||
filterChainDefinitionMap.put("/ldap/signin", "anon");
|
||||
filterChainDefinitionMap.put("/ldap/open", "anon");
|
||||
filterChainDefinitionMap.put("/signout", "anon");
|
||||
filterChainDefinitionMap.put("/isLogin", "anon");
|
||||
filterChainDefinitionMap.put("/css/**", "anon");
|
||||
filterChainDefinitionMap.put("/js/**", "anon");
|
||||
|
|
|
@ -32,7 +32,7 @@ public class RestControllerExceptionHandler {
|
|||
|
||||
|
||||
@ExceptionHandler(SQLException.class)
|
||||
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
|
||||
public ResultHolder sqlExceptionHandler(HttpServletRequest request, HttpServletResponse response, SQLException e) {
|
||||
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
return ResultHolder.error("SQL error happened, please check logs.");
|
||||
}
|
||||
|
|
|
@ -27,7 +27,10 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import javax.annotation.Resource;
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.UUID;
|
||||
|
||||
|
||||
@Service
|
||||
|
@ -205,8 +208,8 @@ public class SystemParameterService {
|
|||
|
||||
public String getValue(String key) {
|
||||
SystemParameter param = systemParameterMapper.selectByPrimaryKey(key);
|
||||
if (param == null) {
|
||||
return null;
|
||||
if (param == null || StringUtils.isBlank(param.getParamValue())) {
|
||||
return "";
|
||||
}
|
||||
return param.getParamValue();
|
||||
}
|
||||
|
|
|
@ -79,8 +79,9 @@ public class TestPlanController {
|
|||
|
||||
@PostMapping("/add")
|
||||
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||
public void addTestPlan(@RequestBody AddTestPlanRequest testPlan) {
|
||||
testPlanService.addTestPlan(testPlan);
|
||||
public String addTestPlan(@RequestBody AddTestPlanRequest testPlan) {
|
||||
return testPlanService.addTestPlan(testPlan);
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
|
|
|
@ -8,4 +8,5 @@ import lombok.Setter;
|
|||
public class DemandDTO {
|
||||
private String id;
|
||||
private String name;
|
||||
private String platform;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public abstract class AbstractIssuePlatform implements IssuesPlatform {
|
|||
*
|
||||
* @return 其他平台和本地项目绑定的属性值
|
||||
*/
|
||||
abstract String getProjectId();
|
||||
abstract String getProjectId(String projectId);
|
||||
|
||||
protected boolean isIntegratedPlatform(String orgId, String platform) {
|
||||
IntegrationRequest request = new IntegrationRequest();
|
||||
|
|
|
@ -103,7 +103,7 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
String auth = EncryptUtils.base64Encoding(account + ":" + password);
|
||||
|
||||
String testCaseId = issuesRequest.getTestCaseId();
|
||||
String jiraKey = getProjectId();
|
||||
String jiraKey = getProjectId(null);
|
||||
|
||||
|
||||
if (StringUtils.isBlank(jiraKey)) {
|
||||
|
@ -200,7 +200,10 @@ public class JiraPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
@Override
|
||||
String getProjectId() {
|
||||
String getProjectId(String projectId) {
|
||||
if (StringUtils.isNotBlank(projectId)) {
|
||||
return projectService.getProjectById(projectId).getJiraKey();
|
||||
}
|
||||
TestCaseWithBLOBs testCase = testCaseService.getTestCase(testCaseId);
|
||||
Project project = projectService.getProjectById(testCase.getProjectId());
|
||||
return project.getJiraKey();
|
||||
|
|
|
@ -66,7 +66,7 @@ public class LocalPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
@Override
|
||||
String getProjectId() {
|
||||
String getProjectId(String projectId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
@Override
|
||||
public List<Issues> getIssue() {
|
||||
List<Issues> list = new ArrayList<>();
|
||||
String tapdId = getProjectId();
|
||||
String tapdId = getProjectId("");
|
||||
|
||||
TestCaseIssuesExample example = new TestCaseIssuesExample();
|
||||
example.createCriteria().andTestCaseIdEqualTo(testCaseId);
|
||||
|
@ -67,18 +67,22 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
|
||||
@Override
|
||||
public List<DemandDTO> getDemandList(String projectId) {
|
||||
System.out.println(projectId);
|
||||
List<DemandDTO> demandList = new ArrayList<>();
|
||||
String url = "https://api.tapd.cn/stories?workspace_id=" + projectId;
|
||||
try {
|
||||
String url = "https://api.tapd.cn/stories?workspace_id=" + getProjectId(projectId);
|
||||
ResultHolder call = call(url);
|
||||
String listJson = JSON.toJSONString(call.getData());
|
||||
JSONArray jsonArray = JSON.parseArray(listJson);
|
||||
System.out.println(jsonArray);
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
JSONObject o = jsonArray.getJSONObject(i);
|
||||
DemandDTO demand = o.getObject("Story", DemandDTO.class);
|
||||
demand.setPlatform(IssuesManagePlatform.Tapd.name());
|
||||
demandList.add(demand);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage());
|
||||
}
|
||||
|
||||
return demandList;
|
||||
}
|
||||
|
||||
|
@ -111,7 +115,7 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
public void addIssue(IssuesRequest issuesRequest) {
|
||||
String url = "https://api.tapd.cn/bugs";
|
||||
String testCaseId = issuesRequest.getTestCaseId();
|
||||
String tapdId = getProjectId();
|
||||
String tapdId = getProjectId("");
|
||||
|
||||
if (StringUtils.isBlank(tapdId)) {
|
||||
MSException.throwException("未关联Tapd 项目ID");
|
||||
|
@ -172,7 +176,7 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
@Override
|
||||
public List<PlatformUser> getPlatformUser() {
|
||||
List<PlatformUser> users = new ArrayList<>();
|
||||
String projectId = getProjectId();
|
||||
String projectId = getProjectId("");
|
||||
String url = "https://api.tapd.cn/workspaces/users?workspace_id=" + projectId;
|
||||
ResultHolder call = call(url);
|
||||
String listJson = JSON.toJSONString(call.getData());
|
||||
|
@ -186,7 +190,10 @@ public class TapdPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
@Override
|
||||
String getProjectId() {
|
||||
String getProjectId(String projectId) {
|
||||
if (StringUtils.isNotBlank(projectId)) {
|
||||
return projectService.getProjectById(projectId).getTapdId();
|
||||
}
|
||||
TestCaseWithBLOBs testCase = testCaseService.getTestCase(testCaseId);
|
||||
Project project = projectService.getProjectById(testCase.getProjectId());
|
||||
return project.getTapdId();
|
||||
|
|
|
@ -48,7 +48,10 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
}
|
||||
|
||||
@Override
|
||||
String getProjectId() {
|
||||
String getProjectId(String projectId) {
|
||||
if (StringUtils.isNotBlank(projectId)) {
|
||||
return projectService.getProjectById(projectId).getZentaoId();
|
||||
}
|
||||
TestCaseWithBLOBs testCase = testCaseService.getTestCase(testCaseId);
|
||||
Project project = projectService.getProjectById(testCase.getProjectId());
|
||||
return project.getZentaoId();
|
||||
|
@ -88,7 +91,39 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
|
||||
@Override
|
||||
public List<DemandDTO> getDemandList(String projectId) {
|
||||
return null;
|
||||
//getTestStories
|
||||
List<DemandDTO> list = new ArrayList<>();
|
||||
try {
|
||||
String session = login();
|
||||
String key = getProjectId(projectId);
|
||||
HttpEntity<MultiValueMap> requestEntity = new HttpEntity<>(new HttpHeaders());
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
ResponseEntity<String> responseEntity = restTemplate.exchange(url + "api-getModel-story-getProductStories-productID={key}?zentaosid=" + session,
|
||||
HttpMethod.POST, requestEntity, String.class, key);
|
||||
String body = responseEntity.getBody();
|
||||
JSONObject obj = JSONObject.parseObject(body);
|
||||
|
||||
LogUtil.info("project story" + key + obj);
|
||||
|
||||
if (obj != null) {
|
||||
JSONObject data = obj.getJSONObject("data");
|
||||
String s = JSON.toJSONString(data);
|
||||
Map<String, Object> map = JSONArray.parseObject(s, Map.class);
|
||||
Collection<Object> values = map.values();
|
||||
values.forEach(v -> {
|
||||
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(v));
|
||||
DemandDTO demandDTO = new DemandDTO();
|
||||
demandDTO.setId(jsonObject.getString("id"));
|
||||
demandDTO.setName(jsonObject.getString("title"));
|
||||
demandDTO.setPlatform(IssuesManagePlatform.Zentao.name());
|
||||
list.add(demandDTO);
|
||||
});
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogUtil.error("get zentao bug fail " + e.getMessage());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
private Issues getZentaoIssues(String bugId) {
|
||||
|
@ -135,7 +170,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
public void addIssue(IssuesRequest issuesRequest) {
|
||||
|
||||
String session = login();
|
||||
String projectId = getProjectId();
|
||||
String projectId = getProjectId(null);
|
||||
|
||||
if (StringUtils.isBlank(projectId)) {
|
||||
MSException.throwException("add zentao bug fail, project zentao id is null");
|
||||
|
@ -279,7 +314,7 @@ public class ZentaoPlatform extends AbstractIssuePlatform {
|
|||
|
||||
public List<ZentaoBuild> getBuilds() {
|
||||
String session = login();
|
||||
String projectId = getProjectId();
|
||||
String projectId = getProjectId(null);
|
||||
HttpHeaders httpHeaders = new HttpHeaders();
|
||||
HttpEntity<MultiValueMap> requestEntity = new HttpEntity<>(httpHeaders);
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
|
|
|
@ -32,9 +32,7 @@ public class DemandService {
|
|||
public List<DemandDTO> getDemandList(String projectId) {
|
||||
Project project = projectMapper.selectByPrimaryKey(projectId);
|
||||
SessionUser user = SessionUtils.getUser();
|
||||
/*
|
||||
String orgId = "88aceecf-5764-4094-96a9-f82bd52e77ad";
|
||||
*/
|
||||
|
||||
String orgId = user.getLastOrganizationId();
|
||||
boolean tapd = issuesService.isIntegratedPlatform(orgId, IssuesManagePlatform.Tapd.toString());
|
||||
boolean jira = issuesService.isIntegratedPlatform(orgId, IssuesManagePlatform.Jira.toString());
|
||||
|
@ -48,7 +46,6 @@ public class DemandService {
|
|||
if (StringUtils.isNotBlank(tapdId)) {
|
||||
platforms.add(IssuesManagePlatform.Tapd.name());
|
||||
}
|
||||
issueRequest.setProjectId(tapdId);
|
||||
}
|
||||
|
||||
if (jira) {
|
||||
|
@ -56,7 +53,6 @@ public class DemandService {
|
|||
if (StringUtils.isNotBlank(jiraKey)) {
|
||||
platforms.add(IssuesManagePlatform.Jira.name());
|
||||
}
|
||||
issueRequest.setProjectId(jiraKey);
|
||||
}
|
||||
|
||||
if (zentao) {
|
||||
|
@ -64,13 +60,14 @@ public class DemandService {
|
|||
if (StringUtils.isNotBlank(zentaoId)) {
|
||||
platforms.add(IssuesManagePlatform.Zentao.name());
|
||||
}
|
||||
issueRequest.setProjectId(zentaoId);
|
||||
}
|
||||
|
||||
List<AbstractIssuePlatform> platformList = IssueFactory.createPlatforms(platforms, issueRequest);
|
||||
platformList.forEach(platform -> {
|
||||
List<DemandDTO> demand = platform.getDemandList(issueRequest.getProjectId());
|
||||
List<DemandDTO> demand = platform.getDemandList(projectId);
|
||||
list.addAll(demand);
|
||||
});
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,9 @@ public class TestPlanReportService {
|
|||
*/
|
||||
public TestPlanReport genTestPlanReport(String planId, String userId,String triggerMode) {
|
||||
TestPlan testPlan = testPlanMapper.selectByPrimaryKey(planId);
|
||||
|
||||
testPlan.setExecutionTimes(1);
|
||||
testPlan.setExecutionTimes(testPlan.getExecutionTimes() + 1);
|
||||
testPlanMapper.updateByPrimaryKey(testPlan);
|
||||
TestPlanApiCaseExample apiExample = new TestPlanApiCaseExample();
|
||||
apiExample.createCriteria().andTestPlanIdEqualTo(planId);
|
||||
List<String> apiCaseIdList = testPlanApiCaseMapper.selectByExample(apiExample)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit efd6af73b7c5cc53cd4515772000bc1436c49837
|
||||
Subproject commit adefde265ff12d4ea909353c3f46008f8a8e17e7
|
|
@ -159,3 +159,6 @@ UPDATE file_metadata JOIN (SELECT file_id, project_id
|
|||
FROM api_test_file
|
||||
JOIN api_test ON test_id = api_test.id) temp ON file_id = file_metadata.id
|
||||
SET file_metadata.project_id = temp.project_id;
|
||||
-- add execution_times testPlan
|
||||
alter table test_plan
|
||||
add execution_times int null;
|
|
@ -75,7 +75,7 @@
|
|||
<table tableName="test_case_review_api_case"/>
|
||||
<table tableName="test_case_review_load"/>
|
||||
<table tableName="test_case_review_scenario"/>
|
||||
|
||||
<table tableName="test_plan"/>
|
||||
|
||||
</context>
|
||||
</generatorConfiguration>
|
|
@ -1,23 +1,25 @@
|
|||
<template>
|
||||
<el-card class="api-component">
|
||||
<el-card>
|
||||
<div class="header" @click="active(data)">
|
||||
<slot name="beforeHeaderLeft">
|
||||
<div v-if="data.index" class="el-step__icon is-text" style="margin-right: 10px;" :style="{'color': color, 'background-color': backgroundColor}">
|
||||
<div class="el-step__icon-inner">{{data.index}}</div>
|
||||
</div>
|
||||
<el-tag class="ms-left-buttion" size="small" :style="{'color': color, 'background-color': backgroundColor}">{{title}}</el-tag>
|
||||
<el-tag class="ms-left-btn" size="small" :style="{'color': color, 'background-color': backgroundColor}">{{title}}</el-tag>
|
||||
<el-tag size="mini" v-if="data.method">{{data.method}}</el-tag>
|
||||
</slot>
|
||||
|
||||
<span @click.stop>
|
||||
<span>
|
||||
<slot name="headerLeft">
|
||||
<i class="icon el-icon-arrow-right" :class="{'is-active': data.active}"
|
||||
@click="active(data)" v-if="data.type!='scenario' && !isMax "/>
|
||||
<el-input :draggable="draggable" v-if="isShowInput && isShowNameInput" size="mini" v-model="data.name" class="name-input"
|
||||
@click="active(data)" v-if="data.type!='scenario' && data.type!='JmeterElement' && !isMax " @click.stop/>
|
||||
<span @click.stop v-if="isShowInput && isShowNameInput">
|
||||
<el-input :draggable="draggable" size="mini" v-model="data.name" class="name-input"
|
||||
@blur="isShowInput = false" :placeholder="$t('commons.input_name')" ref="nameEdit" :disabled="data.disabled"/>
|
||||
<span v-else>
|
||||
</span>
|
||||
<span :class="isMax?'ms-step-name':'scenario-name'" v-else>
|
||||
{{data.name}}
|
||||
<i class="el-icon-edit" style="cursor:pointer" @click="editName" v-tester v-if="data.referenced!='REF' && !data.disabled"/>
|
||||
<i class="el-icon-edit" style="cursor:pointer" @click="editName" v-tester v-if="data.referenced!='REF' && !data.disabled" @click.stop/>
|
||||
</span>
|
||||
</slot>
|
||||
<slot name="behindHeaderLeft" v-if="!isMax"></slot>
|
||||
|
@ -159,7 +161,8 @@
|
|||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.ms-left-buttion {
|
||||
.ms-left-btn {
|
||||
font-size: 13px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
|
@ -173,15 +176,24 @@
|
|||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.node-title {
|
||||
.ms-step-name {
|
||||
display: inline-block;
|
||||
margin: 0px;
|
||||
font-size: 13px;
|
||||
margin: 0 5px;
|
||||
overflow-x: hidden;
|
||||
padding-bottom: 0;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
width: 100px;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.scenario-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 13px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ .el-step__icon {
|
||||
|
|
|
@ -275,7 +275,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.request.active = true;
|
||||
this.loading = true;
|
||||
this.runData = [];
|
||||
|
@ -295,6 +294,7 @@
|
|||
this.request.requestResult = data;
|
||||
this.request.result = undefined;
|
||||
this.loading = false;
|
||||
this.$emit('refReload',this.request,this.node);
|
||||
},
|
||||
reload() {
|
||||
this.loading = true
|
||||
|
|
|
@ -130,8 +130,8 @@
|
|||
suggestClick(node) {
|
||||
this.$emit('suggestClick', node);
|
||||
},
|
||||
refReload() {
|
||||
this.$emit('refReload');
|
||||
refReload(data, node) {
|
||||
this.$emit('refReload', data, node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
<ms-aside-container>
|
||||
<!-- 场景步骤内容 -->
|
||||
<div v-loading="loading">
|
||||
<el-tree node-key="resourceId" :props="props" :data="scenarioDefinition"
|
||||
<el-tree node-key="resourceId"
|
||||
:props="props"
|
||||
:data="scenarioDefinition"
|
||||
:default-expanded-keys="expandedNode"
|
||||
:expand-on-click-node="false"
|
||||
highlight-current
|
||||
|
@ -14,12 +16,21 @@
|
|||
:allow-drop="allowDrop" @node-drag-end="allowDrag" @node-click="nodeClick" v-if="!loading" draggable>
|
||||
<span class="custom-tree-node father" slot-scope="{ node, data}">
|
||||
<!-- 步骤组件-->
|
||||
<ms-component-config :isMax="true" :type="data.type" :scenario="data" :response="response" :currentScenario="currentScenario"
|
||||
:currentEnvironmentId="currentEnvironmentId" :node="node" :project-list="projectList" :env-map="projectEnvMap"
|
||||
@remove="remove" @copyRow="copyRow" @suggestClick="suggestClick" @refReload="refReload" @openScenario="openScenario"/>
|
||||
<ms-component-config
|
||||
:isMax="true"
|
||||
:type="data.type"
|
||||
:scenario="data"
|
||||
:response="response"
|
||||
:currentScenario="currentScenario"
|
||||
:currentEnvironmentId="currentEnvironmentId"
|
||||
:node="node"
|
||||
:project-list="projectList"
|
||||
:env-map="projectEnvMap"
|
||||
@remove="remove" @copyRow="copyRow"
|
||||
@suggestClick="suggestClick"
|
||||
@refReload="refReload" @openScenario="openScenario"/>
|
||||
</span>
|
||||
</el-tree>
|
||||
|
||||
<div @click="fabClick">
|
||||
<vue-fab id="fab" mainBtnColor="#783887" size="small" :global-options="globalOptions"
|
||||
:click-auto-close="false">
|
||||
|
@ -39,9 +50,10 @@
|
|||
</div>
|
||||
</ms-aside-container>
|
||||
|
||||
<ms-main-container>
|
||||
<ms-main-container v-if="!loading">
|
||||
<!-- 第一层当前节点内容-->
|
||||
<ms-component-config :isMax="false"
|
||||
<ms-component-config
|
||||
:isMax="false"
|
||||
:showBtn="false"
|
||||
:type="selectedTreeNode.type"
|
||||
:scenario="selectedTreeNode"
|
||||
|
@ -57,7 +69,8 @@
|
|||
<!-- 请求下还有的子步骤-->
|
||||
<div v-if="selectedTreeNode && selectedTreeNode.hashTree && showNode(selectedTreeNode)">
|
||||
<div v-for="item in selectedTreeNode.hashTree" :key="item.id" class="ms-col-one">
|
||||
<ms-component-config :showBtn="false"
|
||||
<ms-component-config
|
||||
:showBtn="false"
|
||||
:isMax="false"
|
||||
:type="item.type"
|
||||
:scenario="item"
|
||||
|
@ -70,10 +83,8 @@
|
|||
@remove="remove" @copyRow="copyRow" @suggestClick="suggestClick"
|
||||
@refReload="refReload" @openScenario="openScenario"
|
||||
v-if="selectedTreeNode && selectedNode"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ms-main-container>
|
||||
</ms-container>
|
||||
|
||||
|
@ -224,6 +235,11 @@
|
|||
this.operatingElements = ELEMENTS.get("ALL");
|
||||
this.projectEnvMap = this.envMap;
|
||||
},
|
||||
watch: {
|
||||
envMap() {
|
||||
this.projectEnvMap = this.envMap;
|
||||
}
|
||||
},
|
||||
directives: {OutsideClick},
|
||||
computed: {
|
||||
buttons() {
|
||||
|
@ -866,8 +882,7 @@
|
|||
this.currentScenario.apiScenarioModuleId = this.currentModule.id;
|
||||
}
|
||||
this.currentScenario.projectId = this.projectId;
|
||||
}
|
||||
,
|
||||
},
|
||||
runRefresh() {
|
||||
this.debugVisible = true;
|
||||
this.loading = false;
|
||||
|
@ -900,7 +915,9 @@
|
|||
setProjectEnvMap(projectEnvMap) {
|
||||
this.projectEnvMap = projectEnvMap;
|
||||
},
|
||||
refReload() {
|
||||
refReload(data,node) {
|
||||
this.selectedTreeNode = data;
|
||||
this.selectedNode = node;
|
||||
this.initProjectIds();
|
||||
this.reload();
|
||||
},
|
||||
|
|
|
@ -43,6 +43,14 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.scenario-aside {
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #EBEEF5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
||||
.hiddenBottom i {
|
||||
margin-left: -2px;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,9 @@ export const Test_Plan_List = [
|
|||
{id: 'plannedEndTime', label: i18n.t('test_track.plan.planned_end_time')},
|
||||
{id: 'actualStartTime', label: i18n.t('test_track.plan.actual_start_time')},
|
||||
{id: 'actualEndTime', label: i18n.t('test_track.plan.actual_end_time')},
|
||||
{id:'tags',label:i18n.t('commons.tag')},
|
||||
{id:'executionTimes',label:i18n.t('commons.execution_times')},
|
||||
{id:'passRate',label:i18n.t('commons.pass_rate')}
|
||||
]
|
||||
//接口定义-api列表
|
||||
export const Api_List = [
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
v-model="threadGroup.rpsLimit"
|
||||
@change="calculateChart(threadGroup)"
|
||||
:min="1"
|
||||
:max="500"
|
||||
:max="99999"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
|
@ -112,7 +112,7 @@
|
|||
:disabled="isReadOnly"
|
||||
v-model="threadGroup.iterateNum"
|
||||
:min="1"
|
||||
:max="10000"
|
||||
:max="9999999"
|
||||
@change="calculateChart(threadGroup)"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
|
@ -124,7 +124,7 @@
|
|||
:disabled="isReadOnly || !threadGroup.rpsLimitEnable"
|
||||
v-model="threadGroup.rpsLimit"
|
||||
:min="1"
|
||||
:max="500"
|
||||
:max="99999"
|
||||
size="mini"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
|
|
|
@ -92,6 +92,27 @@
|
|||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column v-if="item.id == 'tags'" prop="tags"
|
||||
:label="$t('api_test.automation.tag')" :key="index">
|
||||
<template v-slot:default="scope">
|
||||
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
||||
:content="itemName" style="margin-left: 5px"></ms-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'executionTimes'"
|
||||
prop="executionTimes"
|
||||
:label="$t('commons.execution_times')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'passRate'"
|
||||
prop="passRate"
|
||||
:label="$t('commons.pass_rate')"
|
||||
show-overflow-tooltip
|
||||
:key="index">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
v-if="item.id == 'plannedStartTime'"
|
||||
sortable
|
||||
|
@ -206,11 +227,13 @@ import {TEST_CASE_LIST, TEST_PLAN_LIST} from "@/common/js/constants";
|
|||
import {Test_Plan_List, Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||
import MsTag from "@/business/components/common/components/MsTag";
|
||||
|
||||
|
||||
export default {
|
||||
name: "TestPlanList",
|
||||
components: {
|
||||
MsTag,
|
||||
HeaderLabelOperate,
|
||||
HeaderCustom,
|
||||
MsDeleteConfirm,
|
||||
|
@ -281,8 +304,19 @@ export default {
|
|||
let data = response.data;
|
||||
this.total = data.itemCount;
|
||||
this.tableData = data.listObject;
|
||||
this.tableData.forEach(item => {
|
||||
if (item.tags && item.tags.length > 0) {
|
||||
item.tags = JSON.parse(item.tags);
|
||||
}
|
||||
item.passRate=item.passRate+'%'
|
||||
})
|
||||
console.log(this.tableData)
|
||||
|
||||
});
|
||||
},
|
||||
copyData(status) {
|
||||
return JSON.parse(JSON.stringify(this.dataMap.get(status)))
|
||||
},
|
||||
buildPagePath(path) {
|
||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||
},
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<slot name="footer"></slot>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div style="margin-bottom: 15px;margin-right: 0">
|
||||
<div style="margin-bottom: 15px" v-if="flag">
|
||||
<el-checkbox v-model="checked">同步添加关联的接口和性能测试</el-checkbox>
|
||||
</div>
|
||||
<ms-dialog-footer @cancel="close" @confirm="save"/>
|
||||
|
@ -62,6 +62,9 @@
|
|||
default() {
|
||||
return this.$t('test_track.plan_view.relevance_test_case');
|
||||
}
|
||||
},
|
||||
flag:{
|
||||
type:Boolean,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
@setProject="setProject"
|
||||
@save="saveCaseRelevance"
|
||||
:plan-id="planId"
|
||||
:flag="true"
|
||||
ref="baseRelevance">
|
||||
|
||||
<template v-slot:aside>
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
<template>
|
||||
<div class="card-container">
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||
<ms-table-header :is-,tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||
:show-create="false" :tip="$t('commons.search_by_name_or_id')">
|
||||
<template v-slot:title>
|
||||
<node-breadcrumb class="table-title" :nodes="selectParentNodes" @refresh="refresh"
|
||||
:title="$t('test_track.review_view.all_case')"/>
|
||||
</template>
|
||||
<template v-slot:button>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-video-play"
|
||||
:content="$t('test_track.review_view.start_review')" @click="startReview"/>
|
||||
|
@ -471,5 +467,11 @@ export default {
|
|||
.ms-table-header {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
/deep/ .table-title {
|
||||
height: 0px;
|
||||
font-weight: bold;
|
||||
font-size: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f2781219889c2f993436bcc3ea90038f588fa73e
|
||||
Subproject commit d3c3ba983502dc9864db88645af392e36004f301
|
|
@ -1,5 +1,7 @@
|
|||
export default {
|
||||
commons: {
|
||||
pass_rate:'Pass rate',
|
||||
execution_times:'Execution times',
|
||||
cover: 'Cover',
|
||||
not_cover: 'Not Cover',
|
||||
import: 'Import',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
export default {
|
||||
commons: {
|
||||
pass_rate:'通过率',
|
||||
execution_times:'执行次数',
|
||||
cover: '覆盖',
|
||||
not_cover: '不覆盖',
|
||||
import: '导入',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
export default {
|
||||
commons: {
|
||||
pass_rate:'通過率',
|
||||
execution_times:'執行次數',
|
||||
cover: '覆蓋',
|
||||
not_cover: '不覆蓋',
|
||||
import: '導入',
|
||||
|
|
Loading…
Reference in New Issue