feat: 手动保存测试计划报告
This commit is contained in:
parent
2981056c05
commit
fdca09423e
|
@ -35,5 +35,7 @@ public class TestPlanReport implements Serializable {
|
|||
|
||||
private String components;
|
||||
|
||||
private Boolean isNew;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestPlanReportContent implements Serializable {
|
||||
private String id;
|
||||
|
||||
private String testPlanReportId;
|
||||
|
||||
private Long startTime;
|
||||
|
||||
private Long caseCount;
|
||||
|
||||
private Long endTime;
|
||||
|
||||
private Double executeRate;
|
||||
|
||||
private Double passRate;
|
||||
|
||||
private Boolean isThirdPartIssue;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -0,0 +1,700 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class TestPlanReportContentExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public TestPlanReportContentExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andIdIsNull() {
|
||||
addCriterion("id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIsNotNull() {
|
||||
addCriterion("id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdEqualTo(String value) {
|
||||
addCriterion("id =", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotEqualTo(String value) {
|
||||
addCriterion("id <>", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThan(String value) {
|
||||
addCriterion("id >", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("id >=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThan(String value) {
|
||||
addCriterion("id <", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("id <=", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdLike(String value) {
|
||||
addCriterion("id like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotLike(String value) {
|
||||
addCriterion("id not like", value, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdIn(List<String> values) {
|
||||
addCriterion("id in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotIn(List<String> values) {
|
||||
addCriterion("id not in", values, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdBetween(String value1, String value2) {
|
||||
addCriterion("id between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIdNotBetween(String value1, String value2) {
|
||||
addCriterion("id not between", value1, value2, "id");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdIsNull() {
|
||||
addCriterion("test_plan_report_id is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdIsNotNull() {
|
||||
addCriterion("test_plan_report_id is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdEqualTo(String value) {
|
||||
addCriterion("test_plan_report_id =", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdNotEqualTo(String value) {
|
||||
addCriterion("test_plan_report_id <>", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdGreaterThan(String value) {
|
||||
addCriterion("test_plan_report_id >", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_report_id >=", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdLessThan(String value) {
|
||||
addCriterion("test_plan_report_id <", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdLessThanOrEqualTo(String value) {
|
||||
addCriterion("test_plan_report_id <=", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdLike(String value) {
|
||||
addCriterion("test_plan_report_id like", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdNotLike(String value) {
|
||||
addCriterion("test_plan_report_id not like", value, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdIn(List<String> values) {
|
||||
addCriterion("test_plan_report_id in", values, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdNotIn(List<String> values) {
|
||||
addCriterion("test_plan_report_id not in", values, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_report_id between", value1, value2, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andTestPlanReportIdNotBetween(String value1, String value2) {
|
||||
addCriterion("test_plan_report_id not between", value1, value2, "testPlanReportId");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIsNull() {
|
||||
addCriterion("start_time is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIsNotNull() {
|
||||
addCriterion("start_time is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeEqualTo(Long value) {
|
||||
addCriterion("start_time =", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotEqualTo(Long value) {
|
||||
addCriterion("start_time <>", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeGreaterThan(Long value) {
|
||||
addCriterion("start_time >", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("start_time >=", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeLessThan(Long value) {
|
||||
addCriterion("start_time <", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeLessThanOrEqualTo(Long value) {
|
||||
addCriterion("start_time <=", value, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeIn(List<Long> values) {
|
||||
addCriterion("start_time in", values, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotIn(List<Long> values) {
|
||||
addCriterion("start_time not in", values, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeBetween(Long value1, Long value2) {
|
||||
addCriterion("start_time between", value1, value2, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStartTimeNotBetween(Long value1, Long value2) {
|
||||
addCriterion("start_time not between", value1, value2, "startTime");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountIsNull() {
|
||||
addCriterion("case_count is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountIsNotNull() {
|
||||
addCriterion("case_count is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountEqualTo(Long value) {
|
||||
addCriterion("case_count =", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountNotEqualTo(Long value) {
|
||||
addCriterion("case_count <>", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountGreaterThan(Long value) {
|
||||
addCriterion("case_count >", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountGreaterThanOrEqualTo(Long value) {
|
||||
addCriterion("case_count >=", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountLessThan(Long value) {
|
||||
addCriterion("case_count <", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountLessThanOrEqualTo(Long value) {
|
||||
addCriterion("case_count <=", value, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountIn(List<Long> values) {
|
||||
addCriterion("case_count in", values, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountNotIn(List<Long> values) {
|
||||
addCriterion("case_count not in", values, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountBetween(Long value1, Long value2) {
|
||||
addCriterion("case_count between", value1, value2, "caseCount");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaseCountNotBetween(Long value1, Long value2) {
|
||||
addCriterion("case_count not between", value1, value2, "caseCount");
|
||||
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 Criteria andExecuteRateIsNull() {
|
||||
addCriterion("execute_rate is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateIsNotNull() {
|
||||
addCriterion("execute_rate is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateEqualTo(Double value) {
|
||||
addCriterion("execute_rate =", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateNotEqualTo(Double value) {
|
||||
addCriterion("execute_rate <>", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateGreaterThan(Double value) {
|
||||
addCriterion("execute_rate >", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateGreaterThanOrEqualTo(Double value) {
|
||||
addCriterion("execute_rate >=", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateLessThan(Double value) {
|
||||
addCriterion("execute_rate <", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateLessThanOrEqualTo(Double value) {
|
||||
addCriterion("execute_rate <=", value, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateIn(List<Double> values) {
|
||||
addCriterion("execute_rate in", values, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateNotIn(List<Double> values) {
|
||||
addCriterion("execute_rate not in", values, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateBetween(Double value1, Double value2) {
|
||||
addCriterion("execute_rate between", value1, value2, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andExecuteRateNotBetween(Double value1, Double value2) {
|
||||
addCriterion("execute_rate not between", value1, value2, "executeRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIsNull() {
|
||||
addCriterion("pass_rate is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIsNotNull() {
|
||||
addCriterion("pass_rate is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateEqualTo(Double value) {
|
||||
addCriterion("pass_rate =", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotEqualTo(Double value) {
|
||||
addCriterion("pass_rate <>", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateGreaterThan(Double value) {
|
||||
addCriterion("pass_rate >", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateGreaterThanOrEqualTo(Double value) {
|
||||
addCriterion("pass_rate >=", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateLessThan(Double value) {
|
||||
addCriterion("pass_rate <", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateLessThanOrEqualTo(Double value) {
|
||||
addCriterion("pass_rate <=", value, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateIn(List<Double> values) {
|
||||
addCriterion("pass_rate in", values, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotIn(List<Double> values) {
|
||||
addCriterion("pass_rate not in", values, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateBetween(Double value1, Double value2) {
|
||||
addCriterion("pass_rate between", value1, value2, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPassRateNotBetween(Double value1, Double value2) {
|
||||
addCriterion("pass_rate not between", value1, value2, "passRate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueIsNull() {
|
||||
addCriterion("is_third_part_issue is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueIsNotNull() {
|
||||
addCriterion("is_third_part_issue is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueEqualTo(Boolean value) {
|
||||
addCriterion("is_third_part_issue =", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueNotEqualTo(Boolean value) {
|
||||
addCriterion("is_third_part_issue <>", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueGreaterThan(Boolean value) {
|
||||
addCriterion("is_third_part_issue >", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_third_part_issue >=", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueLessThan(Boolean value) {
|
||||
addCriterion("is_third_part_issue <", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_third_part_issue <=", value, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueIn(List<Boolean> values) {
|
||||
addCriterion("is_third_part_issue in", values, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueNotIn(List<Boolean> values) {
|
||||
addCriterion("is_third_part_issue not in", values, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_third_part_issue between", value1, value2, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsThirdPartIssueNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_third_part_issue not between", value1, value2, "isThirdPartIssue");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package io.metersphere.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TestPlanReportContentWithBLOBs extends TestPlanReportContent implements Serializable {
|
||||
private String config;
|
||||
|
||||
private String summary;
|
||||
|
||||
private String functionResult;
|
||||
|
||||
private String apiResult;
|
||||
|
||||
private String loadResult;
|
||||
|
||||
private String functionAllCases;
|
||||
|
||||
private String functionFailureCases;
|
||||
|
||||
private String issueList;
|
||||
|
||||
private String apiAllCases;
|
||||
|
||||
private String apiFailureCases;
|
||||
|
||||
private String scenarioAllCases;
|
||||
|
||||
private String scenarioFailureCases;
|
||||
|
||||
private String loadAllCases;
|
||||
|
||||
private String loadFailureCases;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -774,52 +774,52 @@ public class TestPlanReportExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingEqualTo(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingEqualTo(Boolean value) {
|
||||
addCriterion("is_api_case_executing =", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingNotEqualTo(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingNotEqualTo(Boolean value) {
|
||||
addCriterion("is_api_case_executing <>", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingGreaterThan(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingGreaterThan(Boolean value) {
|
||||
addCriterion("is_api_case_executing >", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingGreaterThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_api_case_executing >=", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingLessThan(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingLessThan(Boolean value) {
|
||||
addCriterion("is_api_case_executing <", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingLessThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsApiCaseExecutingLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_api_case_executing <=", value, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingIn(List<Byte> values) {
|
||||
public Criteria andIsApiCaseExecutingIn(List<Boolean> values) {
|
||||
addCriterion("is_api_case_executing in", values, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingNotIn(List<Byte> values) {
|
||||
public Criteria andIsApiCaseExecutingNotIn(List<Boolean> values) {
|
||||
addCriterion("is_api_case_executing not in", values, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsApiCaseExecutingBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_api_case_executing between", value1, value2, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsApiCaseExecutingNotBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsApiCaseExecutingNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_api_case_executing not between", value1, value2, "isApiCaseExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
@ -834,52 +834,52 @@ public class TestPlanReportExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingEqualTo(Byte value) {
|
||||
public Criteria andIsScenarioExecutingEqualTo(Boolean value) {
|
||||
addCriterion("is_scenario_executing =", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingNotEqualTo(Byte value) {
|
||||
public Criteria andIsScenarioExecutingNotEqualTo(Boolean value) {
|
||||
addCriterion("is_scenario_executing <>", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingGreaterThan(Byte value) {
|
||||
public Criteria andIsScenarioExecutingGreaterThan(Boolean value) {
|
||||
addCriterion("is_scenario_executing >", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingGreaterThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsScenarioExecutingGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_scenario_executing >=", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingLessThan(Byte value) {
|
||||
public Criteria andIsScenarioExecutingLessThan(Boolean value) {
|
||||
addCriterion("is_scenario_executing <", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingLessThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsScenarioExecutingLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_scenario_executing <=", value, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingIn(List<Byte> values) {
|
||||
public Criteria andIsScenarioExecutingIn(List<Boolean> values) {
|
||||
addCriterion("is_scenario_executing in", values, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingNotIn(List<Byte> values) {
|
||||
public Criteria andIsScenarioExecutingNotIn(List<Boolean> values) {
|
||||
addCriterion("is_scenario_executing not in", values, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsScenarioExecutingBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_scenario_executing between", value1, value2, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsScenarioExecutingNotBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsScenarioExecutingNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_scenario_executing not between", value1, value2, "isScenarioExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
@ -894,52 +894,52 @@ public class TestPlanReportExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingEqualTo(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingEqualTo(Boolean value) {
|
||||
addCriterion("is_performance_executing =", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingNotEqualTo(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingNotEqualTo(Boolean value) {
|
||||
addCriterion("is_performance_executing <>", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingGreaterThan(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingGreaterThan(Boolean value) {
|
||||
addCriterion("is_performance_executing >", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingGreaterThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_performance_executing >=", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingLessThan(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingLessThan(Boolean value) {
|
||||
addCriterion("is_performance_executing <", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingLessThanOrEqualTo(Byte value) {
|
||||
public Criteria andIsPerformanceExecutingLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_performance_executing <=", value, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingIn(List<Byte> values) {
|
||||
public Criteria andIsPerformanceExecutingIn(List<Boolean> values) {
|
||||
addCriterion("is_performance_executing in", values, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingNotIn(List<Byte> values) {
|
||||
public Criteria andIsPerformanceExecutingNotIn(List<Boolean> values) {
|
||||
addCriterion("is_performance_executing not in", values, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsPerformanceExecutingBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_performance_executing between", value1, value2, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsPerformanceExecutingNotBetween(Byte value1, Byte value2) {
|
||||
public Criteria andIsPerformanceExecutingNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_performance_executing not between", value1, value2, "isPerformanceExecuting");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
@ -1083,6 +1083,66 @@ public class TestPlanReportExample {
|
|||
addCriterion("components not between", value1, value2, "components");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewIsNull() {
|
||||
addCriterion("is_new is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewIsNotNull() {
|
||||
addCriterion("is_new is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewEqualTo(Boolean value) {
|
||||
addCriterion("is_new =", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewNotEqualTo(Boolean value) {
|
||||
addCriterion("is_new <>", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewGreaterThan(Boolean value) {
|
||||
addCriterion("is_new >", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewGreaterThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_new >=", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewLessThan(Boolean value) {
|
||||
addCriterion("is_new <", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewLessThanOrEqualTo(Boolean value) {
|
||||
addCriterion("is_new <=", value, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewIn(List<Boolean> values) {
|
||||
addCriterion("is_new in", values, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewNotIn(List<Boolean> values) {
|
||||
addCriterion("is_new not in", values, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_new between", value1, value2, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andIsNewNotBetween(Boolean value1, Boolean value2) {
|
||||
addCriterion("is_new not between", value1, value2, "isNew");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package io.metersphere.base.mapper;
|
||||
|
||||
import io.metersphere.base.domain.TestPlanReportContent;
|
||||
import io.metersphere.base.domain.TestPlanReportContentExample;
|
||||
import io.metersphere.base.domain.TestPlanReportContentWithBLOBs;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface TestPlanReportContentMapper {
|
||||
long countByExample(TestPlanReportContentExample example);
|
||||
|
||||
int deleteByExample(TestPlanReportContentExample example);
|
||||
|
||||
int deleteByPrimaryKey(String id);
|
||||
|
||||
int insert(TestPlanReportContentWithBLOBs record);
|
||||
|
||||
int insertSelective(TestPlanReportContentWithBLOBs record);
|
||||
|
||||
List<TestPlanReportContentWithBLOBs> selectByExampleWithBLOBs(TestPlanReportContentExample example);
|
||||
|
||||
List<TestPlanReportContent> selectByExample(TestPlanReportContentExample example);
|
||||
|
||||
TestPlanReportContentWithBLOBs selectByPrimaryKey(String id);
|
||||
|
||||
int updateByExampleSelective(@Param("record") TestPlanReportContentWithBLOBs record, @Param("example") TestPlanReportContentExample example);
|
||||
|
||||
int updateByExampleWithBLOBs(@Param("record") TestPlanReportContentWithBLOBs record, @Param("example") TestPlanReportContentExample example);
|
||||
|
||||
int updateByExample(@Param("record") TestPlanReportContent record, @Param("example") TestPlanReportContentExample example);
|
||||
|
||||
int updateByPrimaryKeySelective(TestPlanReportContentWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKeyWithBLOBs(TestPlanReportContentWithBLOBs record);
|
||||
|
||||
int updateByPrimaryKey(TestPlanReportContent record);
|
||||
}
|
|
@ -0,0 +1,529 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="io.metersphere.base.mapper.TestPlanReportContentMapper">
|
||||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestPlanReportContent">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="test_plan_report_id" jdbcType="VARCHAR" property="testPlanReportId" />
|
||||
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
||||
<result column="case_count" jdbcType="BIGINT" property="caseCount" />
|
||||
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
||||
<result column="execute_rate" jdbcType="DOUBLE" property="executeRate" />
|
||||
<result column="pass_rate" jdbcType="DOUBLE" property="passRate" />
|
||||
<result column="is_third_part_issue" jdbcType="BIT" property="isThirdPartIssue" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||
<result column="config" jdbcType="LONGVARCHAR" property="config" />
|
||||
<result column="summary" jdbcType="LONGVARCHAR" property="summary" />
|
||||
<result column="function_result" jdbcType="LONGVARCHAR" property="functionResult" />
|
||||
<result column="api_result" jdbcType="LONGVARCHAR" property="apiResult" />
|
||||
<result column="load_result" jdbcType="LONGVARCHAR" property="loadResult" />
|
||||
<result column="function_all_cases" jdbcType="LONGVARCHAR" property="functionAllCases" />
|
||||
<result column="function_failure_cases" jdbcType="LONGVARCHAR" property="functionFailureCases" />
|
||||
<result column="issue_list" jdbcType="LONGVARCHAR" property="issueList" />
|
||||
<result column="api_all_cases" jdbcType="LONGVARCHAR" property="apiAllCases" />
|
||||
<result column="api_failure_cases" jdbcType="LONGVARCHAR" property="apiFailureCases" />
|
||||
<result column="scenario_all_cases" jdbcType="LONGVARCHAR" property="scenarioAllCases" />
|
||||
<result column="scenario_failure_cases" jdbcType="LONGVARCHAR" property="scenarioFailureCases" />
|
||||
<result column="load_all_Cases" jdbcType="LONGVARCHAR" property="loadAllCases" />
|
||||
<result column="load_failure_cases" jdbcType="LONGVARCHAR" property="loadFailureCases" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause">
|
||||
<where>
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||||
<if test="criteria.valid">
|
||||
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||||
<foreach collection="criteria.criteria" item="criterion">
|
||||
<choose>
|
||||
<when test="criterion.noValue">
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, test_plan_report_id, start_time, case_count, end_time, execute_rate, pass_rate,
|
||||
is_third_part_issue
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
config, summary, function_result, api_result, load_result, function_all_cases, function_failure_cases,
|
||||
issue_list, api_all_cases, api_failure_cases, scenario_all_cases, scenario_failure_cases,
|
||||
load_all_Cases, load_failure_cases
|
||||
</sql>
|
||||
<select id="selectByExampleWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanReportContentExample" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_plan_report_content
|
||||
<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.TestPlanReportContentExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from test_plan_report_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
,
|
||||
<include refid="Blob_Column_List" />
|
||||
from test_plan_report_content
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
||||
delete from test_plan_report_content
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="io.metersphere.base.domain.TestPlanReportContentExample">
|
||||
delete from test_plan_report_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||
insert into test_plan_report_content (id, test_plan_report_id, start_time,
|
||||
case_count, end_time, execute_rate,
|
||||
pass_rate, is_third_part_issue, config,
|
||||
summary, function_result, api_result,
|
||||
load_result, function_all_cases, function_failure_cases,
|
||||
issue_list, api_all_cases, api_failure_cases,
|
||||
scenario_all_cases, scenario_failure_cases,
|
||||
load_all_Cases, load_failure_cases)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testPlanReportId,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
||||
#{caseCount,jdbcType=BIGINT}, #{endTime,jdbcType=BIGINT}, #{executeRate,jdbcType=DOUBLE},
|
||||
#{passRate,jdbcType=DOUBLE}, #{isThirdPartIssue,jdbcType=BIT}, #{config,jdbcType=LONGVARCHAR},
|
||||
#{summary,jdbcType=LONGVARCHAR}, #{functionResult,jdbcType=LONGVARCHAR}, #{apiResult,jdbcType=LONGVARCHAR},
|
||||
#{loadResult,jdbcType=LONGVARCHAR}, #{functionAllCases,jdbcType=LONGVARCHAR}, #{functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
#{issueList,jdbcType=LONGVARCHAR}, #{apiAllCases,jdbcType=LONGVARCHAR}, #{apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
#{scenarioAllCases,jdbcType=LONGVARCHAR}, #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
#{loadAllCases,jdbcType=LONGVARCHAR}, #{loadFailureCases,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||
insert into test_plan_report_content
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="testPlanReportId != null">
|
||||
test_plan_report_id,
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="caseCount != null">
|
||||
case_count,
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time,
|
||||
</if>
|
||||
<if test="executeRate != null">
|
||||
execute_rate,
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
pass_rate,
|
||||
</if>
|
||||
<if test="isThirdPartIssue != null">
|
||||
is_third_part_issue,
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config,
|
||||
</if>
|
||||
<if test="summary != null">
|
||||
summary,
|
||||
</if>
|
||||
<if test="functionResult != null">
|
||||
function_result,
|
||||
</if>
|
||||
<if test="apiResult != null">
|
||||
api_result,
|
||||
</if>
|
||||
<if test="loadResult != null">
|
||||
load_result,
|
||||
</if>
|
||||
<if test="functionAllCases != null">
|
||||
function_all_cases,
|
||||
</if>
|
||||
<if test="functionFailureCases != null">
|
||||
function_failure_cases,
|
||||
</if>
|
||||
<if test="issueList != null">
|
||||
issue_list,
|
||||
</if>
|
||||
<if test="apiAllCases != null">
|
||||
api_all_cases,
|
||||
</if>
|
||||
<if test="apiFailureCases != null">
|
||||
api_failure_cases,
|
||||
</if>
|
||||
<if test="scenarioAllCases != null">
|
||||
scenario_all_cases,
|
||||
</if>
|
||||
<if test="scenarioFailureCases != null">
|
||||
scenario_failure_cases,
|
||||
</if>
|
||||
<if test="loadAllCases != null">
|
||||
load_all_Cases,
|
||||
</if>
|
||||
<if test="loadFailureCases != null">
|
||||
load_failure_cases,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="testPlanReportId != null">
|
||||
#{testPlanReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
#{startTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="caseCount != null">
|
||||
#{caseCount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
#{endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="executeRate != null">
|
||||
#{executeRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
#{passRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="isThirdPartIssue != null">
|
||||
#{isThirdPartIssue,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
#{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="summary != null">
|
||||
#{summary,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionResult != null">
|
||||
#{functionResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiResult != null">
|
||||
#{apiResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadResult != null">
|
||||
#{loadResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionAllCases != null">
|
||||
#{functionAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionFailureCases != null">
|
||||
#{functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="issueList != null">
|
||||
#{issueList,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiAllCases != null">
|
||||
#{apiAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiFailureCases != null">
|
||||
#{apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scenarioAllCases != null">
|
||||
#{scenarioAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scenarioFailureCases != null">
|
||||
#{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadAllCases != null">
|
||||
#{loadAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadFailureCases != null">
|
||||
#{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestPlanReportContentExample" resultType="java.lang.Long">
|
||||
select count(*) from test_plan_report_content
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update test_plan_report_content
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.testPlanReportId != null">
|
||||
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.startTime != null">
|
||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.caseCount != null">
|
||||
case_count = #{record.caseCount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.endTime != null">
|
||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.executeRate != null">
|
||||
execute_rate = #{record.executeRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.passRate != null">
|
||||
pass_rate = #{record.passRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="record.isThirdPartIssue != null">
|
||||
is_third_part_issue = #{record.isThirdPartIssue,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.config != null">
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.summary != null">
|
||||
summary = #{record.summary,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.functionResult != null">
|
||||
function_result = #{record.functionResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.apiResult != null">
|
||||
api_result = #{record.apiResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.loadResult != null">
|
||||
load_result = #{record.loadResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.functionAllCases != null">
|
||||
function_all_cases = #{record.functionAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.functionFailureCases != null">
|
||||
function_failure_cases = #{record.functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.issueList != null">
|
||||
issue_list = #{record.issueList,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.apiAllCases != null">
|
||||
api_all_cases = #{record.apiAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.apiFailureCases != null">
|
||||
api_failure_cases = #{record.apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.scenarioAllCases != null">
|
||||
scenario_all_cases = #{record.scenarioAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.scenarioFailureCases != null">
|
||||
scenario_failure_cases = #{record.scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.loadAllCases != null">
|
||||
load_all_Cases = #{record.loadAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="record.loadFailureCases != null">
|
||||
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExampleWithBLOBs" parameterType="map">
|
||||
update test_plan_report_content
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||
case_count = #{record.caseCount,jdbcType=BIGINT},
|
||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||
execute_rate = #{record.executeRate,jdbcType=DOUBLE},
|
||||
pass_rate = #{record.passRate,jdbcType=DOUBLE},
|
||||
is_third_part_issue = #{record.isThirdPartIssue,jdbcType=BIT},
|
||||
config = #{record.config,jdbcType=LONGVARCHAR},
|
||||
summary = #{record.summary,jdbcType=LONGVARCHAR},
|
||||
function_result = #{record.functionResult,jdbcType=LONGVARCHAR},
|
||||
api_result = #{record.apiResult,jdbcType=LONGVARCHAR},
|
||||
load_result = #{record.loadResult,jdbcType=LONGVARCHAR},
|
||||
function_all_cases = #{record.functionAllCases,jdbcType=LONGVARCHAR},
|
||||
function_failure_cases = #{record.functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
issue_list = #{record.issueList,jdbcType=LONGVARCHAR},
|
||||
api_all_cases = #{record.apiAllCases,jdbcType=LONGVARCHAR},
|
||||
api_failure_cases = #{record.apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
scenario_all_cases = #{record.scenarioAllCases,jdbcType=LONGVARCHAR},
|
||||
scenario_failure_cases = #{record.scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
load_all_Cases = #{record.loadAllCases,jdbcType=LONGVARCHAR},
|
||||
load_failure_cases = #{record.loadFailureCases,jdbcType=LONGVARCHAR}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map">
|
||||
update test_plan_report_content
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
test_plan_report_id = #{record.testPlanReportId,jdbcType=VARCHAR},
|
||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||
case_count = #{record.caseCount,jdbcType=BIGINT},
|
||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||
execute_rate = #{record.executeRate,jdbcType=DOUBLE},
|
||||
pass_rate = #{record.passRate,jdbcType=DOUBLE},
|
||||
is_third_part_issue = #{record.isThirdPartIssue,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||
update test_plan_report_content
|
||||
<set>
|
||||
<if test="testPlanReportId != null">
|
||||
test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
start_time = #{startTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="caseCount != null">
|
||||
case_count = #{caseCount,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
end_time = #{endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="executeRate != null">
|
||||
execute_rate = #{executeRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="passRate != null">
|
||||
pass_rate = #{passRate,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="isThirdPartIssue != null">
|
||||
is_third_part_issue = #{isThirdPartIssue,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="config != null">
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="summary != null">
|
||||
summary = #{summary,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionResult != null">
|
||||
function_result = #{functionResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiResult != null">
|
||||
api_result = #{apiResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadResult != null">
|
||||
load_result = #{loadResult,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionAllCases != null">
|
||||
function_all_cases = #{functionAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="functionFailureCases != null">
|
||||
function_failure_cases = #{functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="issueList != null">
|
||||
issue_list = #{issueList,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiAllCases != null">
|
||||
api_all_cases = #{apiAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="apiFailureCases != null">
|
||||
api_failure_cases = #{apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scenarioAllCases != null">
|
||||
scenario_all_cases = #{scenarioAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="scenarioFailureCases != null">
|
||||
scenario_failure_cases = #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadAllCases != null">
|
||||
load_all_Cases = #{loadAllCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
<if test="loadFailureCases != null">
|
||||
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestPlanReportContentWithBLOBs">
|
||||
update test_plan_report_content
|
||||
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=BIGINT},
|
||||
case_count = #{caseCount,jdbcType=BIGINT},
|
||||
end_time = #{endTime,jdbcType=BIGINT},
|
||||
execute_rate = #{executeRate,jdbcType=DOUBLE},
|
||||
pass_rate = #{passRate,jdbcType=DOUBLE},
|
||||
is_third_part_issue = #{isThirdPartIssue,jdbcType=BIT},
|
||||
config = #{config,jdbcType=LONGVARCHAR},
|
||||
summary = #{summary,jdbcType=LONGVARCHAR},
|
||||
function_result = #{functionResult,jdbcType=LONGVARCHAR},
|
||||
api_result = #{apiResult,jdbcType=LONGVARCHAR},
|
||||
load_result = #{loadResult,jdbcType=LONGVARCHAR},
|
||||
function_all_cases = #{functionAllCases,jdbcType=LONGVARCHAR},
|
||||
function_failure_cases = #{functionFailureCases,jdbcType=LONGVARCHAR},
|
||||
issue_list = #{issueList,jdbcType=LONGVARCHAR},
|
||||
api_all_cases = #{apiAllCases,jdbcType=LONGVARCHAR},
|
||||
api_failure_cases = #{apiFailureCases,jdbcType=LONGVARCHAR},
|
||||
scenario_all_cases = #{scenarioAllCases,jdbcType=LONGVARCHAR},
|
||||
scenario_failure_cases = #{scenarioFailureCases,jdbcType=LONGVARCHAR},
|
||||
load_all_Cases = #{loadAllCases,jdbcType=LONGVARCHAR},
|
||||
load_failure_cases = #{loadFailureCases,jdbcType=LONGVARCHAR}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestPlanReportContent">
|
||||
update test_plan_report_content
|
||||
set test_plan_report_id = #{testPlanReportId,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=BIGINT},
|
||||
case_count = #{caseCount,jdbcType=BIGINT},
|
||||
end_time = #{endTime,jdbcType=BIGINT},
|
||||
execute_rate = #{executeRate,jdbcType=DOUBLE},
|
||||
pass_rate = #{passRate,jdbcType=DOUBLE},
|
||||
is_third_part_issue = #{isThirdPartIssue,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -12,11 +12,12 @@
|
|||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="start_time" jdbcType="BIGINT" property="startTime" />
|
||||
<result column="end_time" jdbcType="BIGINT" property="endTime" />
|
||||
<result column="is_api_case_executing" jdbcType="TINYINT" property="isApiCaseExecuting" />
|
||||
<result column="is_scenario_executing" jdbcType="TINYINT" property="isScenarioExecuting" />
|
||||
<result column="is_performance_executing" jdbcType="TINYINT" property="isPerformanceExecuting" />
|
||||
<result column="is_api_case_executing" jdbcType="BIT" property="isApiCaseExecuting" />
|
||||
<result column="is_scenario_executing" jdbcType="BIT" property="isScenarioExecuting" />
|
||||
<result column="is_performance_executing" jdbcType="BIT" property="isPerformanceExecuting" />
|
||||
<result column="principal" jdbcType="VARCHAR" property="principal" />
|
||||
<result column="components" jdbcType="VARCHAR" property="components" />
|
||||
<result column="is_new" jdbcType="BIT" property="isNew" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause">
|
||||
<where>
|
||||
|
@ -79,7 +80,7 @@
|
|||
<sql id="Base_Column_List">
|
||||
id, test_plan_id, create_time, update_time, `name`, `status`, trigger_mode, creator,
|
||||
start_time, end_time, is_api_case_executing, is_scenario_executing, is_performance_executing,
|
||||
principal, components
|
||||
principal, components, is_new
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="io.metersphere.base.domain.TestPlanReportExample" resultMap="BaseResultMap">
|
||||
select
|
||||
|
@ -116,14 +117,14 @@
|
|||
update_time, `name`, `status`,
|
||||
trigger_mode, creator, start_time,
|
||||
end_time, is_api_case_executing, is_scenario_executing,
|
||||
is_performance_executing, principal, components
|
||||
)
|
||||
is_performance_executing, principal, components,
|
||||
is_new)
|
||||
values (#{id,jdbcType=VARCHAR}, #{testPlanId,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT},
|
||||
#{updateTime,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
|
||||
#{triggerMode,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR}, #{startTime,jdbcType=BIGINT},
|
||||
#{endTime,jdbcType=BIGINT}, #{isApiCaseExecuting,jdbcType=TINYINT}, #{isScenarioExecuting,jdbcType=TINYINT},
|
||||
#{isPerformanceExecuting,jdbcType=TINYINT}, #{principal,jdbcType=VARCHAR}, #{components,jdbcType=VARCHAR}
|
||||
)
|
||||
#{endTime,jdbcType=BIGINT}, #{isApiCaseExecuting,jdbcType=BIT}, #{isScenarioExecuting,jdbcType=BIT},
|
||||
#{isPerformanceExecuting,jdbcType=BIT}, #{principal,jdbcType=VARCHAR}, #{components,jdbcType=VARCHAR},
|
||||
#{isNew,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestPlanReport">
|
||||
insert into test_plan_report
|
||||
|
@ -173,6 +174,9 @@
|
|||
<if test="components != null">
|
||||
components,
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
|
@ -206,13 +210,13 @@
|
|||
#{endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="isApiCaseExecuting != null">
|
||||
#{isApiCaseExecuting,jdbcType=TINYINT},
|
||||
#{isApiCaseExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isScenarioExecuting != null">
|
||||
#{isScenarioExecuting,jdbcType=TINYINT},
|
||||
#{isScenarioExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isPerformanceExecuting != null">
|
||||
#{isPerformanceExecuting,jdbcType=TINYINT},
|
||||
#{isPerformanceExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
#{principal,jdbcType=VARCHAR},
|
||||
|
@ -220,6 +224,9 @@
|
|||
<if test="components != null">
|
||||
#{components,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
#{isNew,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="io.metersphere.base.domain.TestPlanReportExample" resultType="java.lang.Long">
|
||||
|
@ -262,13 +269,13 @@
|
|||
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.isApiCaseExecuting != null">
|
||||
is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=TINYINT},
|
||||
is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.isScenarioExecuting != null">
|
||||
is_scenario_executing = #{record.isScenarioExecuting,jdbcType=TINYINT},
|
||||
is_scenario_executing = #{record.isScenarioExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.isPerformanceExecuting != null">
|
||||
is_performance_executing = #{record.isPerformanceExecuting,jdbcType=TINYINT},
|
||||
is_performance_executing = #{record.isPerformanceExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="record.principal != null">
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
|
@ -276,6 +283,9 @@
|
|||
<if test="record.components != null">
|
||||
components = #{record.components,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.isNew != null">
|
||||
is_new = #{record.isNew,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
|
@ -293,11 +303,12 @@
|
|||
creator = #{record.creator,jdbcType=VARCHAR},
|
||||
start_time = #{record.startTime,jdbcType=BIGINT},
|
||||
end_time = #{record.endTime,jdbcType=BIGINT},
|
||||
is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=TINYINT},
|
||||
is_scenario_executing = #{record.isScenarioExecuting,jdbcType=TINYINT},
|
||||
is_performance_executing = #{record.isPerformanceExecuting,jdbcType=TINYINT},
|
||||
is_api_case_executing = #{record.isApiCaseExecuting,jdbcType=BIT},
|
||||
is_scenario_executing = #{record.isScenarioExecuting,jdbcType=BIT},
|
||||
is_performance_executing = #{record.isPerformanceExecuting,jdbcType=BIT},
|
||||
principal = #{record.principal,jdbcType=VARCHAR},
|
||||
components = #{record.components,jdbcType=VARCHAR}
|
||||
components = #{record.components,jdbcType=VARCHAR},
|
||||
is_new = #{record.isNew,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
|
@ -333,13 +344,13 @@
|
|||
end_time = #{endTime,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="isApiCaseExecuting != null">
|
||||
is_api_case_executing = #{isApiCaseExecuting,jdbcType=TINYINT},
|
||||
is_api_case_executing = #{isApiCaseExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isScenarioExecuting != null">
|
||||
is_scenario_executing = #{isScenarioExecuting,jdbcType=TINYINT},
|
||||
is_scenario_executing = #{isScenarioExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="isPerformanceExecuting != null">
|
||||
is_performance_executing = #{isPerformanceExecuting,jdbcType=TINYINT},
|
||||
is_performance_executing = #{isPerformanceExecuting,jdbcType=BIT},
|
||||
</if>
|
||||
<if test="principal != null">
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
|
@ -347,6 +358,9 @@
|
|||
<if test="components != null">
|
||||
components = #{components,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isNew != null">
|
||||
is_new = #{isNew,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
@ -361,11 +375,12 @@
|
|||
creator = #{creator,jdbcType=VARCHAR},
|
||||
start_time = #{startTime,jdbcType=BIGINT},
|
||||
end_time = #{endTime,jdbcType=BIGINT},
|
||||
is_api_case_executing = #{isApiCaseExecuting,jdbcType=TINYINT},
|
||||
is_scenario_executing = #{isScenarioExecuting,jdbcType=TINYINT},
|
||||
is_performance_executing = #{isPerformanceExecuting,jdbcType=TINYINT},
|
||||
is_api_case_executing = #{isApiCaseExecuting,jdbcType=BIT},
|
||||
is_scenario_executing = #{isScenarioExecuting,jdbcType=BIT},
|
||||
is_performance_executing = #{isPerformanceExecuting,jdbcType=BIT},
|
||||
principal = #{principal,jdbcType=VARCHAR},
|
||||
components = #{components,jdbcType=VARCHAR}
|
||||
components = #{components,jdbcType=VARCHAR},
|
||||
is_new = #{isNew,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
|
@ -12,5 +12,5 @@ import java.util.List;
|
|||
* @Description
|
||||
*/
|
||||
public interface ExtTestPlanReportMapper {
|
||||
public List<TestPlanReportDTO> list(@Param("request")QueryTestPlanReportRequest request);
|
||||
List<TestPlanReportDTO> list(@Param("request")QueryTestPlanReportRequest request);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<select id="list" resultType="io.metersphere.track.dto.TestPlanReportDTO"
|
||||
parameterType="io.metersphere.track.request.report.QueryTestPlanReportRequest">
|
||||
SELECT tpr.id AS id, tpr.`name` AS `name`, tp.`name` AS testPlanName,
|
||||
IF(u.name is null,tpr.creator,u.name)AS creator,
|
||||
IF(u.name is null,tpr.creator,u.name)AS creator, tpr.is_new, tpr.test_plan_id,
|
||||
tpr.create_time AS createTime,tpr.trigger_Mode AS triggerMode,tpr.status AS status
|
||||
FROM test_plan tp
|
||||
INNER JOIN test_plan_report tpr on tp.id = tpr.test_plan_id
|
||||
|
@ -37,4 +37,4 @@
|
|||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
@ -51,7 +51,7 @@ public class TestPlanUtils {
|
|||
Map<String, TestCaseReportStatusResultDTO> statusResultMap,
|
||||
TestPlanSimpleReportDTO report, String successStatus) {
|
||||
planReportCaseDTOS.forEach(item -> {
|
||||
report.setCaseCount(report.getCaseCount() + 1);
|
||||
report.setCaseCount(report.getCaseCount() == null ? 0 : report.getCaseCount() + 1);
|
||||
String status = item.getStatus();
|
||||
if (StringUtils.isNotBlank(status) && !StringUtils.equals(TestPlanTestCaseStatus.Underway.name(), status)) {
|
||||
report.setExecuteCount(report.getExecuteCount() + 1);
|
||||
|
|
|
@ -12,6 +12,7 @@ import io.metersphere.commons.utils.SessionUtils;
|
|||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.notice.annotation.SendNotice;
|
||||
import io.metersphere.track.dto.TestPlanReportDTO;
|
||||
import io.metersphere.track.dto.TestPlanSimpleReportDTO;
|
||||
import io.metersphere.track.request.report.QueryTestPlanReportRequest;
|
||||
import io.metersphere.track.request.report.TestPlanReportSaveRequest;
|
||||
import io.metersphere.track.service.TestPlanReportService;
|
||||
|
@ -44,6 +45,11 @@ public class TestPlanReportController {
|
|||
return testPlanReportService.getMetric(planId);
|
||||
}
|
||||
|
||||
@GetMapping("/db/{reportId}")
|
||||
public TestPlanSimpleReportDTO getReport(@PathVariable String reportId) {
|
||||
return testPlanReportService.getReport(reportId);
|
||||
}
|
||||
|
||||
@GetMapping("/sendTask/{planId}")
|
||||
public String sendTask(@PathVariable String planId) {
|
||||
TestPlanReport report = testPlanReportService.getTestPlanReport(planId);
|
||||
|
|
|
@ -16,6 +16,7 @@ import java.util.List;
|
|||
public class TestPlanReportDTO {
|
||||
private String id;
|
||||
private String testPlanId;
|
||||
private Boolean isNew;
|
||||
private String name;
|
||||
private String testPlanName;
|
||||
private String creator;
|
||||
|
@ -33,4 +34,4 @@ public class TestPlanReportDTO {
|
|||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String projectName;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package io.metersphere.track.dto;
|
|||
import io.metersphere.api.dto.automation.TestPlanFailureApiDTO;
|
||||
import io.metersphere.api.dto.automation.TestPlanFailureScenarioDTO;
|
||||
import io.metersphere.base.domain.IssuesDao;
|
||||
import io.metersphere.base.domain.TestPlanReportContent;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
@ -11,18 +12,14 @@ import java.util.List;
|
|||
|
||||
@Getter
|
||||
@Setter
|
||||
public class TestPlanSimpleReportDTO {
|
||||
public class TestPlanSimpleReportDTO extends TestPlanReportContent {
|
||||
private String name;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private int caseCount;
|
||||
|
||||
private int executeCount;
|
||||
private int passCount;
|
||||
private double executeRate;
|
||||
private double passRate;
|
||||
private String summary;
|
||||
private String config;
|
||||
private Boolean isThirdPartIssue;
|
||||
|
||||
private TestPlanFunctionResultReportDTO functionResult;
|
||||
private TestPlanApiResultReportDTO apiResult;
|
||||
private TestPlanLoadResultReportDTO loadResult;
|
||||
|
@ -30,10 +27,10 @@ public class TestPlanSimpleReportDTO {
|
|||
List<TestPlanCaseDTO> functionFailureCases;
|
||||
List<TestPlanCaseDTO> functionAllCases;
|
||||
List<IssuesDao> issueList;
|
||||
List<TestPlanFailureApiDTO> apiFailureResult;
|
||||
List<TestPlanFailureApiDTO> apiFailureCases;
|
||||
List<TestPlanFailureApiDTO> apiAllCases;
|
||||
List<TestPlanFailureScenarioDTO> scenarioFailureResult;
|
||||
List<TestPlanFailureScenarioDTO> scenarioFailureCases;
|
||||
List<TestPlanFailureScenarioDTO> scenarioAllCases;
|
||||
List<TestPlanLoadCaseDTO> loadAllTestCases;
|
||||
List<TestPlanLoadCaseDTO> loadFailureTestCases;
|
||||
List<TestPlanLoadCaseDTO> loadAllCases;
|
||||
List<TestPlanLoadCaseDTO> loadFailureCases;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import io.metersphere.api.cache.TestPlanExecuteInfo;
|
||||
import io.metersphere.api.cache.TestPlanReportExecuteCatch;
|
||||
import io.metersphere.api.dto.automation.ApiScenarioDTO;
|
||||
import io.metersphere.api.dto.automation.TestPlanFailureApiDTO;
|
||||
import io.metersphere.api.dto.automation.TestPlanFailureScenarioDTO;
|
||||
import io.metersphere.api.dto.automation.TestPlanScenarioRequest;
|
||||
import io.metersphere.api.dto.definition.ApiTestCaseRequest;
|
||||
import io.metersphere.api.dto.definition.TestPlanApiCaseDTO;
|
||||
|
@ -31,10 +33,9 @@ import io.metersphere.track.request.testplan.LoadCaseRequest;
|
|||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
@ -64,10 +65,6 @@ public class TestPlanReportService {
|
|||
@Resource
|
||||
ExtTestPlanLoadCaseMapper extTestPlanLoadCaseMapper;
|
||||
@Resource
|
||||
TestPlanApiScenarioMapper testPlanScenarioCaseMapper;
|
||||
@Resource
|
||||
TestPlanApiCaseMapper testPlanApiCaseMapper;
|
||||
@Resource
|
||||
ExtTestPlanReportMapper extTestPlanReportMapper;
|
||||
@Resource
|
||||
TestPlanMapper testPlanMapper;
|
||||
|
@ -79,9 +76,12 @@ public class TestPlanReportService {
|
|||
ApiTestCaseMapper apiTestCaseMapper;
|
||||
@Resource
|
||||
LoadTestReportMapper loadTestReportMapper;
|
||||
|
||||
@Lazy
|
||||
@Resource
|
||||
SqlSessionFactory sqlSessionFactory;
|
||||
TestPlanService testPlanService;
|
||||
@Lazy
|
||||
@Resource
|
||||
TestPlanReportContentMapper testPlanReportContentMapper;
|
||||
|
||||
private final ExecutorService executorService = Executors.newFixedThreadPool(20);
|
||||
|
||||
|
@ -192,16 +192,17 @@ public class TestPlanReportService {
|
|||
testPlanReport.setUpdateTime(System.currentTimeMillis());
|
||||
try {
|
||||
testPlanReport.setName(testPlan.getName() + "-" + DateUtils.getTimeString(new Date()));
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
} catch (Exception ignored) {}
|
||||
|
||||
testPlanReport.setTriggerMode(saveRequest.getTriggerMode());
|
||||
testPlanReport.setCreator(saveRequest.getUserId());
|
||||
testPlanReport.setStartTime(System.currentTimeMillis());
|
||||
testPlanReport.setEndTime(System.currentTimeMillis());
|
||||
testPlanReport.setIsNew(true);
|
||||
|
||||
TestPlanReportDataWithBLOBs testPlanReportData = new TestPlanReportDataWithBLOBs();
|
||||
testPlanReportData.setId(UUID.randomUUID().toString());
|
||||
testPlanReportData.setTestPlanReportId(testPlanReportID);
|
||||
TestPlanReportContentWithBLOBs testPlanReportContent = new TestPlanReportContentWithBLOBs();
|
||||
testPlanReportContent.setId(UUID.randomUUID().toString());
|
||||
testPlanReportContent.setTestPlanReportId(testPlanReportID);
|
||||
|
||||
Map<String, String> apiCaseInfoMap = new HashMap<>();
|
||||
Map<String, String> scenarioInfoMap = new HashMap<>();
|
||||
|
@ -251,13 +252,8 @@ public class TestPlanReportService {
|
|||
testPlanReport.setStatus(APITestStatus.Completed.name());
|
||||
}
|
||||
|
||||
SqlSession sqlSession = sqlSessionFactory.openSession(false);
|
||||
TestPlanReportMapper insertReportMapper = sqlSession.getMapper(TestPlanReportMapper.class);
|
||||
TestPlanReportDataMapper insertReportDataMapper = sqlSession.getMapper(TestPlanReportDataMapper.class);
|
||||
insertReportMapper.insert(testPlanReport);
|
||||
insertReportDataMapper.insert(testPlanReportData);
|
||||
sqlSession.commit();
|
||||
sqlSession.flushStatements();
|
||||
testPlanReportMapper.insert(testPlanReport);
|
||||
testPlanReportContentMapper.insert(testPlanReportContent);
|
||||
|
||||
//更新TestPlan状态,改为进行中
|
||||
testPlan.setStatus(TestPlanStatus.Underway.name());
|
||||
|
@ -600,7 +596,7 @@ public class TestPlanReportService {
|
|||
QueryTestPlanRequest queryTestPlanRequest = new QueryTestPlanRequest();
|
||||
queryTestPlanRequest.setId(testPlanReport.getTestPlanId());
|
||||
TestPlanDTO testPlan = extTestPlanMapper.list(queryTestPlanRequest).get(0);
|
||||
String issuesInfo = null;
|
||||
// String issuesInfo = null;
|
||||
|
||||
//因为接口案例的定时任务是单个案例开线程运行, 所以要检查是否都执行完成。全部执行完成时才会进行统一整理
|
||||
if (StringUtils.equalsAny(triggerMode, ReportTriggerMode.SCHEDULE.name(), ReportTriggerMode.API.name())
|
||||
|
@ -618,26 +614,26 @@ public class TestPlanReportService {
|
|||
testPlanReport.setEndTime(System.currentTimeMillis());
|
||||
testPlanReport.setUpdateTime(System.currentTimeMillis());
|
||||
|
||||
//手动触发的需要保存手工执行的信息
|
||||
int[] componentIndexArr = null;
|
||||
if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) {
|
||||
componentIndexArr = new int[]{1, 2, 3, 4, 5};
|
||||
} else {
|
||||
componentIndexArr = new int[]{1, 3, 4};
|
||||
}
|
||||
testPlanReport.setComponents(JSONArray.toJSONString(componentIndexArr));
|
||||
// //手动触发的需要保存手工执行的信息
|
||||
// int[] componentIndexArr = null;
|
||||
// if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) {
|
||||
// componentIndexArr = new int[]{1, 2, 3, 4, 5};
|
||||
// } else {
|
||||
// componentIndexArr = new int[]{1, 3, 4};
|
||||
// }
|
||||
// testPlanReport.setComponents(JSONArray.toJSONString(componentIndexArr));
|
||||
|
||||
TestPlanService testPlanService = CommonBeanFactory.getBean(TestPlanService.class);
|
||||
JSONArray componentIds = JSONArray.parseArray(testPlanReport.getComponents());
|
||||
List<ReportComponent> components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan);
|
||||
testPlanService.buildApiCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
testPlanService.buildScenarioCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
testPlanService.buildLoadCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
// TestPlanService testPlanService = CommonBeanFactory.getBean(TestPlanService.class);
|
||||
// JSONArray componentIds = JSONArray.parseArray(testPlanReport.getComponents());
|
||||
// List<ReportComponent> components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan);
|
||||
// testPlanService.buildApiCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
// testPlanService.buildScenarioCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
// testPlanService.buildLoadCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
|
||||
if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) {
|
||||
List<IssuesDao> issues = testPlanService.buildFunctionalCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
issuesInfo = JSONArray.toJSONString(issues);
|
||||
}
|
||||
// if (StringUtils.equals(ReportTriggerMode.MANUAL.name(), triggerMode)) {
|
||||
// List<IssuesDao> issues = testPlanService.buildFunctionalCaseReport(testPlanReport.getTestPlanId(), components);
|
||||
// issuesInfo = JSONArray.toJSONString(issues);
|
||||
// }
|
||||
|
||||
|
||||
//只针对定时任务做处理
|
||||
|
@ -655,82 +651,156 @@ public class TestPlanReportService {
|
|||
testPlanReport.setIsScenarioExecuting(false);
|
||||
testPlanReport.setIsApiCaseExecuting(false);
|
||||
}
|
||||
TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO();
|
||||
components.forEach(component -> {
|
||||
component.afterBuild(testCaseReportMetricDTO);
|
||||
});
|
||||
// TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO();
|
||||
// components.forEach(component -> {
|
||||
// component.afterBuild(testCaseReportMetricDTO);
|
||||
// });
|
||||
|
||||
if (StringUtils.equalsAny(triggerMode, ReportTriggerMode.SCHEDULE.name(), ReportTriggerMode.API.name())
|
||||
&& StringUtils.equalsAny(resourceRunMode, ApiRunMode.SCHEDULE_PERFORMANCE_TEST.name(), ApiRunMode.JENKINS_PERFORMANCE_TEST.name())) {
|
||||
// if (StringUtils.equalsAny(triggerMode, ReportTriggerMode.SCHEDULE.name(), ReportTriggerMode.API.name())
|
||||
// && StringUtils.equalsAny(resourceRunMode, ApiRunMode.SCHEDULE_PERFORMANCE_TEST.name(), ApiRunMode.JENKINS_PERFORMANCE_TEST.name())) {
|
||||
//如果是性能测试作为触发,由于延迟原因可能会出现报告已经结束但是状态还是进行中的状态
|
||||
List<TestCaseReportStatusResultDTO> loadResult = testCaseReportMetricDTO.getExecuteResult().getLoadResult();
|
||||
for (TestCaseReportStatusResultDTO dto : loadResult) {
|
||||
if (StringUtils.equals(dto.getStatus(), TestPlanTestCaseStatus.Underway.name())) {
|
||||
dto.setStatus(TestPlanTestCaseStatus.Pass.name());
|
||||
}
|
||||
}
|
||||
testCaseReportMetricDTO.getExecuteResult().setLoadResult(loadResult);
|
||||
}
|
||||
// List<TestCaseReportStatusResultDTO> loadResult = testCaseReportMetricDTO.getExecuteResult().getLoadResult();
|
||||
// for (TestCaseReportStatusResultDTO dto : loadResult) {
|
||||
// if (StringUtils.equals(dto.getStatus(), TestPlanTestCaseStatus.Underway.name())) {
|
||||
// dto.setStatus(TestPlanTestCaseStatus.Pass.name());
|
||||
// }
|
||||
// }
|
||||
// testCaseReportMetricDTO.getExecuteResult().setLoadResult(loadResult);
|
||||
// }
|
||||
|
||||
TestPlanReportDataExample example = new TestPlanReportDataExample();
|
||||
TestPlanReportContentExample example = new TestPlanReportContentExample();
|
||||
example.createCriteria().andTestPlanReportIdEqualTo(planReportId);
|
||||
List<TestPlanReportDataWithBLOBs> testPlanReportDataList = testPlanReportDataMapper.selectByExampleWithBLOBs(example);
|
||||
List<TestPlanReportContentWithBLOBs> testPlanReportContentList = testPlanReportContentMapper.selectByExampleWithBLOBs(example);
|
||||
|
||||
TestPlanReportDataWithBLOBs testPlanReportData = null;
|
||||
if (!testPlanReportDataList.isEmpty()) {
|
||||
testPlanReportData = testPlanReportDataList.get(0);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(scenarioIdList)
|
||||
&& StringUtils.equalsAny(triggerMode, ReportTriggerMode.SCHEDULE.name(), ReportTriggerMode.API.name())
|
||||
&& StringUtils.equalsAny(resourceRunMode, ApiRunMode.SCHEDULE_SCENARIO_PLAN.name(), ApiRunMode.JENKINS_SCENARIO_PLAN.name())) {
|
||||
try {
|
||||
List<String> scenarioListArr = JSONArray.parseArray(testPlanReportData.getScenarioInfo(), String.class);
|
||||
TestCaseReportAdvanceStatusResultDTO savedDTO = JSONObject.parseObject(testPlanReportData.getExecuteResult(), TestCaseReportAdvanceStatusResultDTO.class);
|
||||
List<String> executeScenarioList = new ArrayList<>();
|
||||
if (savedDTO != null) {
|
||||
if (savedDTO.getExecutedScenarioIds() != null) {
|
||||
executeScenarioList = savedDTO.getExecutedScenarioIds();
|
||||
}
|
||||
}
|
||||
for (String scenarioId : scenarioIdList) {
|
||||
if (!executeScenarioList.contains(scenarioId)) {
|
||||
executeScenarioList.add(scenarioId);
|
||||
}
|
||||
}
|
||||
if (testCaseReportMetricDTO.getExecuteResult() == null) {
|
||||
TestCaseReportAdvanceStatusResultDTO executeResultDTO = new TestCaseReportAdvanceStatusResultDTO();
|
||||
testCaseReportMetricDTO.setExecuteResult(executeResultDTO);
|
||||
}
|
||||
testCaseReportMetricDTO.getExecuteResult().setExecutedScenarioIds(executeScenarioList);
|
||||
TestPlanReportContentWithBLOBs testPlanReportContent = null;
|
||||
TestPlanSimpleReportDTO reportDTO = testPlanService.buildPlanReport(testPlan.getId(), false);
|
||||
if (!testPlanReportContentList.isEmpty()) {
|
||||
testPlanReportContent = testPlanReportContentList.get(0);
|
||||
//
|
||||
// if (CollectionUtils.isNotEmpty(scenarioIdList)
|
||||
// && StringUtils.equalsAny(triggerMode, ReportTriggerMode.SCHEDULE.name(), ReportTriggerMode.API.name())
|
||||
// && StringUtils.equalsAny(resourceRunMode, ApiRunMode.SCHEDULE_SCENARIO_PLAN.name(), ApiRunMode.JENKINS_SCENARIO_PLAN.name())) {
|
||||
// try {
|
||||
// List<String> scenarioListArr = JSONArray.parseArray(testPlanReportData.getScenarioInfo(), String.class);
|
||||
// TestCaseReportAdvanceStatusResultDTO savedDTO = JSONObject.parseObject(testPlanReportData.getExecuteResult(), TestCaseReportAdvanceStatusResultDTO.class);
|
||||
// List<String> executeScenarioList = new ArrayList<>();
|
||||
// if (savedDTO != null) {
|
||||
// if (savedDTO.getExecutedScenarioIds() != null) {
|
||||
// executeScenarioList = savedDTO.getExecutedScenarioIds();
|
||||
// }
|
||||
// }
|
||||
// for (String scenarioId : scenarioIdList) {
|
||||
// if (!executeScenarioList.contains(scenarioId)) {
|
||||
// executeScenarioList.add(scenarioId);
|
||||
// }
|
||||
// }
|
||||
// if (testCaseReportMetricDTO.getExecuteResult() == null) {
|
||||
// TestCaseReportAdvanceStatusResultDTO executeResultDTO = new TestCaseReportAdvanceStatusResultDTO();
|
||||
// testCaseReportMetricDTO.setExecuteResult(executeResultDTO);
|
||||
// }
|
||||
// testCaseReportMetricDTO.getExecuteResult().setExecutedScenarioIds(executeScenarioList);
|
||||
//
|
||||
// if (!CollectionUtils.isEqualCollection(scenarioListArr, executeScenarioList)) {
|
||||
// testPlanReport.setIsScenarioExecuting(true);
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
if (!CollectionUtils.isEqualCollection(scenarioListArr, executeScenarioList)) {
|
||||
testPlanReport.setIsScenarioExecuting(true);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
//统计执行的场景ID
|
||||
testPlanReportData.setExecuteResult(JSONObject.toJSONString(testCaseReportMetricDTO.getExecuteResult()));
|
||||
testPlanReportData.setFailurTestCases(JSONObject.toJSONString(testCaseReportMetricDTO.getFailureTestCases()));
|
||||
testPlanReportData.setModuleExecuteResult(JSONArray.toJSONString(testCaseReportMetricDTO.getModuleExecuteResult()));
|
||||
if (issuesInfo != null) {
|
||||
testPlanReportData.setIssuesInfo(issuesInfo);
|
||||
}
|
||||
testPlanReportDataMapper.updateByPrimaryKeyWithBLOBs(testPlanReportData);
|
||||
// testPlanReportData.setExecuteResult(JSONObject.toJSONString(testCaseReportMetricDTO.getExecuteResult()));
|
||||
// testPlanReportData.setFailurTestCases(JSONObject.toJSONString(testCaseReportMetricDTO.getFailureTestCases()));
|
||||
// testPlanReportData.setModuleExecuteResult(JSONArray.toJSONString(testCaseReportMetricDTO.getModuleExecuteResult()));
|
||||
// if (issuesInfo != null) {
|
||||
// testPlanReportData.setIssuesInfo(issuesInfo);
|
||||
// }
|
||||
|
||||
testPlanReportContentMapper.updateByPrimaryKeySelective(parseReportDaoToReportContent(reportDTO, testPlanReportContent));
|
||||
}
|
||||
|
||||
String testPlanStatus = this.getTestPlanReportStatus(testPlanReport, testPlanReportData);
|
||||
String testPlanStatus = this.getTestPlanReportStatus(testPlanReport, reportDTO);
|
||||
testPlanReport.setStatus(testPlanStatus);
|
||||
this.update(testPlanReport);
|
||||
}
|
||||
|
||||
public TestPlanReportContentWithBLOBs parseReportDaoToReportContent(TestPlanSimpleReportDTO reportDTO, TestPlanReportContentWithBLOBs testPlanReportContentWithBLOBs) {
|
||||
String id = testPlanReportContentWithBLOBs.getId();
|
||||
BeanUtils.copyBean(testPlanReportContentWithBLOBs, reportDTO);
|
||||
testPlanReportContentWithBLOBs.setId(id);
|
||||
if (reportDTO.getFunctionResult() != null) {
|
||||
testPlanReportContentWithBLOBs.setFunctionResult(JSONObject.toJSONString(reportDTO.getFunctionResult()));
|
||||
}
|
||||
if (reportDTO.getApiResult() != null) {
|
||||
testPlanReportContentWithBLOBs.setApiResult(JSONObject.toJSONString(reportDTO.getApiResult()));
|
||||
}
|
||||
if (reportDTO.getLoadResult() != null) {
|
||||
testPlanReportContentWithBLOBs.setLoadResult(JSONObject.toJSONString(reportDTO.getLoadResult()));
|
||||
}
|
||||
if (reportDTO.getFunctionAllCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setFunctionAllCases(JSONObject.toJSONString(reportDTO.getFunctionAllCases()));
|
||||
}
|
||||
if (reportDTO.getFunctionFailureCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setFunctionFailureCases(JSONObject.toJSONString(reportDTO.getFunctionFailureCases()));
|
||||
}
|
||||
if (reportDTO.getIssueList() != null) {
|
||||
testPlanReportContentWithBLOBs.setIssueList(JSONObject.toJSONString(reportDTO.getIssueList()));
|
||||
}
|
||||
if (reportDTO.getApiAllCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setApiAllCases(JSONObject.toJSONString(reportDTO.getApiAllCases()));
|
||||
}
|
||||
if (reportDTO.getApiFailureCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setApiFailureCases(JSONObject.toJSONString(reportDTO.getApiFailureCases()));
|
||||
}
|
||||
if (reportDTO.getScenarioAllCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setScenarioAllCases(JSONObject.toJSONString(reportDTO.getScenarioAllCases()));
|
||||
}
|
||||
if (reportDTO.getScenarioFailureCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setScenarioFailureCases(JSONObject.toJSONString(reportDTO.getScenarioFailureCases()));
|
||||
}
|
||||
if (reportDTO.getLoadAllCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setLoadAllCases(JSONObject.toJSONString(reportDTO.getLoadAllCases()));
|
||||
}
|
||||
if (reportDTO.getLoadFailureCases() != null) {
|
||||
testPlanReportContentWithBLOBs.setLoadFailureCases(JSONObject.toJSONString(reportDTO.getLoadFailureCases()));
|
||||
}
|
||||
return testPlanReportContentWithBLOBs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算测试计划的状态
|
||||
*
|
||||
* @param testPlanReport
|
||||
* @return
|
||||
*/
|
||||
private String getTestPlanReportStatus(TestPlanReport testPlanReport, TestPlanSimpleReportDTO reportDTO) {
|
||||
String status = TestPlanReportStatus.COMPLETED.name();
|
||||
if (testPlanReport != null) {
|
||||
if (testPlanReport.getIsApiCaseExecuting() || testPlanReport.getIsPerformanceExecuting() || testPlanReport.getIsScenarioExecuting()) {
|
||||
status = TestPlanReportStatus.RUNNING.name();
|
||||
} else {
|
||||
if (reportDTO != null) {
|
||||
status = TestPlanReportStatus.SUCCESS.name();
|
||||
try {
|
||||
if (CollectionUtils.isNotEmpty(reportDTO.getFunctionFailureCases())
|
||||
&& CollectionUtils.isNotEmpty(reportDTO.getApiFailureCases())
|
||||
&& CollectionUtils.isNotEmpty(reportDTO.getScenarioFailureCases())
|
||||
&& CollectionUtils.isNotEmpty(reportDTO.getLoadFailureCases())) {
|
||||
status = TestPlanReportStatus.FAILED.name();
|
||||
return status;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
status = TestPlanReportStatus.FAILED.name();
|
||||
}
|
||||
} else {
|
||||
status = TestPlanReportStatus.COMPLETED.name();
|
||||
}
|
||||
}
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
private String getTestPlanReportStatus(TestPlanReport testPlanReport, TestPlanReportDataWithBLOBs testPlanReportData) {
|
||||
String status = TestPlanReportStatus.COMPLETED.name();
|
||||
if (testPlanReport != null) {
|
||||
|
@ -1071,4 +1141,53 @@ public class TestPlanReportService {
|
|||
}
|
||||
this.updateExecuteApis(planReportId);
|
||||
}
|
||||
|
||||
public TestPlanSimpleReportDTO getReport(String reportId) {
|
||||
TestPlanReportContentExample example = new TestPlanReportContentExample();
|
||||
example.createCriteria().andTestPlanReportIdEqualTo(reportId);
|
||||
List<TestPlanReportContentWithBLOBs> testPlanReportContents = testPlanReportContentMapper.selectByExampleWithBLOBs(example);
|
||||
if (CollectionUtils.isEmpty(testPlanReportContents)) {
|
||||
return null;
|
||||
}
|
||||
TestPlanReportContentWithBLOBs testPlanReportContent = testPlanReportContents.get(0);
|
||||
TestPlanSimpleReportDTO testPlanReportDTO = new TestPlanSimpleReportDTO();
|
||||
BeanUtils.copyBean(testPlanReportDTO, testPlanReportContent);
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getFunctionResult())) {
|
||||
testPlanReportDTO.setFunctionResult(JSONObject.parseObject(testPlanReportContent.getFunctionResult(), TestPlanFunctionResultReportDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getApiResult())) {
|
||||
testPlanReportDTO.setApiResult(JSONObject.parseObject(testPlanReportContent.getApiResult(), TestPlanApiResultReportDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getLoadResult())) {
|
||||
testPlanReportDTO.setLoadResult(JSONObject.parseObject(testPlanReportContent.getLoadResult(), TestPlanLoadResultReportDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getFunctionAllCases())) {
|
||||
testPlanReportDTO.setFunctionAllCases(JSONObject.parseArray(testPlanReportContent.getFunctionAllCases(), TestPlanCaseDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getFunctionFailureCases())) {
|
||||
testPlanReportDTO.setFunctionFailureCases(JSONObject.parseArray(testPlanReportContent.getFunctionFailureCases(), TestPlanCaseDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getIssueList())) {
|
||||
testPlanReportDTO.setIssueList(JSONObject.parseArray(testPlanReportContent.getIssueList(), IssuesDao.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getApiAllCases())) {
|
||||
testPlanReportDTO.setApiAllCases(JSONObject.parseArray(testPlanReportContent.getApiAllCases(), TestPlanFailureApiDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getApiFailureCases())) {
|
||||
testPlanReportDTO.setApiFailureCases(JSONObject.parseArray(testPlanReportContent.getApiFailureCases(), TestPlanFailureApiDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getScenarioAllCases())) {
|
||||
testPlanReportDTO.setScenarioAllCases(JSONObject.parseArray(testPlanReportContent.getScenarioAllCases(), TestPlanFailureScenarioDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getScenarioFailureCases())) {
|
||||
testPlanReportDTO.setScenarioFailureCases(JSONObject.parseArray(testPlanReportContent.getScenarioFailureCases(), TestPlanFailureScenarioDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getLoadAllCases())) {
|
||||
testPlanReportDTO.setLoadAllCases(JSONObject.parseArray(testPlanReportContent.getLoadAllCases(), TestPlanLoadCaseDTO.class));
|
||||
}
|
||||
if (StringUtils.isNotBlank(testPlanReportContent.getLoadFailureCases())) {
|
||||
testPlanReportDTO.setLoadFailureCases(JSONObject.parseArray(testPlanReportContent.getLoadFailureCases(), TestPlanLoadCaseDTO.class));
|
||||
}
|
||||
return testPlanReportDTO;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1359,17 +1359,7 @@ public class TestPlanService {
|
|||
return envMap;
|
||||
}
|
||||
|
||||
public void exportPlanReport(String planId, HttpServletResponse response) throws UnsupportedEncodingException {
|
||||
|
||||
TestPlanWithBLOBs testPlan = testPlanMapper.selectByPrimaryKey(planId);
|
||||
|
||||
String reportConfig = testPlan.getReportConfig();
|
||||
JSONObject config = null;
|
||||
if (StringUtils.isNotBlank(reportConfig)) {
|
||||
config = JSONObject.parseObject(reportConfig);
|
||||
}
|
||||
TestPlanSimpleReportDTO report = getReport(planId);
|
||||
|
||||
public void buildFunctionalReport(TestPlanSimpleReportDTO report, JSONObject config, String planId) {
|
||||
if (checkReportConfig(config, "functional")) {
|
||||
List<TestPlanCaseDTO> allCases = null;
|
||||
if (checkReportConfig(config, "functional", "all")) {
|
||||
|
@ -1393,7 +1383,9 @@ public class TestPlanService {
|
|||
report.setIssueList(issueList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void buildApiReport(TestPlanSimpleReportDTO report, JSONObject config, String planId, boolean saveResponse) {
|
||||
if (checkReportConfig(config, "api")) {
|
||||
List<TestPlanFailureApiDTO> apiAllCases = null;
|
||||
List<TestPlanFailureScenarioDTO> scenarioAllCases = null;
|
||||
|
@ -1401,17 +1393,21 @@ public class TestPlanService {
|
|||
// 接口
|
||||
apiAllCases = testPlanApiCaseService.getAllCases(planId);
|
||||
report.setApiAllCases(apiAllCases);
|
||||
apiAllCases.forEach(item -> {
|
||||
APIReportResult dbResult = apiDefinitionService.getDbResult(item.getId());
|
||||
if (dbResult != null && StringUtils.isNotBlank(dbResult.getContent())) {
|
||||
item.setResponse(dbResult.getContent());
|
||||
}
|
||||
});
|
||||
if (saveResponse) {
|
||||
apiAllCases.forEach(item -> {
|
||||
APIReportResult dbResult = apiDefinitionService.getDbResult(item.getId());
|
||||
if (dbResult != null && StringUtils.isNotBlank(dbResult.getContent())) {
|
||||
item.setResponse(dbResult.getContent());
|
||||
}
|
||||
});
|
||||
}
|
||||
//场景
|
||||
scenarioAllCases = testPlanScenarioCaseService.getAllCases(planId);
|
||||
scenarioAllCases.forEach((item) -> {
|
||||
item.setResponse(apiScenarioReportService.get(item.getReportId()));
|
||||
});
|
||||
if (saveResponse) {
|
||||
scenarioAllCases.forEach((item) -> {
|
||||
item.setResponse(apiScenarioReportService.get(item.getReportId()));
|
||||
});
|
||||
}
|
||||
report.setScenarioAllCases(scenarioAllCases);
|
||||
}
|
||||
if (checkReportConfig(config, "api", "failure")) {
|
||||
|
@ -1425,13 +1421,15 @@ public class TestPlanService {
|
|||
} else {
|
||||
apiFailureCases = testPlanApiCaseService.getFailureCases(planId);
|
||||
}
|
||||
apiFailureCases.forEach(item -> {
|
||||
APIReportResult dbResult = apiDefinitionService.getDbResult(item.getId());
|
||||
if (dbResult != null && StringUtils.isNotBlank(dbResult.getContent())) {
|
||||
item.setResponse(dbResult.getContent());
|
||||
}
|
||||
});
|
||||
report.setApiFailureResult(apiFailureCases);
|
||||
if (saveResponse) {
|
||||
apiFailureCases.forEach(item -> {
|
||||
APIReportResult dbResult = apiDefinitionService.getDbResult(item.getId());
|
||||
if (dbResult != null && StringUtils.isNotBlank(dbResult.getContent())) {
|
||||
item.setResponse(dbResult.getContent());
|
||||
}
|
||||
});
|
||||
}
|
||||
report.setApiFailureCases(apiFailureCases);
|
||||
|
||||
// 场景
|
||||
List<TestPlanFailureScenarioDTO> scenarioFailureCases = null;
|
||||
|
@ -1443,37 +1441,44 @@ public class TestPlanService {
|
|||
} else {
|
||||
scenarioFailureCases = testPlanScenarioCaseService.getFailureCases(planId);
|
||||
}
|
||||
scenarioFailureCases.forEach((item) -> {
|
||||
item.setResponse(apiScenarioReportService.get(item.getReportId()));
|
||||
});
|
||||
report.setScenarioFailureResult(scenarioFailureCases);
|
||||
if (saveResponse) {
|
||||
scenarioFailureCases.forEach((item) -> {
|
||||
item.setResponse(apiScenarioReportService.get(item.getReportId()));
|
||||
});
|
||||
}
|
||||
report.setScenarioFailureCases(scenarioFailureCases);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void buildLoadReport(TestPlanSimpleReportDTO report, JSONObject config, String planId, boolean saveResponse) {
|
||||
if (checkReportConfig(config, "load")) {
|
||||
List<TestPlanLoadCaseDTO> allCases = null;
|
||||
if (checkReportConfig(config, "load", "all")) {
|
||||
allCases = testPlanLoadCaseService.getAllCases(planId);
|
||||
allCases.forEach(item -> {
|
||||
LoadCaseReportRequest request = new LoadCaseReportRequest();
|
||||
String reportId = item.getLoadReportId();
|
||||
request.setTestPlanLoadCaseId(item.getId());
|
||||
request.setReportId(reportId);
|
||||
Boolean existReport = testPlanLoadCaseService.isExistReport(request);
|
||||
if (existReport) {
|
||||
LoadTestReportWithBLOBs loadTestReport = performanceReportService.getLoadTestReport(reportId);
|
||||
ReportTimeInfo reportTimeInfo = performanceReportService.getReportTimeInfo(reportId);
|
||||
TestPlanLoadCaseDTO.ReportDTO reportDTO = new TestPlanLoadCaseDTO.ReportDTO();
|
||||
if (loadTestReport != null) {
|
||||
BeanUtils.copyBean(reportDTO, loadTestReport);
|
||||
if (saveResponse) {
|
||||
allCases.forEach(item -> {
|
||||
LoadCaseReportRequest request = new LoadCaseReportRequest();
|
||||
String reportId = item.getLoadReportId();
|
||||
request.setTestPlanLoadCaseId(item.getId());
|
||||
request.setReportId(reportId);
|
||||
Boolean existReport = testPlanLoadCaseService.isExistReport(request);
|
||||
if (existReport) {
|
||||
LoadTestReportWithBLOBs loadTestReport = performanceReportService.getLoadTestReport(reportId);
|
||||
ReportTimeInfo reportTimeInfo = performanceReportService.getReportTimeInfo(reportId);
|
||||
TestPlanLoadCaseDTO.ReportDTO reportDTO = new TestPlanLoadCaseDTO.ReportDTO();
|
||||
if (loadTestReport != null) {
|
||||
BeanUtils.copyBean(reportDTO, loadTestReport);
|
||||
}
|
||||
if (reportTimeInfo != null) {
|
||||
BeanUtils.copyBean(reportDTO, reportTimeInfo);
|
||||
}
|
||||
item.setResponse(reportDTO);
|
||||
// todo 报告详情
|
||||
}
|
||||
if (reportTimeInfo != null) {
|
||||
BeanUtils.copyBean(reportDTO, reportTimeInfo);
|
||||
}
|
||||
item.setResponse(reportDTO);
|
||||
}
|
||||
});
|
||||
report.setLoadAllTestCases(allCases);
|
||||
});
|
||||
}
|
||||
report.setLoadAllCases(allCases);
|
||||
}
|
||||
if (checkReportConfig(config, "load", "failure")) {
|
||||
List<TestPlanLoadCaseDTO> failureCases = null;
|
||||
|
@ -1485,10 +1490,28 @@ public class TestPlanService {
|
|||
} else {
|
||||
failureCases = testPlanLoadCaseService.getFailureCases(planId);
|
||||
}
|
||||
report.setLoadFailureTestCases(failureCases);
|
||||
report.setLoadFailureCases(failureCases);
|
||||
}
|
||||
}
|
||||
render(report, response);
|
||||
}
|
||||
|
||||
public TestPlanSimpleReportDTO buildPlanReport(String planId, boolean saveResponse) {
|
||||
TestPlanWithBLOBs testPlan = testPlanMapper.selectByPrimaryKey(planId);
|
||||
|
||||
String reportConfig = testPlan.getReportConfig();
|
||||
JSONObject config = null;
|
||||
if (StringUtils.isNotBlank(reportConfig)) {
|
||||
config = JSONObject.parseObject(reportConfig);
|
||||
}
|
||||
TestPlanSimpleReportDTO report = getReport(planId);
|
||||
buildFunctionalReport(report, config, planId);
|
||||
buildApiReport(report, config, planId, saveResponse);
|
||||
buildLoadReport(report, config, planId, saveResponse);
|
||||
return report;
|
||||
}
|
||||
|
||||
public void exportPlanReport(String planId, HttpServletResponse response) throws UnsupportedEncodingException {
|
||||
render(buildPlanReport(planId, true), response);
|
||||
}
|
||||
|
||||
public Boolean checkReportConfig(JSONObject config, String key) {
|
||||
|
@ -1554,7 +1577,7 @@ public class TestPlanService {
|
|||
report.setFunctionResult(functionResult);
|
||||
report.setApiResult(apiResult);
|
||||
report.setStartTime(testPlan.getActualStartTime());
|
||||
report.setStartTime(testPlan.getActualEndTime());
|
||||
report.setEndTime(testPlan.getActualEndTime());
|
||||
report.setSummary(testPlan.getReportSummary());
|
||||
report.setConfig(testPlan.getReportConfig());
|
||||
IssueTemplateDao template = issueTemplateService.getTemplate(testPlan.getProjectId());
|
||||
|
|
|
@ -223,4 +223,44 @@ END //
|
|||
DELIMITER ;
|
||||
|
||||
CALL set_notice();
|
||||
DROP PROCEDURE IF EXISTS set_notice;
|
||||
DROP PROCEDURE IF EXISTS set_notice;
|
||||
|
||||
|
||||
-- 保存测试报告
|
||||
ALTER TABLE test_plan_report ADD is_new TINYINT(1) NULL COMMENT 'v1.12报告改版标记';
|
||||
ALTER table test_plan_report modify `is_api_case_executing` TINYINT(1) NULL COMMENT 'is Api Case executing';
|
||||
ALTER table test_plan_report modify `is_scenario_executing` TINYINT(1) NULL COMMENT 'is scenario Case executing';
|
||||
ALTER table test_plan_report modify `is_performance_executing` TINYINT(1) NULL COMMENT 'is performance executing';
|
||||
CREATE TABLE IF NOT EXISTS `test_plan_report_content` (
|
||||
`id` VARCHAR (50) NOT NULL COMMENT 'ID',
|
||||
`test_plan_report_id` VARCHAR ( 50 ) NOT NULL COMMENT 'Test plan ID',
|
||||
`start_time` bigint(13) NULL,
|
||||
`case_count` bigint(10) NULL,
|
||||
`end_time` bigint(13) NULL,
|
||||
`execute_rate` DOUBLE NULL,
|
||||
`pass_rate` DOUBLE NULL,
|
||||
`is_third_part_issue` TINYINT(1) NULL COMMENT 'is third part issue',
|
||||
|
||||
`config` text COMMENT 'plan config (JSON format)',
|
||||
`summary` text COMMENT 'summary',
|
||||
|
||||
`function_result` text COMMENT 'function result (JSON format)',
|
||||
`api_result` text COMMENT 'api result (JSON format)',
|
||||
`load_result` text COMMENT 'api result (JSON format)',
|
||||
|
||||
`function_all_cases` longtext COMMENT 'function all cases (JSON format)',
|
||||
`function_failure_cases` longtext COMMENT 'function failure cases (JSON format)',
|
||||
`issue_list` longtext COMMENT 'issue list (JSON format)',
|
||||
|
||||
`api_all_cases` longtext COMMENT 'api all cases (JSON format)',
|
||||
`api_failure_cases` longtext COMMENT 'api failure cases (JSON format)',
|
||||
|
||||
`scenario_all_cases` longtext COMMENT 'scenario all cases (JSON format)',
|
||||
`scenario_failure_cases` longtext COMMENT 'scenario failure cases (JSON format)',
|
||||
|
||||
`load_all_Cases` longtext COMMENT 'load all cases (JSON format)',
|
||||
`load_failure_cases` longtext COMMENT 'load failure cases (JSON format)',
|
||||
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE KEY `test_plan_report_id` ( `test_plan_report_id` )
|
||||
) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
<template>
|
||||
<test-plan-report-container :title="'接口用例统计'">
|
||||
<test-plan-report-container :title="'接口用例统计分析'">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-if="resultEnable" label="测试结果" name="first">
|
||||
<api-result :api-result="report.apiResult"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
|
||||
<api-cases :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
<api-cases :is-db="isDb" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所有用例" name="third">
|
||||
<api-cases :is-all="true" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
<el-tab-pane label="所有用例" name="third" v-if="allEnable">
|
||||
<api-cases :is-db="isDb" :is-all="true" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</test-plan-report-container>
|
||||
|
@ -29,7 +29,7 @@ export default {
|
|||
};
|
||||
},
|
||||
props: [
|
||||
'report', 'planId', 'isTemplate', 'isShare', 'shareId'
|
||||
'report', 'planId', 'isTemplate', 'isShare', 'shareId', 'isDb'
|
||||
],
|
||||
computed: {
|
||||
resultEnable() {
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
<template>
|
||||
<test-plan-report-container :title="'功能用例统计'">
|
||||
<test-plan-report-container :title="'功能用例统计分析'">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-if="resultEnable" label="测试结果" name="first">
|
||||
<functional-result :function-result="report.functionResult"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
|
||||
<functional-cases :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<functional-cases :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane v-if="issueEnable" label="缺陷列表" name="third">
|
||||
<functional-issue-list :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<functional-issue-list :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所有用例" name="fourth">
|
||||
<functional-cases v-if="allEnable" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<el-tab-pane label="所有用例" name="fourth" v-if="allEnable">
|
||||
<functional-cases :is-db="isDb" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</test-plan-report-container>
|
||||
|
@ -35,7 +35,7 @@ export default {
|
|||
};
|
||||
},
|
||||
props: [
|
||||
'report','planId', 'isTemplate', 'isShare', 'shareId', 'config'
|
||||
'report','planId', 'isTemplate', 'isShare', 'shareId', 'config', 'isDb'
|
||||
],
|
||||
computed: {
|
||||
resultEnable() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<test-plan-report-container :title="'性能用例数'">
|
||||
<test-plan-report-container :title="'性能用例统计分析'">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane v-if="resultEnable" label="测试结果" name="first">
|
||||
<load-result :load-result="report.loadResult"/>
|
||||
|
@ -7,8 +7,8 @@
|
|||
<el-tab-pane v-if="failureEnable" label="失败用例" name="second">
|
||||
<load-failure-result :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="所有用例" name="third">
|
||||
<load-all-result :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<el-tab-pane label="所有用例" name="third" v-if="allEnable">
|
||||
<load-all-result :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</test-plan-report-container>
|
||||
|
@ -40,7 +40,8 @@ export default {
|
|||
'planId',
|
||||
'isTemplate',
|
||||
'isShare',
|
||||
'shareId'
|
||||
'shareId',
|
||||
'isDb'
|
||||
],
|
||||
computed: {
|
||||
resultEnable() {
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
</el-button>
|
||||
</el-popover>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleSave()">
|
||||
{{'保存'}}
|
||||
</el-button>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-button icon="el-icon-download" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExportHtml()">
|
||||
{{'导出'}}
|
||||
|
@ -66,6 +71,20 @@ export default {
|
|||
this.shareUrl = thisHost + "/sharePlanReport" + data.shareUrl;
|
||||
});
|
||||
},
|
||||
handleSave() {
|
||||
let param = {};
|
||||
this.buildParam(param);
|
||||
this.$get('/test/plan/report/saveTestPlanReport/'+this.planId+'/MANUAL', () => {
|
||||
this.result = this.$post('/case/report/edit', param, () => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
});
|
||||
});
|
||||
},
|
||||
buildParam(param) {
|
||||
param.name = this.report.name;
|
||||
param.id = this.report.id;
|
||||
param.isNew = true;
|
||||
},
|
||||
handleExportHtml() {
|
||||
let config = {
|
||||
url: '/test/plan/report/export/' + this.planId,
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<el-main>
|
||||
<el-card v-loading="result ? result.loading : false">
|
||||
<test-plan-report-buttons :plan-id="planId" :is-share="isShare" :report="report"
|
||||
v-if="!isTemplate && !isShare"/>
|
||||
v-if="!isTemplate && !isShare && !isDb"/>
|
||||
<test-plan-overview-report v-if="overviewEnable" :report="report"/>
|
||||
<test-plan-summary-report v-if="summaryEnable" :is-template="isTemplate" :is-share="isShare" :report="report" :plan-id="planId"/>
|
||||
<test-plan-functional-report v-if="functionalEnable" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :plan-id="planId" :report="report"/>
|
||||
<test-plan-api-report v-if="apiEnable" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<test-plan-load-report v-if="loadEnable" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<test-plan-summary-report v-if="summaryEnable" :is-db="isDb" :is-template="isTemplate" :is-share="isShare" :report="report" :plan-id="planId"/>
|
||||
<test-plan-functional-report v-if="functionalEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :plan-id="planId" :report="report"/>
|
||||
<test-plan-api-report v-if="apiEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<test-plan-load-report v-if="loadEnable" :is-db="isDb" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</div>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<script>
|
||||
import TestPlanFunctionalReport
|
||||
from "@/business/components/track/plan/view/comonents/report/detail/TestPlanFunctionalReport";
|
||||
import {getShareTestPlanReport, getTestPlanReport} from "@/network/test-plan";
|
||||
import {getShareTestPlanReport, getTestPlanReport, getTestPlanReportContent} from "@/network/test-plan";
|
||||
import TestPlanApiReport from "@/business/components/track/plan/view/comonents/report/detail/TestPlanApiReport";
|
||||
import TestPlanLoadReport from "@/business/components/track/plan/view/comonents/report/detail/TestPlanLoadReport";
|
||||
import TestPlanReportContainer
|
||||
|
@ -41,7 +41,9 @@ export default {
|
|||
planId:String,
|
||||
isTemplate: Boolean,
|
||||
isShare: Boolean,
|
||||
shareId: String
|
||||
isDb: Boolean,
|
||||
shareId: String,
|
||||
reportId: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -90,6 +92,11 @@ export default {
|
|||
this.report = data;
|
||||
this.report.config = this.getDefaultConfig(this.report.config);
|
||||
});
|
||||
} if (this.isDb) {
|
||||
this.result = getTestPlanReportContent(this.reportId, (data) => {
|
||||
this.report = data;
|
||||
this.report.config = this.getDefaultConfig(this.report.config);
|
||||
});
|
||||
} else {
|
||||
this.result = getTestPlanReport(this.planId, (data) => {
|
||||
this.report = data;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<el-link class="edit-link" v-if="!isTemplate && !isShare && !isEdit" @click="isEdit = true">
|
||||
编辑
|
||||
</el-link>
|
||||
<el-link class="edit-link" v-if="!isTemplate && !isShare && isEdit" @click="saveSummary">
|
||||
<el-link class="edit-link" v-if="!isTemplate && !isShare && !isDb && isEdit" @click="saveSummary">
|
||||
保存
|
||||
</el-link>
|
||||
</template>
|
||||
|
@ -34,6 +34,7 @@ export default {
|
|||
report: Object,
|
||||
isTemplate: Boolean,
|
||||
isShare: Boolean,
|
||||
isDb: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -82,7 +82,8 @@ export default {
|
|||
report: Object,
|
||||
isShare: Boolean,
|
||||
shareId: String,
|
||||
isAll: Boolean
|
||||
isAll: Boolean,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -97,11 +98,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getScenarioApiCase() {
|
||||
if (this.isTemplate) {
|
||||
if (this.isTemplate || this.isDb) {
|
||||
if (this.isAll) {
|
||||
this.apiCases = this.report.apiAllCases;
|
||||
} else {
|
||||
this.apiCases = this.report.apiFailureResult;
|
||||
this.apiCases = this.report.apiFailureCases;
|
||||
}
|
||||
this.handleDefaultClick();
|
||||
} else if (this.isShare) {
|
||||
|
@ -153,6 +154,7 @@ export default {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
// todo
|
||||
getApiReport(row.id, (data) => {
|
||||
if (!data || !data.content) {
|
||||
this.showResponse = false;
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
<div>
|
||||
<el-tabs type="card">
|
||||
<el-tab-pane label="接口用例">
|
||||
<api-case-failure-result :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
<api-case-failure-result :is-db="isDb" :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="场景用例">
|
||||
<api-scenario-failure-result :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
<api-scenario-failure-result :is-db="isDb" :is-all="isAll" :share-id="shareId" :is-share="isShare" :report="report" :is-template="isTemplate" :plan-id="planId"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
|
@ -31,7 +31,8 @@ export default {
|
|||
isShare: Boolean,
|
||||
report: {},
|
||||
shareId: String,
|
||||
isAll: Boolean
|
||||
isAll: Boolean,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
</ms-table-column>
|
||||
</ms-table>
|
||||
</el-col>
|
||||
<el-col :span="16" v-if="scenarioCases.length > 0">
|
||||
<el-col :span="16" v-if="scenarioCases && scenarioCases.length > 0">
|
||||
<ms-api-report v-if="showResponse" :share-id="shareId" :is-share="isShare" :template-report="response" :is-template="isTemplate" :infoDb="true" :report-id="reportId"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -79,7 +79,8 @@ export default {
|
|||
report: Object,
|
||||
isShare: Boolean,
|
||||
shareId: String,
|
||||
isAll: Boolean
|
||||
isAll: Boolean,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -95,11 +96,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getScenarioApiCase() {
|
||||
if (this.isTemplate) {
|
||||
if (this.isTemplate || this.isDb) {
|
||||
if (this.isAll) {
|
||||
this.scenarioCases = this.report.scenarioAllCases;
|
||||
} else {
|
||||
this.scenarioCases = this.report.scenarioFailureResult;
|
||||
this.scenarioCases = this.report.scenarioFailureCases;
|
||||
}
|
||||
this.handleDefaultClick();
|
||||
} else if (this.isShare) {
|
||||
|
|
|
@ -84,7 +84,8 @@ export default {
|
|||
isShare: Boolean,
|
||||
report: {},
|
||||
shareId: String,
|
||||
isAll: Boolean
|
||||
isAll: Boolean,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -96,7 +97,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getFunctionalTestCase() {
|
||||
if (this.isTemplate) {
|
||||
if (this.isTemplate || this.isDb) {
|
||||
if (this.isAll) {
|
||||
this.testCases = this.report.functionAllCases;
|
||||
} else {
|
||||
|
|
|
@ -67,7 +67,7 @@ export default {
|
|||
isThirdPart: false
|
||||
}
|
||||
},
|
||||
props: ['planId', 'isTemplate', 'report', 'isShare', 'shareId'],
|
||||
props: ['planId', 'isTemplate', 'report', 'isShare', 'shareId', 'isDb'],
|
||||
computed: {
|
||||
issueStatusMap() {
|
||||
return ISSUE_STATUS_MAP;
|
||||
|
@ -79,7 +79,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getIssues() {
|
||||
if (this.isTemplate) {
|
||||
if (this.isTemplate || this.isDb) {
|
||||
this.data = this.report.issueList;
|
||||
} else if (this.isShare) {
|
||||
this.result = getShareIssuesByPlanId(this.shareId, this.planId, (data) => {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="container">
|
||||
<el-row class="scenario-info">
|
||||
<el-col :span="7">
|
||||
<load-failure-result @rowClick="getReport" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
<load-failure-result :is-db="isDb" @rowClick="getReport" :is-all="true" :share-id="shareId" :is-share="isShare" :is-template="isTemplate" :report="report" :plan-id="planId"/>
|
||||
</el-col>
|
||||
<el-col :span="17" >
|
||||
<el-card>
|
||||
|
@ -31,7 +31,8 @@ export default {
|
|||
report: Object,
|
||||
isTemplate: Boolean,
|
||||
isShare: Boolean,
|
||||
shareId: String
|
||||
shareId: String,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
@ -66,7 +66,8 @@ export default {
|
|||
isTemplate: Boolean,
|
||||
isShare: Boolean,
|
||||
shareId: String,
|
||||
isAll: Boolean
|
||||
isAll: Boolean,
|
||||
isDb: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -78,11 +79,11 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
getFailureTestCase() {
|
||||
if (this.isTemplate) {
|
||||
if (this.isTemplate || this.isDb) {
|
||||
if (this.isAll) {
|
||||
this.loadTestCases = this.report.loadAllTestCases;
|
||||
this.loadTestCases = this.report.loadAllCases;
|
||||
} else {
|
||||
this.loadTestCases = this.report.loadFailureTestCases;
|
||||
this.loadTestCases = this.report.loadFailureCases;
|
||||
}
|
||||
} else if (this.isShare) {
|
||||
if (this.isAll) {
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
:visible.sync="showDialog"
|
||||
:with-header="false"
|
||||
:modal-append-to-body="false"
|
||||
size="100%"
|
||||
ref="drawer"
|
||||
v-loading="result.loading">
|
||||
<template v-slot:default="scope">
|
||||
<el-row type="flex" class="head-bar">
|
||||
<el-col :span="12">
|
||||
<div class="name-edit">
|
||||
<el-button plain size="mini" icon="el-icon-back" @click="handleClose">{{$t('test_track.return')}}
|
||||
</el-button>
|
||||
<span class="title">{{report.name}}</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="head-right">
|
||||
<!-- <el-button v-permission="['PROJECT_TRACK_REPORT:READ+EXPORT']" :disabled="!isTestManagerOrTestUser" plain size="mini" @click="handleExport(report.name)">-->
|
||||
<!-- {{$t('test_track.plan_view.export_report')}}-->
|
||||
<!-- </el-button>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-scrollbar>
|
||||
<div class="container">
|
||||
<test-plan-report-content :is-db="true" :report-id="report.id" :plan-id="report.testPlanId"/>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TestPlanReportContent from "@/business/components/track/plan/view/comonents/report/detail/TestPlanReportContent";
|
||||
export default {
|
||||
name: "TestPlanDbReport",
|
||||
components: {
|
||||
TestPlanReportContent
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
result: {},
|
||||
showDialog: false,
|
||||
report: {},
|
||||
isTestManagerOrTestUser: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.isTestManagerOrTestUser = true;
|
||||
},
|
||||
methods: {
|
||||
listenGoBack() {
|
||||
//监听浏览器返回操作,关闭该对话框
|
||||
if (window.history && window.history.pushState) {
|
||||
history.pushState(null, null, document.URL);
|
||||
window.addEventListener('popstate', this.goBack, false);
|
||||
}
|
||||
},
|
||||
goBack() {
|
||||
this.handleClose();
|
||||
},
|
||||
open(report) {
|
||||
this.report = report;
|
||||
this.showDialog = true;
|
||||
this.listenGoBack();
|
||||
},
|
||||
handleClose() {
|
||||
window.removeEventListener('popstate', this.goBack, false);
|
||||
this.$emit('refresh');
|
||||
this.showDialog = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.head-bar {
|
||||
background: white;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
padding: 0 10px;
|
||||
border: 1px solid #EBEEF5;
|
||||
box-shadow: 0 0 2px 0 rgba(31, 31, 31, 0.15), 0 1px 2px 0 rgba(31, 31, 31, 0.15);
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100vh;
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
.head-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
</style>
|
|
@ -56,7 +56,7 @@
|
|||
<template v-slot:default="scope">
|
||||
<div>
|
||||
<ms-table-operator-button :tip="$t('test_track.plan_view.view_report')" icon="el-icon-document"
|
||||
@exec="openReport(scope.row.id)"/>
|
||||
@exec="openReport(scope.row)"/>
|
||||
<ms-table-operator-button v-permission="['PROJECT_TRACK_REPORT:READ+DELETE']" type="danger"
|
||||
:tip="$t('commons.delete')" icon="el-icon-delete"
|
||||
@exec="handleDelete(scope.row)"/>
|
||||
|
@ -67,6 +67,7 @@
|
|||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
<test-plan-report-view @refresh="initTableData" ref="testPlanReportView"/>
|
||||
<test-plan-db-report ref="dbReport"/>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
|
@ -92,10 +93,12 @@ import {
|
|||
} from "@/common/js/tableUtils";
|
||||
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import TestPlanDbReport from "@/business/components/track/report/components/TestPlanDbReport";
|
||||
|
||||
export default {
|
||||
name: "TestPlanReportList",
|
||||
components: {
|
||||
TestPlanDbReport,
|
||||
MsTableHeaderSelectPopover,
|
||||
TestPlanReportView,
|
||||
MsTableOperator, MsTableOperatorButton, MsTableHeader, MsTablePagination,
|
||||
|
@ -246,9 +249,13 @@ export default {
|
|||
this.saveSortField(this.tableHeaderKey,this.condition.orders);
|
||||
this.initTableData();
|
||||
},
|
||||
openReport(planId) {
|
||||
if (planId) {
|
||||
this.$refs.testPlanReportView.open(planId);
|
||||
openReport(report) {
|
||||
if (report.id) {
|
||||
if (report.isNew) {
|
||||
this.$refs.dbReport.open(report);
|
||||
} else {
|
||||
this.$refs.testPlanReportView.open(report.id);
|
||||
}
|
||||
}
|
||||
},
|
||||
isSelectDataAll(data) {
|
||||
|
|
|
@ -38,6 +38,10 @@ export function editPlanReportConfig(param, callback) {
|
|||
});
|
||||
}
|
||||
|
||||
export function getTestPlanReportContent(reportId, callback) {
|
||||
return reportId ? baseGet('/test/plan/report/db/' + reportId, callback) : {};
|
||||
}
|
||||
|
||||
export function getPlanFunctionFailureCase(planId, callback) {
|
||||
return planId ? baseGet('/test/plan/case/list/failure/' + planId, callback) : {};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue