From a950c03a5bd073ee13781001af69a26fc8cdd865 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Fri, 13 Mar 2020 21:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8A=9F=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=89=8D=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/base/domain/FucTest.java | 67 ++ .../base/domain/FucTestExample.java | 600 ++++++++++++++++ .../metersphere/base/domain/FucTestFile.java | 27 + .../base/domain/FucTestFileExample.java | 340 +++++++++ .../base/domain/FucTestReport.java | 87 +++ .../base/domain/FucTestReportExample.java | 670 ++++++++++++++++++ .../base/domain/FucTestWithBLOBs.java | 27 + .../base/mapper/FucTestFileMapper.java | 22 + .../base/mapper/FucTestFileMapper.xml | 140 ++++ .../base/mapper/FucTestMapper.java | 37 + .../metersphere/base/mapper/FucTestMapper.xml | 302 ++++++++ .../base/mapper/FucTestReportMapper.java | 36 + .../base/mapper/FucTestReportMapper.xml | 304 ++++++++ .../mapper/ext/ExtFunctionalTestMapper.java | 11 + .../mapper/ext/ExtFunctionalTestMapper.xml | 33 + .../ext/ExtFunctionalTestReportMapper.java | 15 + .../ext/ExtFunctionalTestReportMapper.xml | 24 + .../FunctionalReportController.java | 56 ++ .../controller/FunctionalTestController.java | 99 +++ .../request/testplan/TestPlanRequest.java | 116 ++- .../metersphere/dto/FunctionalReportDTO.java | 104 +++ .../io/metersphere/dto/FunctionalTestDTO.java | 15 + .../io/metersphere/service/FileService.java | 14 + .../service/FuctionalTestService.java | 197 +++++ .../service/FunctionalReportService.java | 41 ++ .../db/migration/V4__init_funcional.sql | 38 + frontend/src/assets/browser/chrome.svg | 6 + frontend/src/assets/browser/firefox.svg | 6 + frontend/src/assets/browser/ie.svg | 6 + frontend/src/assets/browser/opera.svg | 6 + .../components/common/router/router.js | 6 + .../plan/EditFunctionalTestPlan.vue | 36 +- .../functional/plan/FunctionalTestPlan.vue | 6 +- .../FunctionalTestRuntimeConfig.vue | 107 ++- .../components/FunctionalTestSceneConfig.vue | 188 ++++- .../report/FunctionalRecentReport.vue | 4 +- .../report/FunctionalReportView.vue | 127 ++++ .../report/FunctionalTestReport.vue | 4 +- .../report/components/LogDetails.vue | 15 + frontend/src/i18n/en-US.js | 3 + frontend/src/i18n/zh-CN.js | 3 + 41 files changed, 3909 insertions(+), 36 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTest.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestFile.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestReport.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/FucTestWithBLOBs.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml create mode 100644 backend/src/main/java/io/metersphere/controller/FunctionalReportController.java create mode 100644 backend/src/main/java/io/metersphere/controller/FunctionalTestController.java create mode 100644 backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java create mode 100644 backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java create mode 100644 backend/src/main/java/io/metersphere/service/FuctionalTestService.java create mode 100644 backend/src/main/java/io/metersphere/service/FunctionalReportService.java create mode 100644 backend/src/main/resources/db/migration/V4__init_funcional.sql create mode 100644 frontend/src/assets/browser/chrome.svg create mode 100644 frontend/src/assets/browser/firefox.svg create mode 100644 frontend/src/assets/browser/ie.svg create mode 100644 frontend/src/assets/browser/opera.svg create mode 100644 frontend/src/business/components/functional/report/FunctionalReportView.vue create mode 100644 frontend/src/business/components/functional/report/components/LogDetails.vue diff --git a/backend/src/main/java/io/metersphere/base/domain/FucTest.java b/backend/src/main/java/io/metersphere/base/domain/FucTest.java new file mode 100644 index 000000000..ac70c732d --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTest.java @@ -0,0 +1,67 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class FucTest implements Serializable { + private String id; + + private String projectId; + + private String name; + + private String description; + + 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 getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.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/FucTestExample.java b/backend/src/main/java/io/metersphere/base/domain/FucTestExample.java new file mode 100644 index 000000000..d62a9a67e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestExample.java @@ -0,0 +1,600 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FucTestExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FucTestExample() { + 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 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/FucTestFile.java b/backend/src/main/java/io/metersphere/base/domain/FucTestFile.java new file mode 100644 index 000000000..85faaefd8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestFile.java @@ -0,0 +1,27 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class FucTestFile implements Serializable { + private String testId; + + private String fileId; + + private static final long serialVersionUID = 1L; + + public String getTestId() { + return testId; + } + + public void setTestId(String testId) { + this.testId = testId == null ? null : testId.trim(); + } + + public String getFileId() { + return fileId; + } + + public void setFileId(String fileId) { + this.fileId = fileId == null ? null : fileId.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java b/backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java new file mode 100644 index 000000000..863546b8b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestFileExample.java @@ -0,0 +1,340 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FucTestFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FucTestFileExample() { + 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 andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(String value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(String value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(String value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(String value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(String value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(String value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLike(String value) { + addCriterion("file_id like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotLike(String value) { + addCriterion("file_id not like", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(String value1, String value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(String value1, String value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + 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/FucTestReport.java b/backend/src/main/java/io/metersphere/base/domain/FucTestReport.java new file mode 100644 index 000000000..3c87a3e1e --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestReport.java @@ -0,0 +1,87 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class FucTestReport implements Serializable { + private String id; + + private String testId; + + private String name; + + private String description; + + private Long createTime; + + private Long updateTime; + + private String status; + + private String content; + + 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 getTestId() { + return testId; + } + + public void setTestId(String testId) { + this.testId = testId == null ? null : testId.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 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 getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status == null ? null : status.trim(); + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content == null ? null : content.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java b/backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java new file mode 100644 index 000000000..9bfca3406 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestReportExample.java @@ -0,0 +1,670 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class FucTestReportExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public FucTestReportExample() { + 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 andTestIdIsNull() { + addCriterion("test_id is null"); + return (Criteria) this; + } + + public Criteria andTestIdIsNotNull() { + addCriterion("test_id is not null"); + return (Criteria) this; + } + + public Criteria andTestIdEqualTo(String value) { + addCriterion("test_id =", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotEqualTo(String value) { + addCriterion("test_id <>", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThan(String value) { + addCriterion("test_id >", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdGreaterThanOrEqualTo(String value) { + addCriterion("test_id >=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThan(String value) { + addCriterion("test_id <", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLessThanOrEqualTo(String value) { + addCriterion("test_id <=", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdLike(String value) { + addCriterion("test_id like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotLike(String value) { + addCriterion("test_id not like", value, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdIn(List values) { + addCriterion("test_id in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotIn(List values) { + addCriterion("test_id not in", values, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdBetween(String value1, String value2) { + addCriterion("test_id between", value1, value2, "testId"); + return (Criteria) this; + } + + public Criteria andTestIdNotBetween(String value1, String value2) { + addCriterion("test_id not between", value1, value2, "testId"); + 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 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 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 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/FucTestWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/FucTestWithBLOBs.java new file mode 100644 index 000000000..665947320 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/FucTestWithBLOBs.java @@ -0,0 +1,27 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class FucTestWithBLOBs extends FucTest implements Serializable { + private String runtimeConfiguration; + + private String schedule; + + private static final long serialVersionUID = 1L; + + public String getRuntimeConfiguration() { + return runtimeConfiguration; + } + + public void setRuntimeConfiguration(String runtimeConfiguration) { + this.runtimeConfiguration = runtimeConfiguration == null ? null : runtimeConfiguration.trim(); + } + + public String getSchedule() { + return schedule; + } + + public void setSchedule(String schedule) { + this.schedule = schedule == null ? null : schedule.trim(); + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java b/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java new file mode 100644 index 000000000..a1a5136f3 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.java @@ -0,0 +1,22 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.FucTestFile; +import io.metersphere.base.domain.FucTestFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FucTestFileMapper { + long countByExample(FucTestFileExample example); + + int deleteByExample(FucTestFileExample example); + + int insert(FucTestFile record); + + int insertSelective(FucTestFile record); + + List selectByExample(FucTestFileExample example); + + int updateByExampleSelective(@Param("record") FucTestFile record, @Param("example") FucTestFileExample example); + + int updateByExample(@Param("record") FucTestFile record, @Param("example") FucTestFileExample example); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml new file mode 100644 index 000000000..d46e73405 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestFileMapper.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + test_id, file_id + + + + delete from fuc_test_file + + + + + + insert into fuc_test_file (test_id, file_id) + values (#{testId,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}) + + + insert into fuc_test_file + + + test_id, + + + file_id, + + + + + #{testId,jdbcType=VARCHAR}, + + + #{fileId,jdbcType=VARCHAR}, + + + + + + update fuc_test_file + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + file_id = #{record.fileId,jdbcType=VARCHAR}, + + + + + + + + update fuc_test_file + set test_id = #{record.testId,jdbcType=VARCHAR}, + file_id = #{record.fileId,jdbcType=VARCHAR} + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java b/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java new file mode 100644 index 000000000..30da7cda7 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.java @@ -0,0 +1,37 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.FucTest; +import io.metersphere.base.domain.FucTestExample; +import io.metersphere.base.domain.FucTestWithBLOBs; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FucTestMapper { + long countByExample(FucTestExample example); + + int deleteByExample(FucTestExample example); + + int deleteByPrimaryKey(String id); + + int insert(FucTestWithBLOBs record); + + int insertSelective(FucTestWithBLOBs record); + + List selectByExampleWithBLOBs(FucTestExample example); + + List selectByExample(FucTestExample example); + + FucTestWithBLOBs selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FucTestWithBLOBs record, @Param("example") FucTestExample example); + + int updateByExampleWithBLOBs(@Param("record") FucTestWithBLOBs record, @Param("example") FucTestExample example); + + int updateByExample(@Param("record") FucTest record, @Param("example") FucTestExample example); + + int updateByPrimaryKeySelective(FucTestWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(FucTestWithBLOBs record); + + int updateByPrimaryKey(FucTest record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml new file mode 100644 index 000000000..cc4774250 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestMapper.xml @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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, create_time, update_time + + + runtime_configuration, schedule + + + + + + delete from fuc_test + where id = #{id,jdbcType=VARCHAR} + + + delete from fuc_test + + + + + + insert into fuc_test (id, project_id, name, + description, create_time, update_time, + runtime_configuration, schedule) + values (#{id,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{runtimeConfiguration,jdbcType=LONGVARCHAR}, #{schedule,jdbcType=LONGVARCHAR}) + + + insert into fuc_test + + + id, + + + project_id, + + + name, + + + description, + + + create_time, + + + update_time, + + + runtime_configuration, + + + schedule, + + + + + #{id,jdbcType=VARCHAR}, + + + #{projectId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{runtimeConfiguration,jdbcType=LONGVARCHAR}, + + + #{schedule,jdbcType=LONGVARCHAR}, + + + + + + update fuc_test + + + id = #{record.id,jdbcType=VARCHAR}, + + + project_id = #{record.projectId,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + runtime_configuration = #{record.runtimeConfiguration,jdbcType=LONGVARCHAR}, + + + schedule = #{record.schedule,jdbcType=LONGVARCHAR}, + + + + + + + + update fuc_test + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + runtime_configuration = #{record.runtimeConfiguration,jdbcType=LONGVARCHAR}, + schedule = #{record.schedule,jdbcType=LONGVARCHAR} + + + + + + update fuc_test + set id = #{record.id,jdbcType=VARCHAR}, + project_id = #{record.projectId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update fuc_test + + + project_id = #{projectId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + runtime_configuration = #{runtimeConfiguration,jdbcType=LONGVARCHAR}, + + + schedule = #{schedule,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update fuc_test + set project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + runtime_configuration = #{runtimeConfiguration,jdbcType=LONGVARCHAR}, + schedule = #{schedule,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update fuc_test + set project_id = #{projectId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,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/FucTestReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.java new file mode 100644 index 000000000..8143688b1 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.FucTestReport; +import io.metersphere.base.domain.FucTestReportExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface FucTestReportMapper { + long countByExample(FucTestReportExample example); + + int deleteByExample(FucTestReportExample example); + + int deleteByPrimaryKey(String id); + + int insert(FucTestReport record); + + int insertSelective(FucTestReport record); + + List selectByExampleWithBLOBs(FucTestReportExample example); + + List selectByExample(FucTestReportExample example); + + FucTestReport selectByPrimaryKey(String id); + + int updateByExampleSelective(@Param("record") FucTestReport record, @Param("example") FucTestReportExample example); + + int updateByExampleWithBLOBs(@Param("record") FucTestReport record, @Param("example") FucTestReportExample example); + + int updateByExample(@Param("record") FucTestReport record, @Param("example") FucTestReportExample example); + + int updateByPrimaryKeySelective(FucTestReport record); + + int updateByPrimaryKeyWithBLOBs(FucTestReport record); + + int updateByPrimaryKey(FucTestReport record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml new file mode 100644 index 000000000..98e9ba0d1 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/FucTestReportMapper.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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, test_id, name, description, create_time, update_time, status + + + content + + + + + + delete from fuc_test_report + where id = #{id,jdbcType=VARCHAR} + + + delete from fuc_test_report + + + + + + insert into fuc_test_report (id, test_id, name, + description, create_time, update_time, + status, content) + values (#{id,jdbcType=VARCHAR}, #{testId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, + #{status,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}) + + + insert into fuc_test_report + + + id, + + + test_id, + + + name, + + + description, + + + create_time, + + + update_time, + + + status, + + + content, + + + + + #{id,jdbcType=VARCHAR}, + + + #{testId,jdbcType=VARCHAR}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + #{status,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update fuc_test_report + + + id = #{record.id,jdbcType=VARCHAR}, + + + test_id = #{record.testId,jdbcType=VARCHAR}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update fuc_test_report + set id = #{record.id,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + status = #{record.status,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update fuc_test_report + set id = #{record.id,jdbcType=VARCHAR}, + test_id = #{record.testId,jdbcType=VARCHAR}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT}, + status = #{record.status,jdbcType=VARCHAR} + + + + + + update fuc_test_report + + + test_id = #{testId,jdbcType=VARCHAR}, + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + status = #{status,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=VARCHAR} + + + update fuc_test_report + set test_id = #{testId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + status = #{status,jdbcType=VARCHAR}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=VARCHAR} + + + update fuc_test_report + set test_id = #{testId,jdbcType=VARCHAR}, + name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT}, + status = #{status,jdbcType=VARCHAR} + where id = #{id,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java new file mode 100644 index 000000000..6eda784a9 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.java @@ -0,0 +1,11 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.controller.request.testplan.QueryTestPlanRequest; +import io.metersphere.dto.FunctionalTestDTO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtFunctionalTestMapper { + List list(@Param("request") QueryTestPlanRequest params); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml new file mode 100644 index 000000000..87b2dd9bd --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestMapper.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java new file mode 100644 index 000000000..b720e4d57 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.java @@ -0,0 +1,15 @@ +package io.metersphere.base.mapper.ext; + +import io.metersphere.controller.request.ReportRequest; +import io.metersphere.dto.FunctionalReportDTO; +import io.metersphere.dto.ReportDTO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface ExtFunctionalTestReportMapper { + + List getReportList(@Param("reportRequest") ReportRequest request); + + FunctionalReportDTO getReportTestAndProInfo(@Param("id") String id); +} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml new file mode 100644 index 000000000..a3f34634a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtFunctionalTestReportMapper.xml @@ -0,0 +1,24 @@ + + + + + + + + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/controller/FunctionalReportController.java b/backend/src/main/java/io/metersphere/controller/FunctionalReportController.java new file mode 100644 index 000000000..560b9ce6b --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/FunctionalReportController.java @@ -0,0 +1,56 @@ +package io.metersphere.controller; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.base.domain.FucTestReport; +import io.metersphere.commons.constants.RoleConstants; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.controller.request.ReportRequest; +import io.metersphere.dto.FunctionalReportDTO; +import io.metersphere.service.FunctionalReportService; +import io.metersphere.user.SessionUtils; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +@RestController +@RequestMapping(value = "/functional/report") +public class FunctionalReportController { + + @Resource + private FunctionalReportService functionalReportService; + + @GetMapping("/recent/{count}") + @RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) + public List recentProjects(@PathVariable int count) { + String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); + ReportRequest request = new ReportRequest(); + request.setWorkspaceId(currentWorkspaceId); + // 最近 `count` 个项目 + PageHelper.startPage(1, count); + return functionalReportService.getRecentReportList(request); + } + + @PostMapping("/list/all/{goPage}/{pageSize}") + public Pager> getReportList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody ReportRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + return PageUtils.setPageInfo(page, functionalReportService.getReportList(request)); + } + + @PostMapping("/delete/{reportId}") + public void deleteReport(@PathVariable String reportId) { + functionalReportService.deleteReport(reportId); + } + + + @GetMapping("/test/pro/info/{reportId}") + public FunctionalReportDTO getReportTestAndProInfo(@PathVariable String reportId) { + return functionalReportService.getReportTestAndProInfo(reportId); + } + + +} diff --git a/backend/src/main/java/io/metersphere/controller/FunctionalTestController.java b/backend/src/main/java/io/metersphere/controller/FunctionalTestController.java new file mode 100644 index 000000000..c76210ee2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/FunctionalTestController.java @@ -0,0 +1,99 @@ +package io.metersphere.controller; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import io.metersphere.base.domain.FileMetadata; +import io.metersphere.commons.constants.RoleConstants; +import io.metersphere.commons.utils.PageUtils; +import io.metersphere.commons.utils.Pager; +import io.metersphere.controller.request.testplan.*; +import io.metersphere.dto.FunctionalTestDTO; +import io.metersphere.service.FileService; +import io.metersphere.service.FuctionalTestService; +import io.metersphere.user.SessionUtils; +import org.apache.shiro.authz.annotation.Logical; +import org.apache.shiro.authz.annotation.RequiresRoles; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.List; + +@RestController +@RequestMapping(value = "/functional/plan") +@RequiresRoles(value = {RoleConstants.TEST_MANAGER, RoleConstants.TEST_USER, RoleConstants.TEST_VIEWER}, logical = Logical.OR) +public class FunctionalTestController { + @Resource + private FuctionalTestService fuctionalTestService; + @Resource + private FileService fileService; + + @GetMapping("recent/{count}") + public List recentTestPlans(@PathVariable int count) { + String currentWorkspaceId = SessionUtils.getCurrentWorkspaceId(); + QueryTestPlanRequest request = new QueryTestPlanRequest(); + request.setWorkspaceId(currentWorkspaceId); + PageHelper.startPage(1, count, true); + return fuctionalTestService.recentTestPlans(request); + } + + @PostMapping("/list/{goPage}/{pageSize}") + public Pager> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryTestPlanRequest request) { + Page page = PageHelper.startPage(goPage, pageSize, true); + request.setWorkspaceId(SessionUtils.getCurrentWorkspaceId()); + return PageUtils.setPageInfo(page, fuctionalTestService.list(request)); + } + + @PostMapping(value = "/save", consumes = {"multipart/form-data"}) + public String save( + @RequestPart("request") SaveTestPlanRequest request, + @RequestPart(value = "file") MultipartFile file + ) { + return fuctionalTestService.save(request, file); + } + + @PostMapping(value = "/edit", consumes = {"multipart/form-data"}) + public String edit( + @RequestPart("request") EditTestPlanRequest request, + @RequestPart(value = "file", required = false) MultipartFile file + ) { + return fuctionalTestService.edit(request, file); + } + + @GetMapping("/get/{testId}") + public FunctionalTestDTO get(@PathVariable String testId) { + return fuctionalTestService.get(testId); + } + + @GetMapping("/get-runtime-config/{testId}") + public String getAdvancedConfiguration(@PathVariable String testId) { + return fuctionalTestService.getRuntimeConfiguration(testId); + } + + @PostMapping("/delete") + public void delete(@RequestBody DeleteTestPlanRequest request) { + fuctionalTestService.delete(request); + } + + @PostMapping("/run") + public void run(@RequestBody RunTestPlanRequest request) { + fuctionalTestService.run(request); + } + + @GetMapping("/file/metadata/{testId}") + public FileMetadata getFileMetadata(@PathVariable String testId) { + return fileService.getFucFileMetadataByTestId(testId); + } + + @PostMapping("/file/download") + public ResponseEntity downloadJmx(@RequestBody FileOperationRequest fileOperationRequest) { + byte[] bytes = fileService.loadFileAsBytes(fileOperationRequest.getId()); + return ResponseEntity.ok() + .contentType(MediaType.parseMediaType("application/octet-stream")) + .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + fileOperationRequest.getName() + "\"") + .body(bytes); + } +} diff --git a/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java b/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java index e11457179..db45afdcf 100644 --- a/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java +++ b/backend/src/main/java/io/metersphere/controller/request/testplan/TestPlanRequest.java @@ -1,6 +1,118 @@ package io.metersphere.controller.request.testplan; -import io.metersphere.base.domain.LoadTestWithBLOBs; +public class TestPlanRequest { + + private String id; + + private String projectId; + + private String name; + + private String description; + + private String scenarioDefinition; + + private Long createTime; + + private Long updateTime; + + private String loadConfiguration; + + private String advancedConfiguration; + + private String runtimeConfiguration; + + private String schedule; + + private static final long serialVersionUID = 1L; + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getScenarioDefinition() { + return scenarioDefinition; + } + + public void setScenarioDefinition(String scenarioDefinition) { + this.scenarioDefinition = scenarioDefinition; + } + + 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 getRuntimeConfiguration() { + return runtimeConfiguration; + } + + public void setRuntimeConfiguration(String runtimeConfiguration) { + this.runtimeConfiguration = runtimeConfiguration; + } + + public String getLoadConfiguration() { + return loadConfiguration; + } + + public void setLoadConfiguration(String loadConfiguration) { + this.loadConfiguration = loadConfiguration == null ? null : loadConfiguration.trim(); + } + + public String getAdvancedConfiguration() { + return advancedConfiguration; + } + + public void setAdvancedConfiguration(String advancedConfiguration) { + this.advancedConfiguration = advancedConfiguration == null ? null : advancedConfiguration.trim(); + } + + public String getSchedule() { + return schedule; + } + + public void setSchedule(String schedule) { + this.schedule = schedule == null ? null : schedule.trim(); + } -public class TestPlanRequest extends LoadTestWithBLOBs { } diff --git a/backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java b/backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java new file mode 100644 index 000000000..cdaf18553 --- /dev/null +++ b/backend/src/main/java/io/metersphere/dto/FunctionalReportDTO.java @@ -0,0 +1,104 @@ +package io.metersphere.dto; + +public class FunctionalReportDTO { + + private String id; + private String testId; + private String name; + private String description; + private Long createTime; + private Long updateTime; + private String status; + private String content; + private String testName; + private String projectId; + private String projectName; + + public String getProjectId() { + return projectId; + } + + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getTestId() { + return testId; + } + + public void setTestId(String testId) { + this.testId = testId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + 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 getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getTestName() { + return testName; + } + + public void setTestName(String testName) { + this.testName = testName; + } +} diff --git a/backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java b/backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java new file mode 100644 index 000000000..5a7e53f61 --- /dev/null +++ b/backend/src/main/java/io/metersphere/dto/FunctionalTestDTO.java @@ -0,0 +1,15 @@ +package io.metersphere.dto; + +import io.metersphere.base.domain.LoadTest; + +public class FunctionalTestDTO extends LoadTest { + private String projectName; + + public String getProjectName() { + return projectName; + } + + public void setProjectName(String projectName) { + this.projectName = projectName; + } +} diff --git a/backend/src/main/java/io/metersphere/service/FileService.java b/backend/src/main/java/io/metersphere/service/FileService.java index d73b730ac..f3a854a34 100644 --- a/backend/src/main/java/io/metersphere/service/FileService.java +++ b/backend/src/main/java/io/metersphere/service/FileService.java @@ -3,6 +3,7 @@ package io.metersphere.service; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.FileContentMapper; import io.metersphere.base.mapper.FileMetadataMapper; +import io.metersphere.base.mapper.FucTestFileMapper; import io.metersphere.base.mapper.LoadTestFileMapper; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -18,6 +19,8 @@ public class FileService { @Resource private LoadTestFileMapper loadTestFileMapper; @Resource + private FucTestFileMapper fucTestFileMapper; + @Resource private FileContentMapper fileContentMapper; public byte[] loadFileAsBytes(String id) { @@ -38,6 +41,17 @@ public class FileService { return fileMetadataMapper.selectByPrimaryKey(loadTestFiles.get(0).getFileId()); } + public FileMetadata getFucFileMetadataByTestId(String testId) { + FucTestFileExample fucTestFileExample = new FucTestFileExample(); + fucTestFileExample.createCriteria().andTestIdEqualTo(testId); + final List loadTestFiles = fucTestFileMapper.selectByExample(fucTestFileExample); + + if (CollectionUtils.isEmpty(loadTestFiles)) { + return null; + } + return fileMetadataMapper.selectByPrimaryKey(loadTestFiles.get(0).getFileId()); + } + public FileContent getFileContent(String fileId) { return fileContentMapper.selectByPrimaryKey(fileId); } diff --git a/backend/src/main/java/io/metersphere/service/FuctionalTestService.java b/backend/src/main/java/io/metersphere/service/FuctionalTestService.java new file mode 100644 index 000000000..ca87cdbb5 --- /dev/null +++ b/backend/src/main/java/io/metersphere/service/FuctionalTestService.java @@ -0,0 +1,197 @@ +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; +import org.springframework.util.CollectionUtils; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.IOException; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +@Service +@Transactional(rollbackFor = Exception.class) +public class FuctionalTestService { + @Resource + private FucTestMapper fucTestMapper; + @Resource + private ExtFunctionalTestMapper extFucTestMapper; + @Resource + private ProjectMapper projectMapper; + @Resource + private FileMetadataMapper fileMetadataMapper; + @Resource + private FileContentMapper fileContentMapper; + @Resource + private FucTestFileMapper fucTestFileMapper; + @Resource + private FileService fileService; + + public List list(QueryTestPlanRequest request) { + return extFucTestMapper.list(request); + } + + public void delete(DeleteTestPlanRequest request) { + fucTestMapper.deleteByPrimaryKey(request.getId()); + + fileService.deleteFileByTestId(request.getId()); + } + + public String save(SaveTestPlanRequest request, MultipartFile file) { + if (file == null) { + throw new IllegalArgumentException("文件不能为空!"); + } + + final FileMetadata fileMetadata = saveFile(file); + + final FucTestWithBLOBs fucTest = saveFucTest(request); + + FucTestFile fucTestFile = new FucTestFile(); + fucTestFile.setTestId(fucTest.getId()); + fucTestFile.setFileId(fileMetadata.getId()); + fucTestFileMapper.insert(fucTestFile); + + return fucTest.getId(); + } + + private FucTestWithBLOBs saveFucTest(SaveTestPlanRequest request) { + + FucTestExample example = new FucTestExample(); + example.createCriteria().andNameEqualTo(request.getName()).andProjectIdEqualTo(request.getProjectId()); + if (fucTestMapper.countByExample(example) > 0) { + MSException.throwException(Translator.get("function_test_already_exists")); + } + + final FucTestWithBLOBs fucTes = new FucTestWithBLOBs(); + fucTes.setId(UUID.randomUUID().toString()); + fucTes.setName(request.getName()); + fucTes.setProjectId(request.getProjectId()); + fucTes.setCreateTime(System.currentTimeMillis()); + fucTes.setUpdateTime(System.currentTimeMillis()); + fucTes.setDescription("todo"); + fucTes.setRuntimeConfiguration(request.getRuntimeConfiguration()); + fucTestMapper.insert(fucTes); + return fucTes; + } + + private FileMetadata saveFile(MultipartFile file) { + final FileMetadata fileMetadata = new FileMetadata(); + fileMetadata.setId(UUID.randomUUID().toString()); + fileMetadata.setName(file.getOriginalFilename()); + fileMetadata.setSize(file.getSize()); + fileMetadata.setCreateTime(System.currentTimeMillis()); + fileMetadata.setUpdateTime(System.currentTimeMillis()); + fileMetadata.setType(EngineType.JMX.name()); + fileMetadataMapper.insert(fileMetadata); + + FileContent fileContent = new FileContent(); + fileContent.setFileId(fileMetadata.getId()); + try { + fileContent.setFile(file.getBytes()); + } catch (IOException e) { + MSException.throwException(e); + } + fileContentMapper.insert(fileContent); + + return fileMetadata; + } + + public String edit(EditTestPlanRequest request, MultipartFile file) { + // 新选择了一个文件,删除原来的文件 + if (file != null) { + fileService.deleteFileByTestId(request.getId()); + final FileMetadata fileMetadata = saveFile(file); + FucTestFile fucTestFile = new FucTestFile(); + fucTestFile.setTestId(request.getId()); + fucTestFile.setFileId(fileMetadata.getId()); + fucTestFileMapper.insert(fucTestFile); + } + + final FucTestWithBLOBs fucTest = fucTestMapper.selectByPrimaryKey(request.getId()); + if (fucTest == null) { + MSException.throwException("无法编辑测试,未找到测试:" + request.getId()); + } else { + fucTest.setName(request.getName()); + fucTest.setProjectId(request.getProjectId()); + fucTest.setUpdateTime(System.currentTimeMillis()); + fucTest.setDescription("todo"); + fucTest.setRuntimeConfiguration(request.getRuntimeConfiguration()); + fucTestMapper.updateByPrimaryKeySelective(fucTest); + } + + return request.getId(); + } + + public void run(RunTestPlanRequest request) { + final FucTestWithBLOBs fucTest = fucTestMapper.selectByPrimaryKey(request.getId()); + if (fucTest == null) { + MSException.throwException("无法运行测试,未找到测试:" + request.getId()); + } + + final FileMetadata fileMetadata = fileService.getFileMetadataByTestId(request.getId()); + if (fileMetadata == null) { + MSException.throwException("无法运行测试,无法获取测试文件元信息,测试ID:" + request.getId()); + } + + final FileContent fileContent = fileService.getFileContent(fileMetadata.getId()); + if (fileContent == null) { + MSException.throwException("无法运行测试,无法获取测试文件内容,测试ID:" + request.getId()); + } + + System.out.println("开始运行:" + fucTest.getName()); + final Engine engine = EngineFactory.createEngine(fileMetadata.getType()); + if (engine == null) { + MSException.throwException(String.format("无法运行测试,未识别测试文件类型,测试ID:%s,文件类型:%s", + request.getId(), + fileMetadata.getType())); + } + + boolean init = true; + try { +// init = engine.init(EngineFactory.createContext(fucTest, fileMetadata, fileContent)); + } catch (Exception e) { + MSException.throwException(e); + } + if (!init) { + MSException.throwException(String.format("无法运行测试,初始化运行环境失败,测试ID:%s", request.getId())); + } + +// engine.start(); + + /// todo:通过调用stop方法能够停止正在运行的engine,但是如果部署了多个backend实例,页面发送的停止请求如何定位到具体的engine + } + + public List recentTestPlans(QueryTestPlanRequest request) { + // 查询最近的测试计划 + request.setRecent(true); + return extFucTestMapper.list(request); + } + + public FunctionalTestDTO get(String testId) { + QueryTestPlanRequest request = new QueryTestPlanRequest(); + request.setId(testId); + List testDTOS = extFucTestMapper.list(request); + if (!CollectionUtils.isEmpty(testDTOS)) { + return testDTOS.get(0); + } + return null; + } + + public String getRuntimeConfiguration(String testId) { + FucTestWithBLOBs fucTestWithBLOBs = fucTestMapper.selectByPrimaryKey(testId); + return Optional.ofNullable(fucTestWithBLOBs).orElse(new FucTestWithBLOBs()).getRuntimeConfiguration(); + } + +} diff --git a/backend/src/main/java/io/metersphere/service/FunctionalReportService.java b/backend/src/main/java/io/metersphere/service/FunctionalReportService.java new file mode 100644 index 000000000..7b8211fb8 --- /dev/null +++ b/backend/src/main/java/io/metersphere/service/FunctionalReportService.java @@ -0,0 +1,41 @@ +package io.metersphere.service; + +import io.metersphere.base.domain.FucTestReport; +import io.metersphere.base.domain.FucTestReportExample; +import io.metersphere.base.mapper.FucTestReportMapper; +import io.metersphere.base.mapper.ext.ExtFunctionalTestReportMapper; +import io.metersphere.controller.request.ReportRequest; +import io.metersphere.dto.FunctionalReportDTO; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.List; + +@Service +@Transactional(rollbackFor = Exception.class) +public class FunctionalReportService { + + @Resource + private FucTestReportMapper fucTestReportMapper; + @Resource + private ExtFunctionalTestReportMapper extFunctionalTestReportMapper; + + public List getRecentReportList(ReportRequest request) { + FucTestReportExample example = new FucTestReportExample(); + example.setOrderByClause("update_time desc"); + return fucTestReportMapper.selectByExample(example); + } + + public List getReportList(ReportRequest request) { + return extFunctionalTestReportMapper.getReportList(request); + } + + public void deleteReport(String reportId) { + fucTestReportMapper.deleteByPrimaryKey(reportId); + } + + public FunctionalReportDTO getReportTestAndProInfo(String reportId) { + return extFunctionalTestReportMapper.getReportTestAndProInfo(reportId); + } +} diff --git a/backend/src/main/resources/db/migration/V4__init_funcional.sql b/backend/src/main/resources/db/migration/V4__init_funcional.sql new file mode 100644 index 000000000..df92814fe --- /dev/null +++ b/backend/src/main/resources/db/migration/V4__init_funcional.sql @@ -0,0 +1,38 @@ +CREATE TABLE IF NOT EXISTS `fuc_test` ( + `id` varchar(50) NOT NULL COMMENT 'Test ID', + `project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to', + `name` varchar(64) NOT NULL COMMENT 'Test name', + `description` varchar(255) DEFAULT NULL COMMENT 'Test description', + `runtime_configuration` longtext COMMENT 'Load configuration (JSON format)', + `schedule` longtext COMMENT 'Test schedule (cron list)', + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + PRIMARY KEY (`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; + +CREATE TABLE IF NOT EXISTS `fuc_test_file` ( + `test_id` varchar(64) DEFAULT NULL, + `file_id` varchar(64) DEFAULT NULL, + UNIQUE KEY `load_test_file_unique_key` (`test_id`, `file_id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='功能测试和文件的关联表'; + +CREATE TABLE IF NOT EXISTS `fuc_test_report` ( + `id` varchar(50) NOT NULL COMMENT 'Test report ID', + `test_id` varchar(50) NOT NULL COMMENT 'Test ID this test report belongs to', + `name` varchar(64) NOT NULL COMMENT 'Test report name', + `description` varchar(255) DEFAULT NULL COMMENT 'Test report name', + `content` longtext, + `create_time` bigint(13) NOT NULL COMMENT 'Create timestamp', + `update_time` bigint(13) NOT NULL COMMENT 'Update timestamp', + `status` varchar(64) NOT NULL COMMENT 'Status of this test run', + PRIMARY KEY (`id`) +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_bin; + diff --git a/frontend/src/assets/browser/chrome.svg b/frontend/src/assets/browser/chrome.svg new file mode 100644 index 000000000..9692e3822 --- /dev/null +++ b/frontend/src/assets/browser/chrome.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/assets/browser/firefox.svg b/frontend/src/assets/browser/firefox.svg new file mode 100644 index 000000000..853abb6d5 --- /dev/null +++ b/frontend/src/assets/browser/firefox.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/assets/browser/ie.svg b/frontend/src/assets/browser/ie.svg new file mode 100644 index 000000000..b9964cbd4 --- /dev/null +++ b/frontend/src/assets/browser/ie.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/assets/browser/opera.svg b/frontend/src/assets/browser/opera.svg new file mode 100644 index 000000000..82e283627 --- /dev/null +++ b/frontend/src/assets/browser/opera.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 3c72e6a4a..78bcf1348 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -23,6 +23,7 @@ import PerformanceTestHome from "../../performance/home/PerformanceTestHome"; import FunctionalTestPlan from "../../functional/plan/FunctionalTestPlan"; import FunctionalTestHome from "../../functional/home/FunctionalTestHome"; import PerformanceReportView from "../../performance/report/PerformanceReportView"; +import FunctionalReportView from "../../functional/report/FunctionalReportView"; Vue.use(VueRouter); @@ -119,6 +120,11 @@ const router = new VueRouter({ path: "report/:type", name: "fucReport", component: FunctionalTestReport + }, + { + path: "report/view/:reportId", + name: "fucReportView", + component: FunctionalReportView } ] }, diff --git a/frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue b/frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue index cf919fd52..319dfb26a 100644 --- a/frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue +++ b/frontend/src/business/components/functional/plan/EditFunctionalTestPlan.vue @@ -25,7 +25,7 @@ - + @@ -48,23 +48,19 @@ result: {}, testPlan: {}, listProjectPath: "/project/listAll", - savePath: "/testplan/save", - editPath: "/testplan/edit", - runPath: "/testplan/run", + savePath: "/functional/plan/save", + editPath: "/functional/plan/edit", + runPath: "/functional/plan/run", projects: [], active: '0', tabs: [{ title: this.$t('load_test.basic_config'), id: '0', - component: 'BasicConfig' + component: 'FunctionalTestSceneConfig' }, { - title: this.$t('load_test.pressure_config'), + title: this.$t('load_test.runtime_config'), id: '1', - component: 'PressureConfig' - }, { - title: this.$t('load_test.advanced_config'), - id: '2', - component: 'AdvancedConfig' + component: 'FunctionalTestRuntimeConfig' }] } }, @@ -77,7 +73,7 @@ } let testId = to.path.split('/')[4]; // find testId if (testId) { - this.$get('/testplan/get/' + testId, response => { + this.$get('/functional/plan/get/' + testId, response => { this.testPlan = response.data; }); } @@ -87,7 +83,7 @@ created() { let testId = this.$route.path.split('/')[4]; if (testId) { - this.$get('/testplan/get/' + testId, response => { + this.$get('/functional/plan/get/' + testId, response => { this.testPlan = response.data; }); } @@ -112,8 +108,8 @@ message: this.$t('commons.save_success'), type: 'success' }); - this.$refs.advancedConfig.cancelAllEdit(); - this.$router.push({path: '/loadtest/all'}) + this.$refs.runtimeConfig.cancelAllEdit(); + this.$router.push({path: '/functional/plan/all'}) }); }, saveAndRun() { @@ -145,10 +141,8 @@ if (!this.testPlan.file.id) { formData.append("file", this.testPlan.file); } - // 压力配置 - this.testPlan.loadConfiguration = JSON.stringify(this.$refs.pressureConfig.convertProperty()); - // 高级配置 - this.testPlan.advancedConfiguration = JSON.stringify(this.$refs.advancedConfig.configurations()); + + this.testPlan.runtimeConfiguration = JSON.stringify(this.$refs.runtimeConfig.configurations()); // file属性不需要json化 let requestJson = JSON.stringify(this.testPlan, function (key, value) { @@ -169,7 +163,7 @@ }; }, cancel() { - this.$router.push({path: '/'}) + this.$router.push({path: '/functional/plan/all'}) }, validTestPlan() { if (!this.testPlan.name) { @@ -199,7 +193,7 @@ return false; } - if (!this.$refs.advancedConfig.validConfig()) { + if (!this.$refs.runtimeConfig.validConfig()) { return false; } diff --git a/frontend/src/business/components/functional/plan/FunctionalTestPlan.vue b/frontend/src/business/components/functional/plan/FunctionalTestPlan.vue index b4e6778bf..e46127158 100644 --- a/frontend/src/business/components/functional/plan/FunctionalTestPlan.vue +++ b/frontend/src/business/components/functional/plan/FunctionalTestPlan.vue @@ -81,8 +81,8 @@ data() { return { result: {}, - queryPath: "/testplan/list", - deletePath: "/testplan/delete", + queryPath: "/functional/plan/list", + deletePath: "/functional/plan/delete", condition: "", projectId: null, tableData: [], @@ -139,7 +139,7 @@ }, handleEdit(testPlan) { this.$router.push({ - path: '/performance/plan/edit/' + testPlan.id, + path: '/functional/plan/edit/' + testPlan.id, }) }, handleDelete(testPlan) { diff --git a/frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue b/frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue index be27ef6a6..10be5aeaa 100644 --- a/frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue +++ b/frontend/src/business/components/functional/plan/components/FunctionalTestRuntimeConfig.vue @@ -1,16 +1,121 @@ diff --git a/frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue b/frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue index 529974478..0eac63a34 100644 --- a/frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue +++ b/frontend/src/business/components/functional/plan/components/FunctionalTestSceneConfig.vue @@ -1,16 +1,194 @@ diff --git a/frontend/src/business/components/functional/report/FunctionalRecentReport.vue b/frontend/src/business/components/functional/report/FunctionalRecentReport.vue index 9bbc686d5..6606265b3 100644 --- a/frontend/src/business/components/functional/report/FunctionalRecentReport.vue +++ b/frontend/src/business/components/functional/report/FunctionalRecentReport.vue @@ -15,13 +15,13 @@ import {ROLE_TEST_MANAGER, ROLE_TEST_USER, ROLE_TEST_VIEWER} from "../../../../common/constants"; export default { - name: "PerformanceRecentReport", + name: "FunctionalRecentReport", mounted() { const rolesString = localStorage.getItem("roles"); const roles = rolesString.split(','); if (roles.indexOf(ROLE_TEST_MANAGER) > -1 || roles.indexOf(ROLE_TEST_USER) > -1 || roles.indexOf(ROLE_TEST_VIEWER) > -1) { - this.$get('/report/recent/5', (response) => { + this.$get('/functional/report/recent/5', (response) => { this.recentReports = response.data; }); } diff --git a/frontend/src/business/components/functional/report/FunctionalReportView.vue b/frontend/src/business/components/functional/report/FunctionalReportView.vue new file mode 100644 index 000000000..ae562357c --- /dev/null +++ b/frontend/src/business/components/functional/report/FunctionalReportView.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/frontend/src/business/components/functional/report/FunctionalTestReport.vue b/frontend/src/business/components/functional/report/FunctionalTestReport.vue index d3b960d59..725e0c566 100644 --- a/frontend/src/business/components/functional/report/FunctionalTestReport.vue +++ b/frontend/src/business/components/functional/report/FunctionalTestReport.vue @@ -88,8 +88,8 @@ data() { return { result: {}, - queryPath: "/report/list/all", - deletePath: "/report/delete/", + queryPath: "/functional/report/list/all", + deletePath: "/functional/report/delete/", condition: "", projectId: null, tableData: [], diff --git a/frontend/src/business/components/functional/report/components/LogDetails.vue b/frontend/src/business/components/functional/report/components/LogDetails.vue new file mode 100644 index 000000000..10c7200af --- /dev/null +++ b/frontend/src/business/components/functional/report/components/LogDetails.vue @@ -0,0 +1,15 @@ + + + + + diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index dd9cf451e..d59ea8b4f 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -158,6 +158,9 @@ export default { 'separated_by_commas': 'Separated by commas', 'create': 'Create Test', }, + fuc_test: { + 'select_resource_pool': 'Please select resource pool', + }, i18n: { 'home': 'Home', } diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 7c0963391..b36711c93 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -158,6 +158,9 @@ export default { 'separated_by_commas': '按逗号分隔', 'create': '创建测试', }, + fuc_test: { + 'select_resource_pool': '请选择资源池', + }, i18n: { 'home': '首页', } -- GitLab