diff --git a/backend/src/main/java/io/metersphere/Application.java b/backend/src/main/java/io/metersphere/Application.java index 1136cfcb7e..20ac59d613 100644 --- a/backend/src/main/java/io/metersphere/Application.java +++ b/backend/src/main/java/io/metersphere/Application.java @@ -6,6 +6,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.ServletComponentScan; +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestTemplate; @SpringBootApplication(exclude = {QuartzAutoConfiguration.class}) @ServletComponentScan @@ -14,4 +16,9 @@ public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } + + @Bean + public RestTemplate restTemplate() { + return new RestTemplate(); + } } diff --git a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java index 60da25a128..29792982fd 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java @@ -9,8 +9,6 @@ public class FileMetadata implements Serializable { private String type; - private String engine; - private Long createTime; private Long updateTime; @@ -43,14 +41,6 @@ public class FileMetadata implements Serializable { this.type = type == null ? null : type.trim(); } - public String getEngine() { - return engine; - } - - public void setEngine(String engine) { - this.engine = engine == null ? null : engine.trim(); - } - public Long getCreateTime() { return createTime; } diff --git a/backend/src/main/java/io/metersphere/base/domain/FileMetadataExample.java b/backend/src/main/java/io/metersphere/base/domain/FileMetadataExample.java index 7c82bf430d..9146d5fe98 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileMetadataExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileMetadataExample.java @@ -314,76 +314,6 @@ public class FileMetadataExample { return (Criteria) this; } - public Criteria andEngineIsNull() { - addCriterion("engine is null"); - return (Criteria) this; - } - - public Criteria andEngineIsNotNull() { - addCriterion("engine is not null"); - return (Criteria) this; - } - - public Criteria andEngineEqualTo(String value) { - addCriterion("engine =", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineNotEqualTo(String value) { - addCriterion("engine <>", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineGreaterThan(String value) { - addCriterion("engine >", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineGreaterThanOrEqualTo(String value) { - addCriterion("engine >=", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineLessThan(String value) { - addCriterion("engine <", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineLessThanOrEqualTo(String value) { - addCriterion("engine <=", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineLike(String value) { - addCriterion("engine like", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineNotLike(String value) { - addCriterion("engine not like", value, "engine"); - return (Criteria) this; - } - - public Criteria andEngineIn(List values) { - addCriterion("engine in", values, "engine"); - return (Criteria) this; - } - - public Criteria andEngineNotIn(List values) { - addCriterion("engine not in", values, "engine"); - return (Criteria) this; - } - - public Criteria andEngineBetween(String value1, String value2) { - addCriterion("engine between", value1, value2, "engine"); - return (Criteria) this; - } - - public Criteria andEngineNotBetween(String value1, String value2) { - addCriterion("engine not between", value1, value2, "engine"); - return (Criteria) this; - } - public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCase.java new file mode 100644 index 0000000000..3196a870a6 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCase.java @@ -0,0 +1,107 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestCase implements Serializable { + private String id; + + private String nodeId; + + private String projectId; + + private String name; + + private String type; + + private String priority; + + private String method; + + private String prerequisite; + + private Long createTime; + + private Long updateTime; + + private static final long serialVersionUID = 1L; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getNodeId() { + return nodeId; + } + + public void setNodeId(String nodeId) { + this.nodeId = nodeId == null ? null : nodeId.trim(); + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId == null ? null : projectId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type == null ? null : type.trim(); + } + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority == null ? null : priority.trim(); + } + + public String getMethod() { + return method; + } + + public void setMethod(String method) { + this.method = method == null ? null : method.trim(); + } + + public String getPrerequisite() { + return prerequisite; + } + + public void setPrerequisite(String prerequisite) { + this.prerequisite = prerequisite == null ? null : prerequisite.trim(); + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java new file mode 100644 index 0000000000..84fffd493b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseExample.java @@ -0,0 +1,880 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andNodeIdIsNull() { + addCriterion("node_id is null"); + return (Criteria) this; + } + + public Criteria andNodeIdIsNotNull() { + addCriterion("node_id is not null"); + return (Criteria) this; + } + + public Criteria andNodeIdEqualTo(String value) { + addCriterion("node_id =", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotEqualTo(String value) { + addCriterion("node_id <>", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdGreaterThan(String value) { + addCriterion("node_id >", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdGreaterThanOrEqualTo(String value) { + addCriterion("node_id >=", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLessThan(String value) { + addCriterion("node_id <", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLessThanOrEqualTo(String value) { + addCriterion("node_id <=", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdLike(String value) { + addCriterion("node_id like", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotLike(String value) { + addCriterion("node_id not like", value, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdIn(List values) { + addCriterion("node_id in", values, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotIn(List values) { + addCriterion("node_id not in", values, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdBetween(String value1, String value2) { + addCriterion("node_id between", value1, value2, "nodeId"); + return (Criteria) this; + } + + public Criteria andNodeIdNotBetween(String value1, String value2) { + addCriterion("node_id not between", value1, value2, "nodeId"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andPriorityIsNull() { + addCriterion("priority is null"); + return (Criteria) this; + } + + public Criteria andPriorityIsNotNull() { + addCriterion("priority is not null"); + return (Criteria) this; + } + + public Criteria andPriorityEqualTo(String value) { + addCriterion("priority =", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotEqualTo(String value) { + addCriterion("priority <>", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThan(String value) { + addCriterion("priority >", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityGreaterThanOrEqualTo(String value) { + addCriterion("priority >=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThan(String value) { + addCriterion("priority <", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLessThanOrEqualTo(String value) { + addCriterion("priority <=", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityLike(String value) { + addCriterion("priority like", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotLike(String value) { + addCriterion("priority not like", value, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityIn(List values) { + addCriterion("priority in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotIn(List values) { + addCriterion("priority not in", values, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityBetween(String value1, String value2) { + addCriterion("priority between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andPriorityNotBetween(String value1, String value2) { + addCriterion("priority not between", value1, value2, "priority"); + return (Criteria) this; + } + + public Criteria andMethodIsNull() { + addCriterion("method is null"); + return (Criteria) this; + } + + public Criteria andMethodIsNotNull() { + addCriterion("method is not null"); + return (Criteria) this; + } + + public Criteria andMethodEqualTo(String value) { + addCriterion("method =", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotEqualTo(String value) { + addCriterion("method <>", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThan(String value) { + addCriterion("method >", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodGreaterThanOrEqualTo(String value) { + addCriterion("method >=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThan(String value) { + addCriterion("method <", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLessThanOrEqualTo(String value) { + addCriterion("method <=", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodLike(String value) { + addCriterion("method like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotLike(String value) { + addCriterion("method not like", value, "method"); + return (Criteria) this; + } + + public Criteria andMethodIn(List values) { + addCriterion("method in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotIn(List values) { + addCriterion("method not in", values, "method"); + return (Criteria) this; + } + + public Criteria andMethodBetween(String value1, String value2) { + addCriterion("method between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andMethodNotBetween(String value1, String value2) { + addCriterion("method not between", value1, value2, "method"); + return (Criteria) this; + } + + public Criteria andPrerequisiteIsNull() { + addCriterion("prerequisite is null"); + return (Criteria) this; + } + + public Criteria andPrerequisiteIsNotNull() { + addCriterion("prerequisite is not null"); + return (Criteria) this; + } + + public Criteria andPrerequisiteEqualTo(String value) { + addCriterion("prerequisite =", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteNotEqualTo(String value) { + addCriterion("prerequisite <>", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteGreaterThan(String value) { + addCriterion("prerequisite >", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteGreaterThanOrEqualTo(String value) { + addCriterion("prerequisite >=", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteLessThan(String value) { + addCriterion("prerequisite <", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteLessThanOrEqualTo(String value) { + addCriterion("prerequisite <=", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteLike(String value) { + addCriterion("prerequisite like", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteNotLike(String value) { + addCriterion("prerequisite not like", value, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteIn(List values) { + addCriterion("prerequisite in", values, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteNotIn(List values) { + addCriterion("prerequisite not in", values, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteBetween(String value1, String value2) { + addCriterion("prerequisite between", value1, value2, "prerequisite"); + return (Criteria) this; + } + + public Criteria andPrerequisiteNotBetween(String value1, String value2) { + addCriterion("prerequisite not between", value1, value2, "prerequisite"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java new file mode 100644 index 0000000000..7a7aa8a2e5 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java @@ -0,0 +1,77 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestCaseNode implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String pId; + + private Long order; + + private Long createTime; + + private Long updateTime; + + private static final long serialVersionUID = 1L; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId == null ? null : projectId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getpId() { + return pId; + } + + public void setpId(String pId) { + this.pId = pId == null ? null : pId.trim(); + } + + public Long getOrder() { + return order; + } + + public void setOrder(Long order) { + this.order = order; + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseNodeExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseNodeExample.java new file mode 100644 index 0000000000..25dfd9fe76 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseNodeExample.java @@ -0,0 +1,660 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseNodeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseNodeExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPIdIsNull() { + addCriterion("p_id is null"); + return (Criteria) this; + } + + public Criteria andPIdIsNotNull() { + addCriterion("p_id is not null"); + return (Criteria) this; + } + + public Criteria andPIdEqualTo(String value) { + addCriterion("p_id =", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdNotEqualTo(String value) { + addCriterion("p_id <>", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdGreaterThan(String value) { + addCriterion("p_id >", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdGreaterThanOrEqualTo(String value) { + addCriterion("p_id >=", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdLessThan(String value) { + addCriterion("p_id <", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdLessThanOrEqualTo(String value) { + addCriterion("p_id <=", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdLike(String value) { + addCriterion("p_id like", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdNotLike(String value) { + addCriterion("p_id not like", value, "pId"); + return (Criteria) this; + } + + public Criteria andPIdIn(List values) { + addCriterion("p_id in", values, "pId"); + return (Criteria) this; + } + + public Criteria andPIdNotIn(List values) { + addCriterion("p_id not in", values, "pId"); + return (Criteria) this; + } + + public Criteria andPIdBetween(String value1, String value2) { + addCriterion("p_id between", value1, value2, "pId"); + return (Criteria) this; + } + + public Criteria andPIdNotBetween(String value1, String value2) { + addCriterion("p_id not between", value1, value2, "pId"); + return (Criteria) this; + } + + public Criteria andOrderIsNull() { + addCriterion("order is null"); + return (Criteria) this; + } + + public Criteria andOrderIsNotNull() { + addCriterion("order is not null"); + return (Criteria) this; + } + + public Criteria andOrderEqualTo(Long value) { + addCriterion("order =", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotEqualTo(Long value) { + addCriterion("order <>", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderGreaterThan(Long value) { + addCriterion("order >", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderGreaterThanOrEqualTo(Long value) { + addCriterion("order >=", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderLessThan(Long value) { + addCriterion("order <", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderLessThanOrEqualTo(Long value) { + addCriterion("order <=", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderIn(List values) { + addCriterion("order in", values, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotIn(List values) { + addCriterion("order not in", values, "order"); + return (Criteria) this; + } + + public Criteria andOrderBetween(Long value1, Long value2) { + addCriterion("order between", value1, value2, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotBetween(Long value1, Long value2) { + addCriterion("order not between", value1, value2, "order"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java new file mode 100644 index 0000000000..3e12c742b1 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java @@ -0,0 +1,37 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestCaseWithBLOBs extends TestCase implements Serializable { + private String detail; + + private String steps; + + private String tags; + + private static final long serialVersionUID = 1L; + + public String getDetail() { + return detail; + } + + public void setDetail(String detail) { + this.detail = detail == null ? null : detail.trim(); + } + + public String getSteps() { + return steps; + } + + public void setSteps(String steps) { + this.steps = steps == null ? null : steps.trim(); + } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags == null ? null : tags.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java new file mode 100644 index 0000000000..c20a28b949 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -0,0 +1,107 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestPlan implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String description; + + private String status; + + private String testCaseMatchRule; + + private String executorMatchRule; + + private Long createTime; + + private Long updateTime; + + private String tags; + + private static final long serialVersionUID = 1L; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId == null ? null : projectId.trim(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getTestCaseMatchRule() { + return testCaseMatchRule; + } + + public void setTestCaseMatchRule(String testCaseMatchRule) { + this.testCaseMatchRule = testCaseMatchRule == null ? null : testCaseMatchRule.trim(); + } + + public String getExecutorMatchRule() { + return executorMatchRule; + } + + public void setExecutorMatchRule(String executorMatchRule) { + this.executorMatchRule = executorMatchRule == null ? null : executorMatchRule.trim(); + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + } + + public String getTags() { + return tags; + } + + public void setTags(String tags) { + this.tags = tags == null ? null : tags.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java new file mode 100644 index 0000000000..b5531b4ed8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanExample.java @@ -0,0 +1,810 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestPlanExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestPlanExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(String value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(String value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(String value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(String value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(String value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(String value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLike(String value) { + addCriterion("project_id like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotLike(String value) { + addCriterion("project_id not like", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(String value1, String value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(String value1, String value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleIsNull() { + addCriterion("test_case_match_rule is null"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleIsNotNull() { + addCriterion("test_case_match_rule is not null"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleEqualTo(String value) { + addCriterion("test_case_match_rule =", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleNotEqualTo(String value) { + addCriterion("test_case_match_rule <>", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleGreaterThan(String value) { + addCriterion("test_case_match_rule >", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleGreaterThanOrEqualTo(String value) { + addCriterion("test_case_match_rule >=", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleLessThan(String value) { + addCriterion("test_case_match_rule <", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleLessThanOrEqualTo(String value) { + addCriterion("test_case_match_rule <=", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleLike(String value) { + addCriterion("test_case_match_rule like", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleNotLike(String value) { + addCriterion("test_case_match_rule not like", value, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleIn(List values) { + addCriterion("test_case_match_rule in", values, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleNotIn(List values) { + addCriterion("test_case_match_rule not in", values, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleBetween(String value1, String value2) { + addCriterion("test_case_match_rule between", value1, value2, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andTestCaseMatchRuleNotBetween(String value1, String value2) { + addCriterion("test_case_match_rule not between", value1, value2, "testCaseMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleIsNull() { + addCriterion("executor_match_rule is null"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleIsNotNull() { + addCriterion("executor_match_rule is not null"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleEqualTo(String value) { + addCriterion("executor_match_rule =", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleNotEqualTo(String value) { + addCriterion("executor_match_rule <>", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleGreaterThan(String value) { + addCriterion("executor_match_rule >", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleGreaterThanOrEqualTo(String value) { + addCriterion("executor_match_rule >=", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleLessThan(String value) { + addCriterion("executor_match_rule <", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleLessThanOrEqualTo(String value) { + addCriterion("executor_match_rule <=", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleLike(String value) { + addCriterion("executor_match_rule like", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleNotLike(String value) { + addCriterion("executor_match_rule not like", value, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleIn(List values) { + addCriterion("executor_match_rule in", values, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleNotIn(List values) { + addCriterion("executor_match_rule not in", values, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleBetween(String value1, String value2) { + addCriterion("executor_match_rule between", value1, value2, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andExecutorMatchRuleNotBetween(String value1, String value2) { + addCriterion("executor_match_rule not between", value1, value2, "executorMatchRule"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java new file mode 100644 index 0000000000..8dc6147b72 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java @@ -0,0 +1,97 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestPlanTestCase implements Serializable { + private String id; + + private String planId; + + private String caseId; + + private String executor; + + private String status; + + private String remark; + + private Long createTime; + + private Long updateTime; + + private String results; + + private static final long serialVersionUID = 1L; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id == null ? null : id.trim(); + } + + public String getPlanId() { + return planId; + } + + public void setPlanId(String planId) { + this.planId = planId == null ? null : planId.trim(); + } + + public String getCaseId() { + return caseId; + } + + public void setCaseId(String caseId) { + this.caseId = caseId == null ? null : caseId.trim(); + } + + public String getExecutor() { + return executor; + } + + public void setExecutor(String executor) { + this.executor = executor == null ? null : executor.trim(); + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + public Long getCreateTime() { + return createTime; + } + + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public Long getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Long updateTime) { + this.updateTime = updateTime; + } + + public String getResults() { + return results; + } + + public void setResults(String results) { + this.results = results == null ? null : results.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java new file mode 100644 index 0000000000..a5136f7f26 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCaseExample.java @@ -0,0 +1,740 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestPlanTestCaseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestPlanTestCaseExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andPlanIdIsNull() { + addCriterion("plan_id is null"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNotNull() { + addCriterion("plan_id is not null"); + return (Criteria) this; + } + + public Criteria andPlanIdEqualTo(String value) { + addCriterion("plan_id =", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotEqualTo(String value) { + addCriterion("plan_id <>", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThan(String value) { + addCriterion("plan_id >", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThanOrEqualTo(String value) { + addCriterion("plan_id >=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThan(String value) { + addCriterion("plan_id <", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThanOrEqualTo(String value) { + addCriterion("plan_id <=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLike(String value) { + addCriterion("plan_id like", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotLike(String value) { + addCriterion("plan_id not like", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdIn(List values) { + addCriterion("plan_id in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotIn(List values) { + addCriterion("plan_id not in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdBetween(String value1, String value2) { + addCriterion("plan_id between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotBetween(String value1, String value2) { + addCriterion("plan_id not between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andExecutorIsNull() { + addCriterion("executor is null"); + return (Criteria) this; + } + + public Criteria andExecutorIsNotNull() { + addCriterion("executor is not null"); + return (Criteria) this; + } + + public Criteria andExecutorEqualTo(String value) { + addCriterion("executor =", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotEqualTo(String value) { + addCriterion("executor <>", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorGreaterThan(String value) { + addCriterion("executor >", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorGreaterThanOrEqualTo(String value) { + addCriterion("executor >=", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLessThan(String value) { + addCriterion("executor <", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLessThanOrEqualTo(String value) { + addCriterion("executor <=", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorLike(String value) { + addCriterion("executor like", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotLike(String value) { + addCriterion("executor not like", value, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorIn(List values) { + addCriterion("executor in", values, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotIn(List values) { + addCriterion("executor not in", values, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorBetween(String value1, String value2) { + addCriterion("executor between", value1, value2, "executor"); + return (Criteria) this; + } + + public Criteria andExecutorNotBetween(String value1, String value2) { + addCriterion("executor not between", value1, value2, "executor"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FileMetadataMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/FileMetadataMapper.xml index 7ae6826a04..7f07002b5e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/FileMetadataMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/FileMetadataMapper.xml @@ -5,7 +5,6 @@ - @@ -69,7 +68,7 @@ - id, name, type, engine, create_time, update_time, size + id, name, type, create_time, update_time, size + select + + distinct + + + , + + from test_case + + + + + order by ${orderByClause} + + + + + + delete from test_case + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case + + + + + + insert into test_case (id, node_id, project_id, + name, type, priority, + method, prerequisite, create_time, + update_time, detail, steps, + tags) + values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, + #{method,jdbcType=VARCHAR}, #{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}, #{detail,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR}, + #{tags,jdbcType=LONGVARCHAR}) + + + insert into test_case + + + id, + + + node_id, + + + project_id, + + + name, + + + type, + + + priority, + + + method, + + + prerequisite, + + + create_time, + + + update_time, + + + detail, + + + steps, + + + tags, + + + + + #{id,jdbcType=VARCHAR}, + + + #{nodeId,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{type,jdbcType=VARCHAR}, + + + #{priority,jdbcType=VARCHAR}, + + + #{method,jdbcType=VARCHAR}, + + + #{prerequisite,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{detail,jdbcType=LONGVARCHAR}, + + + #{steps,jdbcType=LONGVARCHAR}, + + + #{tags,jdbcType=LONGVARCHAR}, + + + + + + update test_case + + + id = #{record.id,jdbcType=VARCHAR}, + + + node_id = #{record.nodeId,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + type = #{record.type,jdbcType=VARCHAR}, + + + priority = #{record.priority,jdbcType=VARCHAR}, + + + method = #{record.method,jdbcType=VARCHAR}, + + + prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + detail = #{record.detail,jdbcType=LONGVARCHAR}, + + + steps = #{record.steps,jdbcType=LONGVARCHAR}, + + + tags = #{record.tags,jdbcType=LONGVARCHAR}, + + + + + + + + update test_case + set id = #{record.id,jdbcType=VARCHAR}, + node_id = #{record.nodeId,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + priority = #{record.priority,jdbcType=VARCHAR}, + method = #{record.method,jdbcType=VARCHAR}, + prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + detail = #{record.detail,jdbcType=LONGVARCHAR}, + steps = #{record.steps,jdbcType=LONGVARCHAR}, + tags = #{record.tags,jdbcType=LONGVARCHAR} + + + + + + update test_case + set id = #{record.id,jdbcType=VARCHAR}, + node_id = #{record.nodeId,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + type = #{record.type,jdbcType=VARCHAR}, + priority = #{record.priority,jdbcType=VARCHAR}, + method = #{record.method,jdbcType=VARCHAR}, + prerequisite = #{record.prerequisite,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_case + + + node_id = #{nodeId,jdbcType=VARCHAR}, + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + type = #{type,jdbcType=VARCHAR}, + + + priority = #{priority,jdbcType=VARCHAR}, + + + method = #{method,jdbcType=VARCHAR}, + + + prerequisite = #{prerequisite,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + detail = #{detail,jdbcType=LONGVARCHAR}, + + + steps = #{steps,jdbcType=LONGVARCHAR}, + + + tags = #{tags,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case + set node_id = #{nodeId,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + priority = #{priority,jdbcType=VARCHAR}, + method = #{method,jdbcType=VARCHAR}, + prerequisite = #{prerequisite,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + detail = #{detail,jdbcType=LONGVARCHAR}, + steps = #{steps,jdbcType=LONGVARCHAR}, + tags = #{tags,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update test_case + set node_id = #{nodeId,jdbcType=VARCHAR}, + project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + type = #{type,jdbcType=VARCHAR}, + priority = #{priority,jdbcType=VARCHAR}, + method = #{method,jdbcType=VARCHAR}, + prerequisite = #{prerequisite,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.java new file mode 100644 index 0000000000..4e88faf0e7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.java @@ -0,0 +1,30 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseNode; +import io.metersphere.base.domain.TestCaseNodeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseNodeMapper { + long countByExample(TestCaseNodeExample example); + + int deleteByExample(TestCaseNodeExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestCaseNode record); + + int insertSelective(TestCaseNode record); + + List selectByExample(TestCaseNodeExample example); + + TestCaseNode selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestCaseNode record, @Param("example") TestCaseNodeExample example); + + int updateByExample(@Param("record") TestCaseNode record, @Param("example") TestCaseNodeExample example); + + int updateByPrimaryKeySelective(TestCaseNode record); + + int updateByPrimaryKey(TestCaseNode record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml new file mode 100644 index 0000000000..f2776cda3b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name, p_id, order, create_time, update_time + + + + + delete from test_case_node + where id = #{id,jdbcType=VARCHAR} + + + delete from test_case_node + + + + + + insert into test_case_node (id, project_id, name, + p_id, order, create_time, + update_time) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{pId,jdbcType=VARCHAR}, #{order,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}) + + + insert into test_case_node + + + id, + + + project_id, + + + name, + + + p_id, + + + order, + + + create_time, + + + update_time, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{pId,jdbcType=VARCHAR}, + + + #{order,jdbcType=BIGINT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update test_case_node + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + p_id = #{record.pId,jdbcType=VARCHAR}, + + + order = #{record.order,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update test_case_node + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + p_id = #{record.pId,jdbcType=VARCHAR}, + order = #{record.order,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_case_node + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + p_id = #{pId,jdbcType=VARCHAR}, + + + order = #{order,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_case_node + set project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + p_id = #{pId,jdbcType=VARCHAR}, + order = #{order,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.java new file mode 100644 index 0000000000..9bd76ce709 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestPlan; +import io.metersphere.base.domain.TestPlanExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestPlanMapper { + long countByExample(TestPlanExample example); + + int deleteByExample(TestPlanExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestPlan record); + + int insertSelective(TestPlan record); + + List selectByExampleWithBLOBs(TestPlanExample example); + + List selectByExample(TestPlanExample example); + + TestPlan selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestPlan record, @Param("example") TestPlanExample example); + + int updateByExampleWithBLOBs(@Param("record") TestPlan record, @Param("example") TestPlanExample example); + + int updateByExample(@Param("record") TestPlan record, @Param("example") TestPlanExample example); + + int updateByPrimaryKeySelective(TestPlan record); + + int updateByPrimaryKeyWithBLOBs(TestPlan record); + + int updateByPrimaryKey(TestPlan record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml new file mode 100644 index 0000000000..55398ba323 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanMapper.xml @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, name, description, status, test_case_match_rule, executor_match_rule, + create_time, update_time + + + tags + + + + + + delete from test_plan + where id = #{id,jdbcType=VARCHAR} + + + delete from test_plan + + + + + + insert into test_plan (id, project_id, name, + description, status, test_case_match_rule, + executor_match_rule, create_time, update_time, + tags) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{testCaseMatchRule,jdbcType=VARCHAR}, + #{executorMatchRule,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{tags,jdbcType=LONGVARCHAR}) + + + insert into test_plan + + + id, + + + project_id, + + + name, + + + description, + + + status, + + + test_case_match_rule, + + + executor_match_rule, + + + create_time, + + + update_time, + + + tags, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{testCaseMatchRule,jdbcType=VARCHAR}, + + + #{executorMatchRule,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{tags,jdbcType=LONGVARCHAR}, + + + + + + update test_plan + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, + + + executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + tags = #{record.tags,jdbcType=LONGVARCHAR}, + + + + + + + + update test_plan + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, + executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + tags = #{record.tags,jdbcType=LONGVARCHAR} + + + + + + update test_plan + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + test_case_match_rule = #{record.testCaseMatchRule,jdbcType=VARCHAR}, + executor_match_rule = #{record.executorMatchRule,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_plan + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, + + + executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + tags = #{tags,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_plan + set project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, + executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + tags = #{tags,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update test_plan + set project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + test_case_match_rule = #{testCaseMatchRule,jdbcType=VARCHAR}, + executor_match_rule = #{executorMatchRule,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.java new file mode 100644 index 0000000000..86e0f91945 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestPlanTestCase; +import io.metersphere.base.domain.TestPlanTestCaseExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestPlanTestCaseMapper { + long countByExample(TestPlanTestCaseExample example); + + int deleteByExample(TestPlanTestCaseExample example); + + int deleteByPrimaryKey(String id); + + int insert(TestPlanTestCase record); + + int insertSelective(TestPlanTestCase record); + + List selectByExampleWithBLOBs(TestPlanTestCaseExample example); + + List selectByExample(TestPlanTestCaseExample example); + + TestPlanTestCase selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") TestPlanTestCase record, @Param("example") TestPlanTestCaseExample example); + + int updateByExampleWithBLOBs(@Param("record") TestPlanTestCase record, @Param("example") TestPlanTestCaseExample example); + + int updateByExample(@Param("record") TestPlanTestCase record, @Param("example") TestPlanTestCaseExample example); + + int updateByPrimaryKeySelective(TestPlanTestCase record); + + int updateByPrimaryKeyWithBLOBs(TestPlanTestCase record); + + int updateByPrimaryKey(TestPlanTestCase record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml new file mode 100644 index 0000000000..3b77bcea04 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestPlanTestCaseMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, plan_id, case_id, executor, status, remark, create_time, update_time + + + results + + + + + + delete from test_plan_test_case + where id = #{id,jdbcType=VARCHAR} + + + delete from test_plan_test_case + + + + + + insert into test_plan_test_case (id, plan_id, case_id, + executor, status, remark, + create_time, update_time, results + ) + values (#{id,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{caseId,jdbcType=VARCHAR}, + #{executor,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{results,jdbcType=LONGVARCHAR} + ) + + + insert into test_plan_test_case + + + id, + + + plan_id, + + + case_id, + + + executor, + + + status, + + + remark, + + + create_time, + + + update_time, + + + results, + + + + + #{id,jdbcType=VARCHAR}, + + + #{planId,jdbcType=VARCHAR}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{executor,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{results,jdbcType=LONGVARCHAR}, + + + + + + update test_plan_test_case + + + id = #{record.id,jdbcType=VARCHAR}, + + + plan_id = #{record.planId,jdbcType=VARCHAR}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + executor = #{record.executor,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + results = #{record.results,jdbcType=LONGVARCHAR}, + + + + + + + + update test_plan_test_case + set id = #{record.id,jdbcType=VARCHAR}, + plan_id = #{record.planId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + executor = #{record.executor,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + results = #{record.results,jdbcType=LONGVARCHAR} + + + + + + update test_plan_test_case + set id = #{record.id,jdbcType=VARCHAR}, + plan_id = #{record.planId,jdbcType=VARCHAR}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + executor = #{record.executor,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update test_plan_test_case + + + plan_id = #{planId,jdbcType=VARCHAR}, + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + executor = #{executor,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + results = #{results,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update test_plan_test_case + set plan_id = #{planId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + executor = #{executor,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + results = #{results,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update test_plan_test_case + set plan_id = #{planId,jdbcType=VARCHAR}, + case_id = #{caseId,jdbcType=VARCHAR}, + executor = #{executor,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/commons/constants/EngineType.java b/backend/src/main/java/io/metersphere/commons/constants/EngineType.java deleted file mode 100644 index 0199c1e6e8..0000000000 --- a/backend/src/main/java/io/metersphere/commons/constants/EngineType.java +++ /dev/null @@ -1,5 +0,0 @@ -package io.metersphere.commons.constants; - -public enum EngineType { - DOCKER, KUBERNETES -} diff --git a/backend/src/main/java/io/metersphere/controller/ReportController.java b/backend/src/main/java/io/metersphere/controller/ReportController.java index 57fc4275e5..10f8cb563b 100644 --- a/backend/src/main/java/io/metersphere/controller/ReportController.java +++ b/backend/src/main/java/io/metersphere/controller/ReportController.java @@ -8,6 +8,7 @@ import io.metersphere.commons.utils.PageUtils; import io.metersphere.commons.utils.Pager; import io.metersphere.controller.request.ReportRequest; import io.metersphere.dto.ReportDTO; +import io.metersphere.report.base.RequestStatistics; import io.metersphere.service.ReportService; import io.metersphere.user.SessionUtils; import org.apache.shiro.authz.annotation.Logical; @@ -52,5 +53,10 @@ public class ReportController { return reportService.getReportTestAndProInfo(reportId); } + @GetMapping("/content/{reportId}") + public List getReportContent(@PathVariable String reportId) { + return reportService.getReport(reportId); + } + } diff --git a/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java b/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java index 8e901839e3..efe56fd502 100644 --- a/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java +++ b/backend/src/main/java/io/metersphere/controller/TestResourcePoolController.java @@ -40,4 +40,13 @@ public class TestResourcePoolController { Page page = PageHelper.startPage(goPage, pageSize, true); return PageUtils.setPageInfo(page, testResourcePoolService.listResourcePools(request)); } + + @GetMapping("list/all") + public List listResourcePools() { + PageHelper.startPage(1, 10000, true); + QueryResourcePoolRequest request = new QueryResourcePoolRequest(); + return testResourcePoolService.listResourcePools(request); + } + + } diff --git a/backend/src/main/java/io/metersphere/engine/EngineContext.java b/backend/src/main/java/io/metersphere/engine/EngineContext.java index 499c18f0f6..2a5f508220 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineContext.java +++ b/backend/src/main/java/io/metersphere/engine/EngineContext.java @@ -7,9 +7,9 @@ public class EngineContext { private String testId; private String testName; private String namespace; - private String engineType; private String fileType; private String content; + private String resourcePoolId; private Map properties = new HashMap<>(); private Map testData = new HashMap<>(); @@ -37,14 +37,6 @@ public class EngineContext { this.namespace = namespace; } - public String getEngineType() { - return engineType; - } - - public void setEngineType(String engineType) { - this.engineType = engineType; - } - public void addProperty(String key, Object value) { this.properties.put(key, value); } @@ -76,4 +68,12 @@ public class EngineContext { public void setTestData(Map testData) { this.testData = testData; } + + public String getResourcePoolId() { + return resourcePoolId; + } + + public void setResourcePoolId(String resourcePoolId) { + this.resourcePoolId = resourcePoolId; + } } diff --git a/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/backend/src/main/java/io/metersphere/engine/EngineFactory.java index 5037afeaab..001084b9a9 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/backend/src/main/java/io/metersphere/engine/EngineFactory.java @@ -5,7 +5,8 @@ import com.alibaba.fastjson.JSONObject; import io.metersphere.base.domain.FileContent; import io.metersphere.base.domain.FileMetadata; import io.metersphere.base.domain.LoadTestWithBLOBs; -import io.metersphere.commons.constants.EngineType; +import io.metersphere.base.domain.TestResourcePool; +import io.metersphere.commons.constants.ResourcePoolTypeEnum; import io.metersphere.commons.exception.MSException; import io.metersphere.engine.docker.DockerTestEngine; import io.metersphere.engine.kubernetes.KubernetesTestEngine; @@ -13,6 +14,7 @@ import io.metersphere.i18n.Translator; import io.metersphere.parse.EngineSourceParser; import io.metersphere.parse.EngineSourceParserFactory; import io.metersphere.service.FileService; +import io.metersphere.service.TestResourcePoolService; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; @@ -26,14 +28,35 @@ import java.util.Map; @Service public class EngineFactory { private static FileService fileService; + private static TestResourcePoolService testResourcePoolService; - public static Engine createEngine(String engineType) { - final EngineType type = EngineType.valueOf(engineType); + public static Engine createEngine(LoadTestWithBLOBs loadTest) { + String resourcePoolId = null; + if (!StringUtils.isEmpty(loadTest.getLoadConfiguration())) { + final JSONArray jsonArray = JSONObject.parseArray(loadTest.getLoadConfiguration()); + for (int i = 0; i < jsonArray.size(); i++) { + final JSONObject jsonObject = jsonArray.getJSONObject(i); + if (StringUtils.equals(jsonObject.getString("key"), "resourcePoolId")) { + resourcePoolId = jsonObject.getString("value"); + break; + } + } + } + if (StringUtils.isBlank(resourcePoolId)) { + MSException.throwException("Resource Pool ID is empty."); + } + + TestResourcePool resourcePool = testResourcePoolService.getResourcePool(resourcePoolId); + if (resourcePool == null) { + MSException.throwException("Resource Pool is empty."); + } + + final ResourcePoolTypeEnum type = ResourcePoolTypeEnum.valueOf(resourcePool.getType()); switch (type) { - case DOCKER: + case NODE: return new DockerTestEngine(); - case KUBERNETES: + case K8S: return new KubernetesTestEngine(); } return null; @@ -48,7 +71,6 @@ public class EngineFactory { engineContext.setTestId(loadTest.getId()); engineContext.setTestName(loadTest.getName()); engineContext.setNamespace(loadTest.getProjectId()); - engineContext.setEngineType(fileMetadata.getEngine()); engineContext.setFileType(fileMetadata.getType()); if (!StringUtils.isEmpty(loadTest.getLoadConfiguration())) { @@ -57,6 +79,9 @@ public class EngineFactory { for (int i = 0; i < jsonArray.size(); i++) { final JSONObject jsonObject = jsonArray.getJSONObject(i); engineContext.addProperty(jsonObject.getString("key"), jsonObject.get("value")); + if (StringUtils.equals(jsonObject.getString("key"), "resourcePoolId")) { + engineContext.setResourcePoolId(jsonObject.getString("value")); + } } } @@ -86,4 +111,9 @@ public class EngineFactory { private void setFileService(FileService fileService) { EngineFactory.fileService = fileService; } + + @Resource + public void setTestResourcePoolService(TestResourcePoolService testResourcePoolService) { + EngineFactory.testResourcePoolService = testResourcePoolService; + } } diff --git a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java b/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java index 6b1861b8bb..87ad422164 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java +++ b/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java @@ -1,20 +1,23 @@ package io.metersphere.engine.docker; import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.controller.request.TestRequest; import io.metersphere.engine.Engine; import io.metersphere.engine.EngineContext; import org.apache.commons.lang3.StringUtils; import org.springframework.web.client.RestTemplate; - import java.util.HashMap; import java.util.List; public class DockerTestEngine implements Engine { private EngineContext context; + RestTemplate restTemplate; + @Override public boolean init(EngineContext context) { + this.restTemplate = CommonBeanFactory.getBean(RestTemplate.class); // todo 初始化操作 this.context = context; return true; @@ -22,8 +25,8 @@ public class DockerTestEngine implements Engine { @Override public void start() { - RestTemplate restTemplate = new RestTemplate(); - + // todo 运行测试 +// RestTemplate restTemplate = new RestTemplate(); String testId = context.getTestId(); String content = context.getContent(); @@ -34,6 +37,7 @@ public class DockerTestEngine implements Engine { testRequest.setTestId(testId); testRequest.setFileString(content); + // todo 判断测试状态 String taskStatusUri = "http://localhost:8082/jmeter/task/status/" + testId; List containerList = restTemplate.getForObject(taskStatusUri, List.class); for (int i = 0; i < containerList.size(); i++) { @@ -48,12 +52,13 @@ public class DockerTestEngine implements Engine { @Override public void stop() { - RestTemplate restTemplate = new RestTemplate(); + // TODO 停止运行测试 +// RestTemplate restTemplate = new RestTemplate(); String testId = context.getTestId(); - String uri = "http://localhost:8082/jmeter/container/stop" + testId; - restTemplate.getForObject(uri, String.class); + String uri = "http://localhost:8082/jmeter/container/stop/" + testId; + restTemplate.postForObject(uri, "", String.class); } } diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java b/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java index 25a5bb4e76..06f97114ca 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java +++ b/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java @@ -4,6 +4,10 @@ import com.alibaba.fastjson.JSON; import io.fabric8.kubernetes.api.model.ConfigMap; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.client.KubernetesClient; +import io.metersphere.base.domain.TestResource; +import io.metersphere.base.domain.TestResourcePool; +import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.utils.CommonBeanFactory; import io.metersphere.commons.utils.LogUtil; import io.metersphere.engine.Engine; import io.metersphere.engine.EngineContext; @@ -11,17 +15,24 @@ import io.metersphere.engine.kubernetes.crds.jmeter.Jmeter; import io.metersphere.engine.kubernetes.crds.jmeter.JmeterSpec; import io.metersphere.engine.kubernetes.provider.ClientCredential; import io.metersphere.engine.kubernetes.provider.KubernetesProvider; +import io.metersphere.service.TestResourcePoolService; +import io.metersphere.service.TestResourceService; import org.apache.commons.collections.MapUtils; import java.util.HashMap; +import java.util.List; public class KubernetesTestEngine implements Engine { private EngineContext context; + private TestResourcePoolService testResourcePoolService; + private TestResourceService testResourceService; @Override public boolean init(EngineContext context) { // todo 初始化操作 this.context = context; + this.testResourcePoolService = CommonBeanFactory.getBean(TestResourcePoolService.class); + this.testResourceService = CommonBeanFactory.getBean(TestResourceService.class); return true; } @@ -32,6 +43,11 @@ public class KubernetesTestEngine implements Engine { LogUtil.warn("Please initial the engine."); return; } + TestResourcePool resourcePool = testResourcePoolService.getResourcePool(context.getResourcePoolId()); + if (resourcePool == null) { + MSException.throwException("Resource Pool is empty"); + } + List resourceList = testResourceService.getResourcesByPoolId(resourcePool.getId()); // todo 运行测试 ClientCredential credential = new ClientCredential(); credential.setMasterUrl("https://172.16.10.93:6443"); diff --git a/backend/src/main/java/io/metersphere/report/JtlResolver.java b/backend/src/main/java/io/metersphere/report/JtlResolver.java new file mode 100644 index 0000000000..05706d1588 --- /dev/null +++ b/backend/src/main/java/io/metersphere/report/JtlResolver.java @@ -0,0 +1,116 @@ +package io.metersphere.report; + +import com.alibaba.fastjson.JSONObject; +import com.opencsv.bean.CsvToBean; +import com.opencsv.bean.CsvToBeanBuilder; +import com.opencsv.bean.HeaderColumnNameMappingStrategy; +import io.metersphere.report.base.Metric; +import io.metersphere.report.base.RequestStatistics; + +import java.io.Reader; +import java.io.StringReader; +import java.text.DecimalFormat; +import java.util.*; +import java.util.stream.Collectors; + +public class JtlResolver { + + private static List resolver(String jtlString) { + HeaderColumnNameMappingStrategy ms = new HeaderColumnNameMappingStrategy<>(); + ms.setType(Metric.class); + try (Reader reader = new StringReader(jtlString)) { + + CsvToBean cb = new CsvToBeanBuilder(reader) + .withType(Metric.class) + .withSkipLines(0) + .withMappingStrategy(ms) + .withIgnoreLeadingWhiteSpace(true) + .build(); + return cb.parse(); + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } + + private static List getOneRpsResult(Map> map){ + List requestStatisticsList = new ArrayList<>(); + Iterator>> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry> entry = iterator.next(); + String label = entry.getKey(); + List list = entry.getValue(); + List timestampList = list.stream().map(Metric::getTimestamp).collect(Collectors.toList()); + int index=0; + //总的响应时间 + int sumElapsed=0; + Integer failSize = 0; + Integer totalBytes = 0; + List elapsedList = new ArrayList<>(); + + for (int i = 0; i < list.size(); i++) { + try { + Metric row = list.get(i); + //响应时间 + String elapsed = row.getElapsed(); + sumElapsed += Integer.valueOf(elapsed); + elapsedList.add(Integer.valueOf(elapsed)); + //成功与否 + String success = row.getSuccess(); + if (!"true".equals(success)){ + failSize++; + } + //字节 + String bytes = row.getBytes(); + totalBytes += Integer.valueOf(bytes); + + index++; + }catch (Exception e){ + System.out.println("exception i:"+i); + } + } + + Collections.sort(elapsedList, new Comparator() { + public int compare(Integer o1, Integer o2) { + return o1-o2; + } + }); + + Integer tp90 = elapsedList.size()*9/10; + Integer tp95 = elapsedList.size()*95/100; + Integer tp99 = elapsedList.size()*99/100; + + Long l = Long.valueOf(timestampList.get(index-1)) - Long.valueOf(timestampList.get(0)); + + RequestStatistics requestStatistics = new RequestStatistics(); + requestStatistics.setRequestLabel(label); + requestStatistics.setSamples(index+""); + DecimalFormat df = new DecimalFormat("0.00"); + String s = df.format((float)sumElapsed/index); + requestStatistics.setAverage(s+""); + /** + * TP90的计算 + * 1,把一段时间内全部的请求的响应时间,从小到大排序,获得序列A + * 2,总的请求数量,乘以90%,获得90%对应的请求个数C + * 3,从序列A中找到第C个请求,它的响应时间,即为TP90的值 + * 其余相似的指标还有TP95, TP99 + */ + requestStatistics.setTp90(elapsedList.get(tp90)+""); + requestStatistics.setTp95(elapsedList.get(tp95)+""); + requestStatistics.setTp99(elapsedList.get(tp99)+""); + requestStatistics.setMin(elapsedList.get(0)+""); + requestStatistics.setMax(elapsedList.get(index-1)+""); + requestStatistics.setErrors(String.format("%.2f",failSize*100.0/index)+"%"); + requestStatistics.setKbPerSec(String.format("%.2f",totalBytes*1.0/1024/(l*1.0/1000))); + requestStatisticsList.add(requestStatistics); + } + return requestStatisticsList; + } + + public static List getRequestStatistics(String jtlString) { + List totalLines = resolver(jtlString); + Map> map = totalLines.stream().collect(Collectors.groupingBy(Metric::getLabel)); + return getOneRpsResult(map); + } + +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/report/base/Metric.java b/backend/src/main/java/io/metersphere/report/base/Metric.java new file mode 100644 index 0000000000..69ad56d1c9 --- /dev/null +++ b/backend/src/main/java/io/metersphere/report/base/Metric.java @@ -0,0 +1,180 @@ +package io.metersphere.report.base; + +import com.opencsv.bean.CsvBindByName; + +public class Metric { + // timestamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect + + @CsvBindByName(column = "timestamp") // 访问开始时间 + private String timestamp; + @CsvBindByName(column = "elapsed") // 访问开始到结束的用时 - 响应时间 + private String elapsed; + @CsvBindByName(column = "label") // 请求的标签 + private String label; + @CsvBindByName(column = "responseCode") // 响应码 + private String responseCode; + @CsvBindByName(column = "responseMessage") // 响应信息 + private String responseMessage; + @CsvBindByName(column = "threadName") // 请求所属线程 + private String threadName; + @CsvBindByName(column = "dataType") // 数据类型 + private String dataType; + @CsvBindByName(column = "success") // 访问是否成功 + private String success; + @CsvBindByName(column = "failureMessage") // 访问失败信息 + private String failureMessage; + @CsvBindByName(column = "bytes") // + private String bytes; + @CsvBindByName(column = "sentBytes") // + private String sentBytes; + @CsvBindByName(column = "grpThreads") // 线程组 + private String grpThreads; + @CsvBindByName(column = "allThreads") // + private String allThreads; + @CsvBindByName(column = "URL") // + private String url; + @CsvBindByName(column = "Latency") // 延时 + private String latency; + @CsvBindByName(column = "IdleTime") // 闲置时间 + private String idleTime; + @CsvBindByName(column = "Connect") // + private String connect; + + + public String getTimestamp() { + return timestamp; + } + + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + + public String getElapsed() { + return elapsed; + } + + public void setElapsed(String elapsed) { + this.elapsed = elapsed; + } + + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public String getResponseCode() { + return responseCode; + } + + public void setResponseCode(String responseCode) { + this.responseCode = responseCode; + } + + public String getResponseMessage() { + return responseMessage; + } + + public void setResponseMessage(String responseMessage) { + this.responseMessage = responseMessage; + } + + public String getThreadName() { + return threadName; + } + + public void setThreadName(String threadName) { + this.threadName = threadName; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public String getSuccess() { + return success; + } + + public void setSuccess(String success) { + this.success = success; + } + + public String getFailureMessage() { + return failureMessage; + } + + public void setFailureMessage(String failureMessage) { + this.failureMessage = failureMessage; + } + + public String getBytes() { + return bytes; + } + + public void setBytes(String bytes) { + this.bytes = bytes; + } + + public String getSentBytes() { + return sentBytes; + } + + public void setSentBytes(String sentBytes) { + this.sentBytes = sentBytes; + } + + public String getGrpThreads() { + return grpThreads; + } + + public void setGrpThreads(String grpThreads) { + this.grpThreads = grpThreads; + } + + public String getAllThreads() { + return allThreads; + } + + public void setAllThreads(String allThreads) { + this.allThreads = allThreads; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getLatency() { + return latency; + } + + public void setLatency(String latency) { + this.latency = latency; + } + + public String getIdleTime() { + return idleTime; + } + + public void setIdleTime(String idleTime) { + this.idleTime = idleTime; + } + + public String getConnect() { + return connect; + } + + public void setConnect(String connect) { + this.connect = connect; + } +} diff --git a/backend/src/main/java/io/metersphere/report/base/RequestStatistics.java b/backend/src/main/java/io/metersphere/report/base/RequestStatistics.java new file mode 100644 index 0000000000..6be60c2ea0 --- /dev/null +++ b/backend/src/main/java/io/metersphere/report/base/RequestStatistics.java @@ -0,0 +1,125 @@ +package io.metersphere.report.base; + +public class RequestStatistics { + + /**请求标签*/ + private String requestLabel; + + /**压测请求数*/ + private String samples; + + /**平均响应时间*/ + private String average; + + /**平均点击率*/ + private Double avgHits; + + /**90% Line*/ + private String tp90; + + /**95% Line*/ + private String tp95; + + /**99% Line*/ + private String tp99; + + /**最小请求时间 Min Response Time /ms */ + private String min; + + /**最大请求时间 Max Response Time /ms */ + private String max; + + /**吞吐量 KB/sec*/ + private String kbPerSec; + + /**错误率 Error Percentage */ + private String errors; + + public String getRequestLabel() { + return requestLabel; + } + + public void setRequestLabel(String requestLabel) { + this.requestLabel = requestLabel; + } + + public String getSamples() { + return samples; + } + + public void setSamples(String samples) { + this.samples = samples; + } + + public String getAverage() { + return average; + } + + public void setAverage(String average) { + this.average = average; + } + + public Double getAvgHits() { + return avgHits; + } + + public void setAvgHits(Double avgHits) { + this.avgHits = avgHits; + } + + public String getTp90() { + return tp90; + } + + public void setTp90(String tp90) { + this.tp90 = tp90; + } + + public String getTp95() { + return tp95; + } + + public void setTp95(String tp95) { + this.tp95 = tp95; + } + + public String getTp99() { + return tp99; + } + + public void setTp99(String tp99) { + this.tp99 = tp99; + } + + public String getMin() { + return min; + } + + public void setMin(String min) { + this.min = min; + } + + public String getMax() { + return max; + } + + public void setMax(String max) { + this.max = max; + } + + public String getKbPerSec() { + return kbPerSec; + } + + public void setKbPerSec(String kbPerSec) { + this.kbPerSec = kbPerSec; + } + + public String getErrors() { + return errors; + } + + public void setErrors(String errors) { + this.errors = errors; + } +} diff --git a/backend/src/main/java/io/metersphere/service/FuctionalTestService.java b/backend/src/main/java/io/metersphere/service/FuctionalTestService.java index 16564d5e73..520a277e7c 100644 --- a/backend/src/main/java/io/metersphere/service/FuctionalTestService.java +++ b/backend/src/main/java/io/metersphere/service/FuctionalTestService.java @@ -3,12 +3,9 @@ package io.metersphere.service; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.*; import io.metersphere.base.mapper.ext.ExtFunctionalTestMapper; -import io.metersphere.commons.constants.EngineType; import io.metersphere.commons.exception.MSException; import io.metersphere.controller.request.testplan.*; import io.metersphere.dto.FunctionalTestDTO; -import io.metersphere.engine.Engine; -import io.metersphere.engine.EngineFactory; import io.metersphere.i18n.Translator; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -94,8 +91,6 @@ public class FuctionalTestService { fileMetadata.setCreateTime(System.currentTimeMillis()); fileMetadata.setUpdateTime(System.currentTimeMillis()); fileMetadata.setType("jmx"); - // TODO engine 选择 - fileMetadata.setEngine(EngineType.DOCKER.name()); fileMetadataMapper.insert(fileMetadata); FileContent fileContent = new FileContent(); diff --git a/backend/src/main/java/io/metersphere/service/LoadTestService.java b/backend/src/main/java/io/metersphere/service/LoadTestService.java index aba6f3d3d8..7369a98201 100644 --- a/backend/src/main/java/io/metersphere/service/LoadTestService.java +++ b/backend/src/main/java/io/metersphere/service/LoadTestService.java @@ -6,7 +6,6 @@ import io.metersphere.base.mapper.FileMetadataMapper; import io.metersphere.base.mapper.LoadTestFileMapper; import io.metersphere.base.mapper.LoadTestMapper; import io.metersphere.base.mapper.ext.ExtLoadTestMapper; -import io.metersphere.commons.constants.EngineType; import io.metersphere.commons.constants.FileType; import io.metersphere.commons.constants.TestStatus; import io.metersphere.commons.exception.MSException; @@ -45,6 +44,8 @@ public class LoadTestService { private LoadTestFileMapper loadTestFileMapper; @Resource private FileService fileService; + @Resource + private TestResourcePoolService testResourcePoolService; public List list(QueryTestPlanRequest request) { return extLoadTestMapper.list(request); @@ -102,8 +103,6 @@ public class LoadTestService { fileMetadata.setUpdateTime(System.currentTimeMillis()); FileType fileType = getFileType(fileMetadata.getName()); fileMetadata.setType(fileType.name()); - // TODO engine 选择 - fileMetadata.setEngine(EngineType.DOCKER.name()); fileMetadataMapper.insert(fileMetadata); FileContent fileContent = new FileContent(); @@ -179,9 +178,8 @@ public class LoadTestService { List csvFiles = fileMetadataList.stream().filter(f -> StringUtils.equalsIgnoreCase(f.getType(), FileType.CSV.name())).collect(Collectors.toList()); LogUtil.info("Load test started " + loadTest.getName()); - // engine type (DOCKER|KUBERNETES) - // todo set type - final Engine engine = EngineFactory.createEngine(fileMetadata.getEngine()); + // engine type (NODE|K8S) + final Engine engine = EngineFactory.createEngine(loadTest); if (engine == null) { MSException.throwException(String.format("Test cannot be run,test ID:%s,file type:%s", request.getId(), fileMetadata.getType())); } diff --git a/backend/src/main/java/io/metersphere/service/ReportService.java b/backend/src/main/java/io/metersphere/service/ReportService.java index b2d6ebe4e8..029f45e84e 100644 --- a/backend/src/main/java/io/metersphere/service/ReportService.java +++ b/backend/src/main/java/io/metersphere/service/ReportService.java @@ -6,6 +6,8 @@ import io.metersphere.base.mapper.LoadTestReportMapper; import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper; import io.metersphere.controller.request.ReportRequest; import io.metersphere.dto.ReportDTO; +import io.metersphere.report.JtlResolver; +import io.metersphere.report.base.RequestStatistics; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -41,4 +43,11 @@ public class ReportService { public ReportDTO getReportTestAndProInfo(String reportId) { return extLoadTestReportMapper.getReportTestAndProInfo(reportId); } + + public List getReport(String id) { + LoadTestReport loadTestReport = loadTestReportMapper.selectByPrimaryKey(id); + String content = loadTestReport.getContent(); + List requestStatistics = JtlResolver.getRequestStatistics(content); + return requestStatistics; + } } diff --git a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index 8275691d6c..e9254174cb 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -135,4 +135,8 @@ public class TestResourcePoolService { testResourceExample.createCriteria().andTestResourcePoolIdEqualTo(testResourcePoolId); testResourceMapper.deleteByExample(testResourceExample); } + + public TestResourcePool getResourcePool(String resourcePoolId) { + return testResourcePoolMapper.selectByPrimaryKey(resourcePoolId); + } } diff --git a/backend/src/main/java/io/metersphere/service/TestResourceService.java b/backend/src/main/java/io/metersphere/service/TestResourceService.java index b74c8bfdc2..f6924503de 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourceService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourceService.java @@ -41,4 +41,10 @@ public class TestResourceService { testResource.setUpdateTime(System.currentTimeMillis()); testResourceMapper.updateByPrimaryKeySelective(testResource); } + + public List getResourcesByPoolId(String resourcePoolId) { + TestResourceExample example = new TestResourceExample(); + example.createCriteria().andTestResourcePoolIdEqualTo(resourcePoolId); + return testResourceMapper.selectByExampleWithBLOBs(example); + } } diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index 9b2c8ac1dd..910c0fed68 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -11,7 +11,6 @@ CREATE TABLE IF NOT EXISTS `file_metadata` ( `id` varchar(64) NOT NULL COMMENT 'File ID', `name` varchar(64) NOT NULL COMMENT 'File name', `type` varchar(64) DEFAULT NULL COMMENT 'File type', - `engine` varchar(64) DEFAULT 'DOCKER' COMMENT 'engine type', `size` bigint(13) NOT NULL COMMENT 'File size', `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', diff --git a/backend/src/main/resources/db/migration/V5__init_track.sql b/backend/src/main/resources/db/migration/V5__init_track.sql new file mode 100644 index 0000000000..c44ea2d45e --- /dev/null +++ b/backend/src/main/resources/db/migration/V5__init_track.sql @@ -0,0 +1,75 @@ +CREATE TABLE IF NOT EXISTS `test_plan` ( + `id` varchar(50) NOT NULL COMMENT 'Test Plan ID', + `project_id` varchar(50) NOT NULL COMMENT 'Project ID this plan belongs to', + `name` varchar(64) NOT NULL COMMENT 'Plan name', + `description` varchar(255) DEFAULT NULL COMMENT 'Plan description', + `status` varchar(20) NOT NULL COMMENT 'Plan status', + `test_case_match_rule` varchar(255) DEFAULT NULL COMMENT 'Test case match rule', + `executor_match_rule` varchar(255) DEFAULT NULL COMMENT 'Executor match rule)', + `tags` text COMMENT 'Test plan tags (JSON format)', + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + PRIMARY KEY (`id`), + FOREIGN KEY (`project_id`) references project(`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; + + +CREATE TABLE IF NOT EXISTS `test_case_node` ( + `id` varchar(50) NOT NULL COMMENT 'Test case node ID', + `project_id` varchar(50) NOT NULL COMMENT 'Project ID this node belongs to', + `name` varchar(64) NOT NULL COMMENT 'Node name', + `p_id` varchar(50) NOT NULL COMMENT 'Parent node ID', + `order` bigint(13) COMMENT 'Node order', + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + PRIMARY KEY (`id`), + FOREIGN KEY (`project_id`) references project(`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; + + +CREATE TABLE IF NOT EXISTS `test_case` ( + `id` varchar(50) NOT NULL COMMENT 'Test case ID', + `node_id` varchar(50) NOT NULL COMMENT 'Node ID this case belongs to', + `project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to', + `name` varchar(64) NOT NULL COMMENT 'Case name', + `type` varchar(25) NOT NULL COMMENT 'Test case type', + `priority` varchar(10) DEFAULT NULL COMMENT 'Test case priority', + `method` varchar(15) NOT NULL COMMENT 'Test case method type', + `prerequisite` varchar(255) DEFAULT NULL COMMENT 'Test case prerequisite condition', + `detail` text COMMENT 'Load configuration (JSON format)', + `steps` text COMMENT 'Test case steps (JSON format)', + `tags` text COMMENT 'Test case tags (JSON format)', + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + PRIMARY KEY (`id`), + FOREIGN KEY (`project_id`) references project(`id`), + FOREIGN KEY (`node_id`) references test_case_node(`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; + + +CREATE TABLE IF NOT EXISTS `test_plan_test_case` ( + `id` varchar(50) NOT NULL COMMENT 'ID', + `plan_id` varchar(50) NOT NULL COMMENT 'Plan ID relation to', + `case_id` varchar(50) NOT NULL COMMENT 'Case ID relation to', + `executor` varchar(64) NOT NULL COMMENT 'Test case executor', + `status` varchar(15) NULL COMMENT 'Test case status', + `results` longtext COMMENT 'Test case result', + `remark` varchar(255) DEFAULT NULL COMMENT 'Test case remark', + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + PRIMARY KEY (`id`), + FOREIGN KEY (`plan_id`) references test_plan(`id`), + FOREIGN KEY (`case_id`) references test_case(`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; \ No newline at end of file diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index bb9c5654a1..d3422ab9d7 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -45,11 +45,12 @@ + - -
+ + @@ -57,7 +58,7 @@ - +
\ No newline at end of file diff --git a/backend/src/test/java/io/metersphere/JtlTest.java b/backend/src/test/java/io/metersphere/JtlTest.java new file mode 100644 index 0000000000..7d21dbea3a --- /dev/null +++ b/backend/src/test/java/io/metersphere/JtlTest.java @@ -0,0 +1,273 @@ +package io.metersphere; + +import com.alibaba.fastjson.JSONObject; +import com.opencsv.bean.CsvToBean; +import com.opencsv.bean.CsvToBeanBuilder; +import com.opencsv.bean.HeaderColumnNameMappingStrategy; +import io.metersphere.report.base.RequestStatistics; +import org.junit.Test; +import java.io.Reader; +import java.io.StringReader; +import java.util.*; +import java.util.stream.Collectors; + + +public class JtlTest { + + public static List beanBuilderExample(String content) { + HeaderColumnNameMappingStrategy ms = new HeaderColumnNameMappingStrategy<>(); + ms.setType(io.metersphere.Metric.class); + try (Reader reader = new StringReader(content)) { + + CsvToBean cb = new CsvToBeanBuilder(reader) + .withType(Metric.class) + .withSkipLines(0) + .withMappingStrategy(ms) + .withIgnoreLeadingWhiteSpace(true) + .build(); + + return cb.parse(); + } catch (Exception ex) { + ex.printStackTrace(); + } + return null; + } + + @Test + public void getRequestStatistics() { + String jtlString = "timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect\n" + + "1584602493891,1107,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-3,text,true,,1473653,6950,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=c81989f3-27d5-4b1a-a2db-03ddb06475d5&login=true&scope=openid,232,0,26\n" + + "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-3,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,26\n" + + "1584602494128,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-3,,true,,615,577,3,3,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + + "1584602494142,33,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-3,text,true,,8068,851,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=c81989f3-27d5-4b1a-a2db-03ddb06475d5&login=true&scope=openid,32,0,0\n" + + "1584602494242,756,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-3,text,true,,1464756,4955,3,3,https://rddev2.fit2cloud.com/login,46,0,0\n" + + "1584602493891,1154,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-2,text,true,,1473685,6950,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=374d02c0-6e1f-4937-b457-27d6e6ccf264&login=true&scope=openid,232,0,25\n" + + "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-2,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,25\n" + + "1584602494128,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-2,,true,,615,577,3,3,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + + "1584602494142,35,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-2,text,true,,8068,851,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=374d02c0-6e1f-4937-b457-27d6e6ccf264&login=true&scope=openid,35,0,0\n" + + "1584602494242,803,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-2,text,true,,1464788,4955,3,3,https://rddev2.fit2cloud.com/login,45,0,0\n" + + "1584602493891,1316,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-1,text,true,,1473686,6942,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=515530c4-0f36-454a-b536-9a11c7d2c47a&login=true&scope=openid,232,0,25\n" + + "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-1,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,25\n" + + "1584602494128,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-1,,true,,614,577,3,3,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + + "1584602494142,36,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-1,text,true,,8068,850,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=515530c4-0f36-454a-b536-9a11c7d2c47a&login=true&scope=openid,35,0,0\n" + + "1584602494242,965,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-1,text,true,,1464790,4948,3,3,https://rddev2.fit2cloud.com/login,48,0,0\n" + + "1584602496824,550,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-5,text,true,,1473644,6950,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=211a68fc-eb1e-482d-b5d2-636b411a133e&login=true&scope=openid,54,0,0\n" + + "1584602496824,54,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-5,,true,,214,567,5,5,https://rddev2.fit2cloud.com/,54,0,0\n" + + "1584602496878,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-5,,true,,615,577,5,5,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + + "1584602496890,29,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-5,text,true,,8074,851,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=211a68fc-eb1e-482d-b5d2-636b411a133e&login=true&scope=openid,29,0,0\n" + + "1584602496922,452,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-5,text,true,,1464741,4955,5,5,https://rddev2.fit2cloud.com/login,20,0,0\n" + + "1584602496821,559,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-4,text,true,,1473633,6958,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=e6ebc175-e3dc-4c99-933b-f6610688dbfe&login=true&scope=openid,57,0,2\n" + + "1584602496821,57,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-4,,true,,214,567,5,5,https://rddev2.fit2cloud.com/,57,0,2\n" + + "1584602496878,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-4,,true,,616,577,5,5,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + + "1584602496889,27,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-4,text,true,,8068,852,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=e6ebc175-e3dc-4c99-933b-f6610688dbfe&login=true&scope=openid,27,0,0\n" + + "1584602496919,461,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-4,text,true,,1464735,4962,5,5,https://rddev2.fit2cloud.com/login,20,0,0\n" + + "1584602499028,73,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-1,text,false,,4469,1745,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,73,0,6\n" + + "1584602499125,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-1,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + + "1584602499126,21,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,12438,559,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,21,0,0\n" + + "1584602499251,18,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1916,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,18,0,0\n" + + "1584602498833,509,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-7,text,true,,1473651,6942,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1f8130d4-f1c4-44f5-8633-03cc4892f31c&login=true&scope=openid,39,0,1\n" + + "1584602498833,39,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-7,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,39,0,1\n" + + "1584602498872,9,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-7,,true,,614,577,8,8,https://rddev2.fit2cloud.com/dashboard/,9,0,0\n" + + "1584602498881,18,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-7,text,true,,8074,850,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1f8130d4-f1c4-44f5-8633-03cc4892f31c&login=true&scope=openid,18,0,0\n" + + "1584602498901,441,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-7,text,true,,1464749,4948,8,8,https://rddev2.fit2cloud.com/login,25,0,0\n" + + "1584602499325,71,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-2,text,false,,4469,1746,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,70,0,4\n" + + "1584602499445,16,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1570,581,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,16,0,0\n" + + "1584602498832,637,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-6,text,true,,1473640,6958,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=ceda817a-6ac6-4516-9cd8-c1b25429bf94&login=true&scope=openid,50,0,1\n" + + "1584602498832,50,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-6,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,50,0,1\n" + + "1584602498882,9,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-6,,true,,616,577,8,8,https://rddev2.fit2cloud.com/dashboard/,9,0,0\n" + + "1584602498891,35,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-6,text,true,,8068,852,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=ceda817a-6ac6-4516-9cd8-c1b25429bf94&login=true&scope=openid,35,0,0\n" + + "1584602498927,542,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-6,text,true,,1464742,4962,8,8,https://rddev2.fit2cloud.com/login,23,0,0\n" + + "1584602498836,635,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-8,text,true,,1473639,6950,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1b42574e-756d-4157-9987-a8e1df496718&login=true&scope=openid,46,0,0\n" + + "1584602498836,46,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-8,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,46,0,0\n" + + "1584602498883,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-8,,true,,615,577,8,8,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + + "1584602498896,36,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-8,text,true,,8074,851,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1b42574e-756d-4157-9987-a8e1df496718&login=true&scope=openid,36,0,0\n" + + "1584602498933,538,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-8,text,true,,1464736,4955,8,8,https://rddev2.fit2cloud.com/login,26,0,0\n" + + "1584602499605,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-2,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + + "1584602499607,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,12424,560,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + + "1584602499856,21,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,2516,572,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,21,0,0\n" + + "1584602500034,27,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1916,574,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,27,0,0\n" + + "1584602500182,23,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-1,text,true,,288,566,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,23,0,0\n" + + "1584602500484,18,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1570,582,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,18,0,0\n" + + "1584602500504,16,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,2516,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,16,0,0\n" + + "1584602500206,420,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-1,text,true,,1473342,5748,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=573519c4-a91b-4e46-b28d-f68231a8faf8&login=true&scope=openid,10,0,0\n" + + "1584602500206,10,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-1,,true,,555,550,8,8,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,10,0,0\n" + + "1584602500216,23,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-1,text,true,,8038,1439,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=573519c4-a91b-4e46-b28d-f68231a8faf8&login=true&scope=openid,23,0,0\n" + + "1584602500243,383,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-1,text,true,,1464749,3759,8,8,https://rddev2.fit2cloud.com/login,24,0,0\n" + + "1584602500622,18,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-2,text,true,,288,567,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,18,0,0\n" + + "1584602500735,15,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,503,506,8,8,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,15,0,0\n" + + "1584602501143,58,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-5,text,false,,4469,1746,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,58,0,4\n" + + "1584602501233,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-5,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + + "1584602501234,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,12438,560,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + + "1584602501253,17,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1916,574,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,17,0,0\n" + + "1584602500841,509,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-2,text,true,,1473319,5757,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=c27f5334-b14f-43e8-ba3d-a31d6f385c32&login=true&scope=openid,13,0,0\n" + + "1584602500841,13,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-2,,true,,555,551,8,8,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,13,0,0\n" + + "1584602500855,29,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-2,text,true,,8038,1440,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=c27f5334-b14f-43e8-ba3d-a31d6f385c32&login=true&scope=openid,29,0,0\n" + + "1584602500887,463,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-2,text,true,,1464726,3766,8,8,https://rddev2.fit2cloud.com/login,26,0,0\n" + + "1584602501352,16,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,503,507,8,8,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,16,0,0\n" + + "1584602501458,13,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1570,582,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,13,0,0\n" + + "1584602501663,17,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,2516,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,17,0,0\n" + + "1584602501435,359,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-1,text,true,,1473387,6761,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=832af3d4-2ca4-4e23-bf2a-e14a01d27fc0&login=true&scope=openid,11,0,0\n" + + "1584602501435,11,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-1,,true,,558,653,8,8,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,11,0,0\n" + + "1584602501446,22,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-1,text,true,,8030,1614,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=832af3d4-2ca4-4e23-bf2a-e14a01d27fc0&login=true&scope=openid,22,0,0\n" + + "1584602501471,323,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-1,text,true,,1464799,4494,8,8,https://rddev2.fit2cloud.com/login,23,0,0\n" + + "1584602501784,17,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-5,text,true,,288,567,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,17,0,0\n" + + "1584602501907,304,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-1,text,true,,1473471,6749,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=1904f64b-a8f9-44d8-867e-359cfe46297f&login=true&scope=openid,10,0,0\n" + + "1584602501907,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-1,,true,,555,652,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,10,0,0\n" + + "1584602501917,24,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-1,text,true,,8021,1603,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=1904f64b-a8f9-44d8-867e-359cfe46297f&login=true&scope=openid,24,0,0\n" + + "1584602501943,268,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-1,text,true,,1464895,4494,10,10,https://rddev2.fit2cloud.com/login,23,0,0\n" + + "1584602502213,16,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1162,499,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,16,0,0\n" + + "1584602501802,513,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-5,text,true,,1473342,5757,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=7d3aea03-3217-44da-81be-35c41c1db2d7&login=true&scope=openid,15,0,0\n" + + "1584602501802,15,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-5,,true,,555,551,10,10,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,15,0,0\n" + + "1584602501817,23,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-5,text,true,,8038,1440,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=7d3aea03-3217-44da-81be-35c41c1db2d7&login=true&scope=openid,23,0,0\n" + + "1584602501842,473,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-5,text,true,,1464749,3766,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + + "1584602502316,28,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,503,507,10,10,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,28,0,0\n" + + "1584602502110,631,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-10,text,true,,1473668,6950,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=26792af8-d8cd-4ed6-b0e0-68ad7220004f&login=true&scope=openid,63,0,1\n" + + "1584602502110,63,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-10,,true,,214,567,10,10,https://rddev2.fit2cloud.com/,63,0,1\n" + + "1584602502173,15,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-10,,true,,615,577,10,10,https://rddev2.fit2cloud.com/dashboard/,15,0,0\n" + + "1584602502189,39,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-10,text,true,,8074,851,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=26792af8-d8cd-4ed6-b0e0-68ad7220004f&login=true&scope=openid,39,0,0\n" + + "1584602502229,512,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-10,text,true,,1464765,4955,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + + "1584602502169,625,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-2,text,true,,1473329,6770,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=7bfdeacf-3f22-449d-88f9-f0d792bfe1bb&login=true&scope=openid,19,0,0\n" + + "1584602502169,19,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-2,,true,,558,654,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,19,0,0\n" + + "1584602502189,32,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-2,text,true,,8030,1615,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=7bfdeacf-3f22-449d-88f9-f0d792bfe1bb&login=true&scope=openid,32,0,0\n" + + "1584602502222,572,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-2,text,true,,1464741,4501,10,10,https://rddev2.fit2cloud.com/login,21,0,0\n" + + "1584602502110,713,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-9,text,true,,1473667,6942,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=cb0aadfc-16eb-486b-b7f1-2c2df1c3231c&login=true&scope=openid,63,0,1\n" + + "1584602502110,63,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-9,,true,,214,567,10,10,https://rddev2.fit2cloud.com/,63,0,1\n" + + "1584602502174,21,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-9,,true,,614,577,10,10,https://rddev2.fit2cloud.com/dashboard/,21,0,0\n" + + "1584602502195,34,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-9,text,true,,8074,850,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=cb0aadfc-16eb-486b-b7f1-2c2df1c3231c&login=true&scope=openid,34,0,0\n" + + "1584602502231,592,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-9,text,true,,1464765,4948,10,10,https://rddev2.fit2cloud.com/login,21,0,0\n" + + "1584602502434,434,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-1,text,true,,1473315,6926,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=b2a99afa-66a7-411d-bba9-239c9b20de82&login=true&scope=openid,18,0,0\n" + + "1584602502434,18,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-1,,true,,558,731,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,18,0,0\n" + + "1584602502452,27,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-1,text,true,,8024,1603,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=b2a99afa-66a7-411d-bba9-239c9b20de82&login=true&scope=openid,27,0,0\n" + + "1584602502481,387,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-1,text,true,,1464733,4592,10,10,https://rddev2.fit2cloud.com/login,25,0,0\n" + + "1584602502839,65,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-3,text,false,,4462,1746,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,65,0,1\n" + + "1584602502961,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-3,text,false,,1392,0,10,10,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + + "1584602503108,27,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,12438,560,10,10,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,27,0,0\n" + + "1584602503239,23,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,1916,574,10,10,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,23,0,0\n" + + "1584602503006,262,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484,200,OK,Thread Group 1-1,text,true,,1473599,5844,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fcurrent%2Finfo?_nocache%3D1578039505484&state=10ff89f8-c521-42a3-99bd-d2929d4260cc&login=true&scope=openid,14,0,0\n" + + "1584602503006,14,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-0,302,Found,Thread Group 1-1,,true,,564,557,10,10,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484,14,0,0\n" + + "1584602503021,22,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-1,200,OK,Thread Group 1-1,text,true,,8056,1528,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fcurrent%2Finfo?_nocache%3D1578039505484&state=10ff89f8-c521-42a3-99bd-d2929d4260cc&login=true&scope=openid,22,0,0\n" + + "1584602503047,221,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-2,200,OK,Thread Group 1-1,text,true,,1464979,3759,10,10,https://rddev2.fit2cloud.com/login,20,0,0\n" + + "1584602502806,506,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-2,text,true,,1473450,6758,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=f4ac4eb9-f92a-4bcc-8214-3eac6df6d1c9&login=true&scope=openid,12,0,0\n" + + "1584602502806,12,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-2,,true,,555,653,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,12,0,0\n" + + "1584602502819,26,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-2,text,true,,8027,1604,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=f4ac4eb9-f92a-4bcc-8214-3eac6df6d1c9&login=true&scope=openid,26,0,0\n" + + "1584602502846,466,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-2,text,true,,1464868,4501,10,10,https://rddev2.fit2cloud.com/login,15,0,0\n" + + "1584602503314,13,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1162,500,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,13,0,0\n" + + "1584602503471,15,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/header-menu.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,3117,574,10,10,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/header-menu.html?_t=1577351137654,15,0,0\n" + + "1584602503471,54,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-4,text,false,,4462,1747,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,54,0,4\n" + + "1584602503569,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-4,text,false,,1392,0,10,10,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + + " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + + " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + + "1584602503108,494,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-5,text,true,,1473344,6770,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=bbc579c2-fce7-4f4c-a9e0-9e27c818248c&login=true&scope=openid,21,0,0\n" + + "1584602503108,21,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-5,,true,,558,654,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,21,0,0\n" + + "1584602503129,39,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-5,text,true,,8030,1615,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=bbc579c2-fce7-4f4c-a9e0-9e27c818248c&login=true&scope=openid,39,0,0\n" + + "1584602503170,432,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-5,text,true,,1464756,4501,10,10,https://rddev2.fit2cloud.com/login,25,0,0\n" + + "1584602503607,363,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-5,text,true,,1473560,6758,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=db071ff5-a114-4a0d-b693-fd1d8e477e75&login=true&scope=openid,12,0,0\n" + + "1584602503607,12,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-5,,true,,555,653,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,12,0,0\n" + + "1584602503619,23,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-5,text,true,,8027,1604,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=db071ff5-a114-4a0d-b693-fd1d8e477e75&login=true&scope=openid,23,0,0\n" + + "1584602503644,326,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-5,text,true,,1464978,4501,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + + "1584602503971,15,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1162,500,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,15,0,0\n" + + "1584602503971,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-4,text,true,,12438,561,10,10,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + + "1584602503792,32,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551,200,OK,Thread Group 1-1,text,true,,8617,2109,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fsource%2Flist?_nocache%3D1578039505551&state=2bc90b74-8d32-4217-a573-bfbd969b6b16&login=true&scope=openid,10,0,0\n" + + "1584602503792,10,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551-0,302,Found,Thread Group 1-1,,true,,563,556,10,10,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551,10,0,0\n" + + "1584602503803,21,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551-1,200,OK,Thread Group 1-1,text,true,,8054,1553,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fsource%2Flist?_nocache%3D1578039505551&state=2bc90b74-8d32-4217-a573-bfbd969b6b16&login=true&scope=openid,21,0,0\n" + + "1584602504095,21,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-9,text,false,,4469,1745,9,9,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,21,0,0\n" + + "1584602504100,20,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-4,text,true,,1916,575,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,20,0,0\n" + + "1584602504095,27,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-10,text,false,,4462,1746,7,7,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,27,0,0\n" + + "1584602504095,39,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-2,text,true,,8588,2336,6,6,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=24c9d65b-0421-4732-8193-0bf5f70b3fa4&login=true&scope=openid,13,0,0\n" + + "1584602504095,13,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-2,,true,,558,732,6,6,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,13,0,0\n" + + "1584602504108,26,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-2,text,true,,8030,1604,6,6,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=24c9d65b-0421-4732-8193-0bf5f70b3fa4&login=true&scope=openid,26,0,0\n" + + "1584602504095,55,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-8,text,false,,4469,1746,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,55,0,3\n" + + "1584602504095,59,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-6,text,false,,4462,1747,4,4,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,59,0,4\n" + + "1584602504095,65,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-7,text,false,,4469,1745,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,65,0,4\n" + + "1584602504200,12,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,1570,582,2,2,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,12,0,0\n"; + List metrics = beanBuilderExample(jtlString); + // 根据label分组,label作为map的key + Map> map = metrics.stream().collect(Collectors.groupingBy(Metric::getLabel)); + getOneRpsResult(map); + } + + private void getOneRpsResult(Map> map){ + Iterator>> iterator = map.entrySet().iterator(); + while (iterator.hasNext()) { + Map.Entry> entry = iterator.next(); + String label = entry.getKey(); + List list = entry.getValue(); + List timestampList = list.stream().map(Metric::getTimestamp).collect(Collectors.toList()); + int index=0; + //总的响应时间 + int sumElapsed=0; + Integer failSize = 0; + Integer totalBytes = 0; + // 响应时间的列表排序之后 用于计算90%line、95%line、99line + List elapsedList = new ArrayList<>(); + + for (int i = 0; i < list.size(); i++) { + try { + Metric row = list.get(i); + //响应时间 + String elapsed = row.getElapsed(); + sumElapsed += Integer.valueOf(elapsed); + elapsedList.add(Integer.valueOf(elapsed)); + //成功与否 + String success = row.getSuccess(); + if (!"true".equals(success)){ + failSize++; + } + //字节 + String bytes = row.getBytes(); + totalBytes += Integer.valueOf(bytes); + + index++; + }catch (Exception e){ + System.out.println("exception i:"+i); + } + } + + Collections.sort(elapsedList, new Comparator() { + public int compare(Integer o1, Integer o2) { + return o1-o2; + } + }); + + Integer tp90 = elapsedList.size()*9/10; + Integer tp95 = elapsedList.size()*95/100; + Integer tp99 = elapsedList.size()*99/100; + + Long l = Long.valueOf(timestampList.get(index-1)) - Long.valueOf(timestampList.get(0)); + + RequestStatistics sceneResult = new RequestStatistics(); + sceneResult.setRequestLabel(label); + sceneResult.setSamples(index+""); + sceneResult.setAverage(sumElapsed/index+""); + sceneResult.setTp90(elapsedList.get(tp90)+""); + sceneResult.setTp95(elapsedList.get(tp95)+""); + sceneResult.setTp99(elapsedList.get(tp99)+""); + sceneResult.setMin(elapsedList.get(0)+""); + sceneResult.setMax(elapsedList.get(index-1)+""); + sceneResult.setErrors(String.format("%.2f",failSize*100.0/index)+"%"); + sceneResult.setKbPerSec(String.format("%.2f",totalBytes*1.0/1024/(l*1.0/1000))); + System.out.println(JSONObject.toJSONString(sceneResult)); + + System.out.println(); + } + + } +} diff --git a/frontend/src/business/components/common/head/HeaderMenus.vue b/frontend/src/business/components/common/head/HeaderMenus.vue index b812bb3d8b..0794c80ad7 100644 --- a/frontend/src/business/components/common/head/HeaderMenus.vue +++ b/frontend/src/business/components/common/head/HeaderMenus.vue @@ -7,10 +7,12 @@ {{ $t("i18n.home") }} - + + @@ -21,8 +23,8 @@ - + @@ -36,8 +38,8 @@ - + @@ -48,8 +50,35 @@ - + + + + + + + {{$t('commons.show_all')}} + + + {{$t('test_track.create_case')}} + + + + + + + + + {{$t('commons.show_all')}} + + + {{$t('test_track.create_plan')}} + + + + {{$t('load_test.create')}} @@ -67,11 +96,13 @@ import PerformanceRecentReport from "../../performance/report/PerformanceRecentReport"; import FunctionalRecentReport from "../../functional/report/FunctionalRecentReport"; import {checkoutCurrentWorkspace} from "../../../../common/utils"; + import TrackRecentProject from "../../track/project/TrackRecentProject"; + import RecentCasePlan from "../../track/case/RecentCasePlan"; export default { name: "MsMenus", components: {PerformanceRecentReport, PerformanceRecentTestPlan, FunctionalRecentTestPlan, FunctionalRecentReport, - PerformanceRecentProject,FunctionalRecentProject}, + PerformanceRecentProject, FunctionalRecentProject, TrackRecentProject, RecentCasePlan}, data() { return { isCurrentWorkspaceUser: false, diff --git a/frontend/src/business/components/common/head/HeaderTopMenus.vue b/frontend/src/business/components/common/head/HeaderTopMenus.vue index 400b55f4f5..ed8870fcca 100644 --- a/frontend/src/business/components/common/head/HeaderTopMenus.vue +++ b/frontend/src/business/components/common/head/HeaderTopMenus.vue @@ -8,6 +8,9 @@ @select="handleSelect" router> + + {{$t('test_track.test_track')}} + {{$t('commons.functional')}} diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 78bcf1348e..d728aff1c0 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -24,6 +24,10 @@ import FunctionalTestPlan from "../../functional/plan/FunctionalTestPlan"; import FunctionalTestHome from "../../functional/home/FunctionalTestHome"; import PerformanceReportView from "../../performance/report/PerformanceReportView"; import FunctionalReportView from "../../functional/report/FunctionalReportView"; +import TrackHome from "../../track/home/TrackHome"; +import TestPlan from "../../track/plan/TestPlan"; +import TestCase from "../../track/case/TestCase"; +import TestTrack from "../../track/TestTrack"; Vue.use(VueRouter); @@ -184,6 +188,36 @@ const router = new VueRouter({ component: PerformanceReportView } ] + }, + { + path: "/track", + name: "track", + redirect: "/track/home", + components: { + content: TestTrack + }, + children: [ + { + path: 'home', + name: 'trackHome', + component: TrackHome, + }, + { + path: 'case', + name: 'testCase', + component: TestCase, + }, + { + path: "plan/:projectId", + name: "testPlan", + component: TestPlan + }, + { + path: "project/:type", + name: "trackProject", + component: MsProject + } + ] } ] }); diff --git a/frontend/src/business/components/performance/plan/EditPerformanceTestPlan.vue b/frontend/src/business/components/performance/plan/EditPerformanceTestPlan.vue index 7acff005c6..8fd3f95ed8 100644 --- a/frontend/src/business/components/performance/plan/EditPerformanceTestPlan.vue +++ b/frontend/src/business/components/performance/plan/EditPerformanceTestPlan.vue @@ -207,6 +207,10 @@ return false; } + if (!this.$refs.pressureConfig.validConfig()) { + return false; + } + if (!this.$refs.advancedConfig.validConfig()) { return false; } diff --git a/frontend/src/business/components/performance/plan/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/plan/components/PerformancePressureConfig.vue index 729bff360a..8ae77b7b3a 100644 --- a/frontend/src/business/components/performance/plan/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/plan/components/PerformancePressureConfig.vue @@ -73,6 +73,21 @@
{{$t('load_test.ramp_up_time_times')}}
+ + +
{{$t('load_test.select_resource_pool')}}
+
+ + + + + + +
@@ -89,6 +104,7 @@ const STEPS = "Steps"; const DURATION = "duration"; const RPS_LIMIT = "rpsLimit"; + const RESOURCE_POOL = "resourcePoolId"; export default { name: "PerformancePressureConfig", @@ -101,6 +117,8 @@ step: 10, rpsLimit: 10, orgOptions: {}, + resourcePool: null, + resourcePools: [], } }, mounted() { @@ -110,6 +128,8 @@ } else { this.calculateChart(); } + + this.getResourcePools(); }, watch: { '$route'(to, from) { @@ -125,11 +145,16 @@ } }, methods: { + getResourcePools() { + this.$get('/testresourcepool/list/all', response => { + this.resourcePools = response.data; + }) + }, getLoadConfig(testId) { if (testId) { this.$get('/testplan/get-load-config/' + testId, (response) => { - if (response.data && response.data != "") { + if (response.data) { let data = JSON.parse(response.data); data.forEach(d => { @@ -149,6 +174,9 @@ case RPS_LIMIT: this.rpsLimit = d.value; break; + case RESOURCE_POOL: + this.resourcePool = d.value; + break; default: break; } @@ -252,6 +280,17 @@ } } }, + validConfig() { + if (!this.resourcePool) { + this.$message({ + message: this.$t('load_test.resource_pool_is_null'), + type: 'warning' + }); + return false; + } + + return true; + }, convertProperty() { /// todo:下面4个属性是jmeter ConcurrencyThreadGroup plugin的属性,这种硬编码不太好吧,在哪能转换这种属性? return [ @@ -259,7 +298,8 @@ {key: RAMP_UP, value: this.rampUpTime}, {key: STEPS, value: this.step}, {key: DURATION, value: this.duration}, - {key: RPS_LIMIT, value: this.rpsLimit} + {key: RPS_LIMIT, value: this.rpsLimit}, + {key: RESOURCE_POOL, value: this.resourcePool}, ]; } } diff --git a/frontend/src/business/components/performance/report/PerformanceReportView.vue b/frontend/src/business/components/performance/report/PerformanceReportView.vue index 72c4c7b6b8..cdfbb3e034 100644 --- a/frontend/src/business/components/performance/report/PerformanceReportView.vue +++ b/frontend/src/business/components/performance/report/PerformanceReportView.vue @@ -38,7 +38,7 @@ - + diff --git a/frontend/src/business/components/performance/report/components/RequestStatistics.vue b/frontend/src/business/components/performance/report/components/RequestStatistics.vue index 55a26e0c58..c2c266d208 100644 --- a/frontend/src/business/components/performance/report/components/RequestStatistics.vue +++ b/frontend/src/business/components/performance/report/components/RequestStatistics.vue @@ -4,14 +4,14 @@ :data="tableData" border style="width: 100%" - :default-sort = "{prop: 'elementLabel'}" + :default-sort = "{prop: 'samples'}" > + width="450" + > + > + > + > + > + > + > + > + > + > @@ -83,11 +83,29 @@ name: "RequestStatistics", data() { return { - tableData: [{},{},{},{},{}] + tableData: [{},{},{},{},{}], } }, methods: { - + initTableData() { + this.$get("/report/content/" + this.id, res => { + this.tableData = res.data; + }) + } + }, + created() { + this.initTableData() + }, + props: ['id'], + watch: { + '$route'(to) { + let reportId = to.path.split('/')[4]; + if(reportId){ + this.$get("/report/content/" + reportId, res => { + this.tableData = res.data; + }) + } + } } } diff --git a/frontend/src/business/components/track/TestTrack.vue b/frontend/src/business/components/track/TestTrack.vue new file mode 100644 index 0000000000..43e53b04c7 --- /dev/null +++ b/frontend/src/business/components/track/TestTrack.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/frontend/src/business/components/track/case/RecentCasePlan.vue b/frontend/src/business/components/track/case/RecentCasePlan.vue new file mode 100644 index 0000000000..b93737b98d --- /dev/null +++ b/frontend/src/business/components/track/case/RecentCasePlan.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/frontend/src/business/components/track/case/TestCase.vue b/frontend/src/business/components/track/case/TestCase.vue new file mode 100644 index 0000000000..c1d3454975 --- /dev/null +++ b/frontend/src/business/components/track/case/TestCase.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/frontend/src/business/components/track/home/TrackHome.vue b/frontend/src/business/components/track/home/TrackHome.vue new file mode 100644 index 0000000000..6e24a3486a --- /dev/null +++ b/frontend/src/business/components/track/home/TrackHome.vue @@ -0,0 +1,16 @@ + + + + + diff --git a/frontend/src/business/components/track/plan/TestPlan.vue b/frontend/src/business/components/track/plan/TestPlan.vue new file mode 100644 index 0000000000..ea4ad22bd8 --- /dev/null +++ b/frontend/src/business/components/track/plan/TestPlan.vue @@ -0,0 +1,196 @@ + + + + + diff --git a/frontend/src/business/components/track/project/TrackRecentProject.vue b/frontend/src/business/components/track/project/TrackRecentProject.vue new file mode 100644 index 0000000000..fb63e22fbb --- /dev/null +++ b/frontend/src/business/components/track/project/TrackRecentProject.vue @@ -0,0 +1,44 @@ + + + + + diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 21c3f0b398..4a86e0bd0d 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -158,10 +158,19 @@ export default { 'custom_http_code': 'Custom HTTP response success status code', 'separated_by_commas': 'Separated by commas', 'create': 'Create Test', + 'select_resource_pool': 'Please Select Resource Pool', + 'resource_pool_is_null': 'Resource Pool is empty', }, fuc_test: { 'select_resource_pool': 'Please select resource pool' }, + test_track: { + 'test_track': 'Test Track', + 'test_case': 'Test Case', + 'create_case': 'Create Case', + 'test_plan': 'Test Plan', + 'create_plan': 'Create Plan', + }, i18n: { 'home': 'Home' } diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index f6d08028c3..f7b8aa8cfe 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -158,10 +158,19 @@ export default { 'custom_http_code': '自定义 HTTP 响应成功状态码', 'separated_by_commas': '按逗号分隔', 'create': '创建测试', + 'select_resource_pool': '请选择资源池', + 'resource_pool_is_null': '资源池为空', }, fuc_test: { 'select_resource_pool': '请选择资源池' }, + test_track: { + 'test_track': '测试跟踪', + 'test_case': '测试用例', + 'create_case': '创建用例', + 'test_plan': '测试计划', + 'create_plan': '创建计划', + }, i18n: { 'home': '首页', }