Browse Source

增加环境变量

master
陈裕财 3 years ago
parent
commit
2dd2bd86f8
  1. 23
      xm-core/src/main/java/com/xm/core/entity/XmTestPlan.java
  2. 5
      xm-core/src/main/java/com/xm/core/entity/XmTestPlanCase.java
  3. 12
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml
  4. 36
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanMapper.xml

23
xm-core/src/main/java/com/xm/core/entity/XmTestPlan.java

@ -9,7 +9,7 @@ import java.math.BigDecimal;
/** /**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> * 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmTestPlan所有属性名: <br> * 实体 XmTestPlan所有属性名: <br>
* "id","测试计划编号","name","计划名称","casedbId","用例库编号","casedbName","用例库名称","projectId","项目编号","projectName","项目名称","cuserid","创建人编号","cusername","创建人名称","ctime","创建时间","stime","开始时间","etime","结束时间","status","状态0-未开始,1-进行中,2已结束","tcode","测试结果0未通过,1已通过","totalCases","总用例数","okCases","通过用例数","errCases","失败用例数","igCases","忽略用例数","blCases","阻塞用例数","toTestCases","未测用例数","productId","产品编号","productName","产品名称","flowState","评审结果0-待评审,1-已评审通过,2-已拒绝","bugCnt","bug数目","closedBugs","已关闭bug总数","resolvedBugs","已解决bug总数","activeBugs","激活的bug总数","confirmedBugs","已解决bug总数","menus","需求数目","funcs","功能模块数","budgetWorkload","预算工时","actWorkload","实际工时","summaryRemark","报告总结","cbranchId","创建机构编号","pbranchId","产品归属企业","ptype","计划类型0-普通测试,2-迭代测试,1-发布测试,","envJson","环境变量列表","testType","测试方式0-手工,1-自动";<br>
* "id","测试计划编号","name","计划名称","casedbId","用例库编号","casedbName","用例库名称","projectId","项目编号","projectName","项目名称","cuserid","创建人编号","cusername","创建人名称","ctime","创建时间","stime","开始时间","etime","结束时间","status","状态0-未开始,1-进行中,2已结束","tcode","测试结果0未通过,1已通过","totalCases","总用例数","okCases","通过用例数","errCases","失败用例数","igCases","忽略用例数","blCases","阻塞用例数","toTestCases","未测用例数","productId","产品编号","productName","产品名称","flowState","评审结果0-待评审,1-已评审通过,2-已拒绝","bugCnt","bug数目","closedBugs","已关闭bug总数","resolvedBugs","已解决bug总数","activeBugs","激活的bug总数","confirmedBugs","已解决bug总数","menus","需求数目","funcs","功能模块数","budgetWorkload","预算工时","actWorkload","实际工时","summaryRemark","报告总结","cbranchId","创建机构编号","pbranchId","产品归属企业","ptype","计划类型0-普通测试,2-迭代测试,1-发布测试,","envJson","环境变量列表","testType","测试方式0-手工,1-自动","execCfgCron","执行计划","execCfgTimes","循环执行次数","execCfgThreads","线程数","execTimes","总请求次数","execStime","开始执行时间","execEtime","结束执行时间","execStatus","执行状态0-未开始,1待执行,2-执行中,3-执行结束";<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* id;<br> * id;<br>
*/ */
@ -131,6 +131,27 @@ public class XmTestPlan implements java.io.Serializable {
@ApiModelProperty(notes="测试方式0-手工,1-自动",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="测试方式0-手工,1-自动",allowEmptyValue=true,example="",allowableValues="")
String testType; String testType;
@ApiModelProperty(notes="执行计划",allowEmptyValue=true,example="",allowableValues="")
String execCfgCron;
@ApiModelProperty(notes="循环执行次数",allowEmptyValue=true,example="",allowableValues="")
Date execCfgTimes;
@ApiModelProperty(notes="线程数",allowEmptyValue=true,example="",allowableValues="")
Integer execCfgThreads;
@ApiModelProperty(notes="总请求次数",allowEmptyValue=true,example="",allowableValues="")
Integer execTimes;
@ApiModelProperty(notes="开始执行时间",allowEmptyValue=true,example="",allowableValues="")
Date execStime;
@ApiModelProperty(notes="结束执行时间",allowEmptyValue=true,example="",allowableValues="")
Date execEtime;
@ApiModelProperty(notes="执行状态0-未开始,1待执行,2-执行中,3-执行结束",allowEmptyValue=true,example="",allowableValues="")
String execStatus;
/** /**
*测试计划编号 *测试计划编号
**/ **/

5
xm-core/src/main/java/com/xm/core/entity/XmTestPlanCase.java

@ -9,7 +9,7 @@ import java.math.BigDecimal;
/** /**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br> * 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmTestPlanCase所有属性名: <br> * 实体 XmTestPlanCase所有属性名: <br>
* "bugs","bug数目","execUserid","执行人","caseId","测试用例编号","ltime","更新时间","ctime","创建时间","execStatus","0-未测,1-通过,2-受阻,3-忽略,4-失败","execUsername","执行人姓名","priority","优先级","remark","执行备注","testStep","测试步骤","planId","计划编号","projectId","项目编号","budgetWorkload","预算工时","actWorkload","实际工时","initWorkload","原估工时","execDate","执行日期,以执行状态变更日期为准yyyy-MM-dd型","execType","执行类型0-手工,1-自动化","productId","归属产品","autoStep","自动化测试";<br>
* "bugs","bug数目","execUserid","执行人","caseId","测试用例编号","ltime","更新时间","ctime","创建时间","execStatus","0-未测,1-通过,2-受阻,3-忽略,4-失败","execUsername","执行人姓名","priority","优先级","remark","执行备注","testStep","测试步骤","planId","计划编号","projectId","项目编号","budgetWorkload","预算工时","actWorkload","实际工时","initWorkload","原估工时","execDate","执行日期,以执行状态变更日期为准yyyy-MM-dd型","execType","执行类型0-手工,1-自动化","productId","归属产品";<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* case_id,plan_id;<br> * case_id,plan_id;<br>
*/ */
@ -74,9 +74,6 @@ public class XmTestPlanCase implements java.io.Serializable {
@ApiModelProperty(notes="归属产品",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="归属产品",allowEmptyValue=true,example="",allowableValues="")
String productId; String productId;
@ApiModelProperty(notes="自动化测试",allowEmptyValue=true,example="",allowableValues="")
String autoStep;
/** /**
*测试用例编号,计划编号 *测试用例编号,计划编号
**/ **/

12
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanCaseMapper.xml

@ -199,7 +199,7 @@
insert into xm_test_plan_case( insert into xm_test_plan_case(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{bugs},#{execUserid},#{caseId},#{ltime},#{ctime},#{execStatus},#{execUsername},#{priority},#{remark},#{testStep},#{planId},#{projectId},#{budgetWorkload},#{actWorkload},#{initWorkload},#{execDate},#{execType},#{productId},#{autoStep}
#{bugs},#{execUserid},#{caseId},#{ltime},#{ctime},#{execStatus},#{execUsername},#{priority},#{remark},#{testStep},#{planId},#{projectId},#{budgetWorkload},#{actWorkload},#{initWorkload},#{execDate},#{execType},#{productId}
) )
</insert> </insert>
@ -274,7 +274,7 @@
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
bugs,exec_userid,case_id,ltime,ctime,exec_status,exec_username,priority,remark,test_step,plan_id,project_id,budget_workload,act_workload,init_workload,exec_date,exec_type,product_id,auto_step
bugs,exec_userid,case_id,ltime,ctime,exec_status,exec_username,priority,remark,test_step,plan_id,project_id,budget_workload,act_workload,init_workload,exec_date,exec_type,product_id
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -297,7 +297,6 @@
<if test="execDate != null and execDate != ''"> and res.exec_date = #{execDate} </if> <if test="execDate != null and execDate != ''"> and res.exec_date = #{execDate} </if>
<if test="execType != null and execType != ''"> and res.exec_type = #{execType} </if> <if test="execType != null and execType != ''"> and res.exec_type = #{execType} </if>
<if test="productId != null and productId != ''"> and res.product_id = #{productId} </if> <if test="productId != null and productId != ''"> and res.product_id = #{productId} </if>
<if test="autoStep != null and autoStep != ''"> and res.auto_step = #{autoStep} </if>
</sql> </sql>
<!--sql片段 更新字段 --> <!--sql片段 更新字段 -->
<sql id="set"> <sql id="set">
@ -316,8 +315,7 @@
init_workload = #{initWorkload}, init_workload = #{initWorkload},
exec_date = #{execDate}, exec_date = #{execDate},
exec_type = #{execType}, exec_type = #{execType},
product_id = #{productId},
auto_step = #{autoStep}
product_id = #{productId}
</sql> </sql>
<sql id="someFieldSet"> <sql id="someFieldSet">
<if test="bugs != null and bugs != ''"> bugs = #{bugs}, </if> <if test="bugs != null and bugs != ''"> bugs = #{bugs}, </if>
@ -336,7 +334,6 @@
<if test="execDate != null and execDate != ''"> exec_date = #{execDate}, </if> <if test="execDate != null and execDate != ''"> exec_date = #{execDate}, </if>
<if test="execType != null and execType != ''"> exec_type = #{execType}, </if> <if test="execType != null and execType != ''"> exec_type = #{execType}, </if>
<if test="productId != null and productId != ''"> product_id = #{productId}, </if> <if test="productId != null and productId != ''"> product_id = #{productId}, </if>
<if test="autoStep != null and autoStep != ''"> auto_step = #{autoStep}, </if>
</sql> </sql>
<!--sql片段 批量更新 --> <!--sql片段 批量更新 -->
<sql id="batchSet"> <sql id="batchSet">
@ -355,7 +352,6 @@
init_workload = #{item.initWorkload}, init_workload = #{item.initWorkload},
exec_date = #{item.execDate}, exec_date = #{item.execDate},
exec_type = #{item.execType}, exec_type = #{item.execType},
product_id = #{item.productId},
auto_step = #{item.autoStep}
product_id = #{item.productId}
</sql> </sql>
</mapper> </mapper>

36
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTestPlanMapper.xml

@ -132,7 +132,7 @@
insert into xm_test_plan( insert into xm_test_plan(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{id},#{name},#{casedbId},#{casedbName},#{projectId},#{projectName},#{cuserid},#{cusername},#{ctime},#{stime},#{etime},#{status},#{tcode},#{totalCases},#{okCases},#{errCases},#{igCases},#{blCases},#{toTestCases},#{productId},#{productName},#{flowState},#{bugCnt},#{closedBugs},#{resolvedBugs},#{activeBugs},#{confirmedBugs},#{menus},#{funcs},#{budgetWorkload},#{actWorkload},#{summaryRemark},#{cbranchId},#{pbranchId},#{ptype},#{envJson},#{testType}
#{id},#{name},#{casedbId},#{casedbName},#{projectId},#{projectName},#{cuserid},#{cusername},#{ctime},#{stime},#{etime},#{status},#{tcode},#{totalCases},#{okCases},#{errCases},#{igCases},#{blCases},#{toTestCases},#{productId},#{productName},#{flowState},#{bugCnt},#{closedBugs},#{resolvedBugs},#{activeBugs},#{confirmedBugs},#{menus},#{funcs},#{budgetWorkload},#{actWorkload},#{summaryRemark},#{cbranchId},#{pbranchId},#{ptype},#{envJson},#{testType},#{execCfgCron},#{execCfgTimes},#{execCfgThreads},#{execTimes},#{execStime},#{execEtime},#{execStatus}
) )
</insert> </insert>
@ -207,7 +207,7 @@
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
id,name,casedb_id,casedb_name,project_id,project_name,cuserid,cusername,ctime,stime,etime,status,tcode,total_cases,ok_cases,err_cases,ig_cases,bl_cases,to_test_cases,product_id,product_name,flow_state,bug_cnt,closed_bugs,resolved_bugs,active_bugs,confirmed_bugs,menus,funcs,budget_workload,act_workload,summary_remark,cbranch_id,pbranch_id,ptype,env_json,test_type
id,name,casedb_id,casedb_name,project_id,project_name,cuserid,cusername,ctime,stime,etime,status,tcode,total_cases,ok_cases,err_cases,ig_cases,bl_cases,to_test_cases,product_id,product_name,flow_state,bug_cnt,closed_bugs,resolved_bugs,active_bugs,confirmed_bugs,menus,funcs,budget_workload,act_workload,summary_remark,cbranch_id,pbranch_id,ptype,env_json,test_type,exec_cfg_cron,exec_cfg_times,exec_cfg_threads,exec_times,exec_stime,exec_etime,exec_status
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -249,6 +249,13 @@
<if test="ptype != null and ptype != ''"> and res.ptype = #{ptype} </if> <if test="ptype != null and ptype != ''"> and res.ptype = #{ptype} </if>
<if test="envJson != null and envJson != ''"> and res.env_json = #{envJson} </if> <if test="envJson != null and envJson != ''"> and res.env_json = #{envJson} </if>
<if test="testType != null and testType != ''"> and res.test_type = #{testType} </if> <if test="testType != null and testType != ''"> and res.test_type = #{testType} </if>
<if test="execCfgCron != null and execCfgCron != ''"> and res.exec_cfg_cron = #{execCfgCron} </if>
<if test="execCfgTimes != null"> and date_format(res.exec_cfg_times,'%Y-%m-%d') = date_format(#{execCfgTimes},'%Y-%m-%d') </if>
<if test="execCfgThreads != null and execCfgThreads != ''"> and res.exec_cfg_threads = #{execCfgThreads} </if>
<if test="execTimes != null and execTimes != ''"> and res.exec_times = #{execTimes} </if>
<if test="execStime != null"> and date_format(res.exec_stime,'%Y-%m-%d') = date_format(#{execStime},'%Y-%m-%d') </if>
<if test="execEtime != null"> and date_format(res.exec_etime,'%Y-%m-%d') = date_format(#{execEtime},'%Y-%m-%d') </if>
<if test="execStatus != null and execStatus != ''"> and res.exec_status = #{execStatus} </if>
</sql> </sql>
<!--sql片段 更新字段 --> <!--sql片段 更新字段 -->
<sql id="set"> <sql id="set">
@ -287,7 +294,14 @@
pbranch_id = #{pbranchId}, pbranch_id = #{pbranchId},
ptype = #{ptype}, ptype = #{ptype},
env_json = #{envJson}, env_json = #{envJson},
test_type = #{testType}
test_type = #{testType},
exec_cfg_cron = #{execCfgCron},
exec_cfg_times = #{execCfgTimes},
exec_cfg_threads = #{execCfgThreads},
exec_times = #{execTimes},
exec_stime = #{execStime},
exec_etime = #{execEtime},
exec_status = #{execStatus}
</sql> </sql>
<sql id="someFieldSet"> <sql id="someFieldSet">
<if test="name != null and name != ''"> name = #{name}, </if> <if test="name != null and name != ''"> name = #{name}, </if>
@ -326,6 +340,13 @@
<if test="ptype != null and ptype != ''"> ptype = #{ptype}, </if> <if test="ptype != null and ptype != ''"> ptype = #{ptype}, </if>
<if test="envJson != null and envJson != ''"> env_json = #{envJson}, </if> <if test="envJson != null and envJson != ''"> env_json = #{envJson}, </if>
<if test="testType != null and testType != ''"> test_type = #{testType}, </if> <if test="testType != null and testType != ''"> test_type = #{testType}, </if>
<if test="execCfgCron != null and execCfgCron != ''"> exec_cfg_cron = #{execCfgCron}, </if>
<if test="execCfgTimes != null"> exec_cfg_times = #{execCfgTimes}, </if>
<if test="execCfgThreads != null and execCfgThreads != ''"> exec_cfg_threads = #{execCfgThreads}, </if>
<if test="execTimes != null and execTimes != ''"> exec_times = #{execTimes}, </if>
<if test="execStime != null"> exec_stime = #{execStime}, </if>
<if test="execEtime != null"> exec_etime = #{execEtime}, </if>
<if test="execStatus != null and execStatus != ''"> exec_status = #{execStatus}, </if>
</sql> </sql>
<!--sql片段 批量更新 --> <!--sql片段 批量更新 -->
<sql id="batchSet"> <sql id="batchSet">
@ -364,6 +385,13 @@
pbranch_id = #{item.pbranchId}, pbranch_id = #{item.pbranchId},
ptype = #{item.ptype}, ptype = #{item.ptype},
env_json = #{item.envJson}, env_json = #{item.envJson},
test_type = #{item.testType}
test_type = #{item.testType},
exec_cfg_cron = #{item.execCfgCron},
exec_cfg_times = #{item.execCfgTimes},
exec_cfg_threads = #{item.execCfgThreads},
exec_times = #{item.execTimes},
exec_stime = #{item.execStime},
exec_etime = #{item.execEtime},
exec_status = #{item.execStatus}
</sql> </sql>
</mapper> </mapper>
Loading…
Cancel
Save