From 362620b887cade8c3a3ce59ae68ccbcd045144d5 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 27 Apr 2020 17:36:00 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/business/components/common/router/View.vue | 2 +- frontend/src/business/components/track/TestTrack.vue | 12 ++++++++++++ .../src/business/components/track/case/TestCase.vue | 11 ----------- .../components/track/plan/view/TestPlanView.vue | 12 +----------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/frontend/src/business/components/common/router/View.vue b/frontend/src/business/components/common/router/View.vue index 1bc5c81520..c96d35a780 100644 --- a/frontend/src/business/components/common/router/View.vue +++ b/frontend/src/business/components/common/router/View.vue @@ -14,7 +14,7 @@ diff --git a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue new file mode 100644 index 0000000000..2724a10bd9 --- /dev/null +++ b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue @@ -0,0 +1,245 @@ + + + + + From 19c21dab232e0e80190662aa7ad445ad852a15bc Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Tue, 28 Apr 2020 21:14:09 +0800 Subject: [PATCH 05/31] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8Asql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/package.json | 2 ++ .../components/TestCaseReportTemplateEdit.vue | 29 +++++++++++++------ frontend/src/business/main.js | 4 ++- 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index a21e6a8489..5fdab05896 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,6 +8,8 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "@ckeditor/ckeditor5-build-classic": "^18.0.0", + "@ckeditor/ckeditor5-vue": "^1.0.1", "@fortawesome/fontawesome-svg-core": "^1.2.26", "@fortawesome/free-regular-svg-icons": "^5.12.0", "@fortawesome/free-solid-svg-icons": "^5.12.0", diff --git a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue index 2724a10bd9..c7d32cefff 100644 --- a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue +++ b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue @@ -67,9 +67,15 @@ :list="previews" group="people" @change="log"> - - {{ item.name }} - + + + + + + + @@ -92,6 +98,7 @@ From df34a7afc748c79670af9ccf7ca194530b45e46b Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 11:11:11 +0800 Subject: [PATCH 09/31] env --- .../metersphere/config/KafkaProperties.java | 21 +++++++++++++++++++ .../io/metersphere/engine/EngineContext.java | 9 ++++++++ .../io/metersphere/engine/EngineFactory.java | 13 ++++++++++++ .../engine/docker/DockerTestEngine.java | 1 + .../engine/docker/request/TestRequest.java | 9 ++++++++ 5 files changed, 53 insertions(+) diff --git a/backend/src/main/java/io/metersphere/config/KafkaProperties.java b/backend/src/main/java/io/metersphere/config/KafkaProperties.java index 6795450310..c0036f475c 100644 --- a/backend/src/main/java/io/metersphere/config/KafkaProperties.java +++ b/backend/src/main/java/io/metersphere/config/KafkaProperties.java @@ -20,6 +20,7 @@ public class KafkaProperties { private String clientId; private String connectionsMaxIdleMs; private KafkaProperties.Ssl ssl = new KafkaProperties.Ssl(); + private KafkaProperties.Log log = new KafkaProperties.Log(); public String getAcks() { return acks; @@ -239,4 +240,24 @@ public class KafkaProperties { public void setSsl(Ssl ssl) { this.ssl = ssl; } + + public static class Log { + private String topic; + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + } + + public Log getLog() { + return log; + } + + public void setLog(Log log) { + this.log = log; + } } diff --git a/backend/src/main/java/io/metersphere/engine/EngineContext.java b/backend/src/main/java/io/metersphere/engine/EngineContext.java index c5a1d2a8bd..f3eac08cd9 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineContext.java +++ b/backend/src/main/java/io/metersphere/engine/EngineContext.java @@ -15,6 +15,7 @@ public class EngineContext { private String reportId; private Map properties = new HashMap<>(); private Map testData = new HashMap<>(); + private Map env = new HashMap<>(); public String getTestId() { return testId; @@ -48,6 +49,14 @@ public class EngineContext { this.properties.putAll(props); } + public Map getEnv() { + return env; + } + + public void setEnv(Map env) { + this.env = env; + } + public Object getProperty(String key) { return this.properties.get(key); } diff --git a/backend/src/main/java/io/metersphere/engine/EngineFactory.java b/backend/src/main/java/io/metersphere/engine/EngineFactory.java index 72db7dbed8..b7a7f589ae 100644 --- a/backend/src/main/java/io/metersphere/engine/EngineFactory.java +++ b/backend/src/main/java/io/metersphere/engine/EngineFactory.java @@ -9,6 +9,7 @@ import io.metersphere.base.domain.TestResourcePool; import io.metersphere.commons.constants.FileType; import io.metersphere.commons.constants.ResourcePoolTypeEnum; import io.metersphere.commons.exception.MSException; +import io.metersphere.config.KafkaProperties; import io.metersphere.engine.docker.DockerTestEngine; import io.metersphere.engine.kubernetes.KubernetesTestEngine; import io.metersphere.i18n.Translator; @@ -31,6 +32,7 @@ import java.util.stream.Collectors; public class EngineFactory { private static FileService fileService; private static TestResourcePoolService testResourcePoolService; + private static KafkaProperties kafkaProperties; public static Engine createEngine(LoadTestWithBLOBs loadTest) { String resourcePoolId = loadTest.getTestResourcePoolId(); @@ -78,6 +80,12 @@ public class EngineFactory { engineContext.setResourcePoolId(loadTest.getTestResourcePoolId()); engineContext.setStartTime(startTime); engineContext.setReportId(reportId); + HashMap env = new HashMap() {{ + put("BOOTSTRAP_SERVERS", kafkaProperties.getBootstrapServers()); + put("LOG_TOPIC", kafkaProperties.getLog().getTopic()); + put("REPORT_ID", reportId); + }}; + engineContext.setEnv(env); if (StringUtils.isNotEmpty(loadTest.getLoadConfiguration())) { final JSONArray jsonArray = JSONObject.parseArray(loadTest.getLoadConfiguration()); @@ -130,4 +138,9 @@ public class EngineFactory { public void setTestResourcePoolService(TestResourcePoolService testResourcePoolService) { EngineFactory.testResourcePoolService = testResourcePoolService; } + + @Resource + public void setKafkaProperties(KafkaProperties kafkaProperties) { + EngineFactory.kafkaProperties = kafkaProperties; + } } diff --git a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java b/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java index aca39565fe..c21f0c4646 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java +++ b/backend/src/main/java/io/metersphere/engine/docker/DockerTestEngine.java @@ -82,6 +82,7 @@ public class DockerTestEngine extends AbstractEngine { testRequest.setFileString(content); testRequest.setImage(JMETER_IMAGE); testRequest.setTestData(context.getTestData()); + testRequest.setEnv(context.getEnv()); restTemplate.postForObject(uri, testRequest, String.class); } diff --git a/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java b/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java index 3133e1d6db..0cdd97f42a 100644 --- a/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java +++ b/backend/src/main/java/io/metersphere/engine/docker/request/TestRequest.java @@ -9,6 +9,7 @@ public class TestRequest extends BaseRequest { private String fileString; private String image; private Map testData = new HashMap<>(); + private Map env = new HashMap<>(); public int getSize() { return size; @@ -41,4 +42,12 @@ public class TestRequest extends BaseRequest { public void setTestData(Map testData) { this.testData = testData; } + + public Map getEnv() { + return env; + } + + public void setEnv(Map env) { + this.env = env; + } } From aa34d1726b19e8aab739481583669e9e370c5578 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 11:38:05 +0800 Subject: [PATCH 10/31] log save --- .../base/domain/LoadTestReportLog.java | 27 ++ .../base/domain/LoadTestReportLogExample.java | 270 ++++++++++++++++++ .../base/mapper/LoadTestReportLogMapper.java | 35 +++ .../base/mapper/LoadTestReportLogMapper.xml | 194 +++++++++++++ .../service/PerformanceTestService.java | 9 +- .../db/migration/V2__metersphere_ddl.sql | 8 + 6 files changed, 540 insertions(+), 3 deletions(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/LoadTestReportLogExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.xml diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java new file mode 100644 index 0000000000..d0630f1710 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java @@ -0,0 +1,27 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class LoadTestReportLog implements Serializable { + private String reportId; + + private String content; + + private static final long serialVersionUID = 1L; + + public String getReportId() { + return reportId; + } + + public void setReportId(String reportId) { + this.reportId = reportId == null ? null : reportId.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/LoadTestReportLogExample.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLogExample.java new file mode 100644 index 0000000000..214e151a65 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLogExample.java @@ -0,0 +1,270 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class LoadTestReportLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public LoadTestReportLogExample() { + 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 andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(String value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(String value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(String value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(String value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(String value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(String value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLike(String value) { + addCriterion("report_id like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotLike(String value) { + addCriterion("report_id not like", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(String value1, String value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(String value1, String value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.java b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.java new file mode 100644 index 0000000000..561053703c --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.java @@ -0,0 +1,35 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.LoadTestReportLog; +import io.metersphere.base.domain.LoadTestReportLogExample; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface LoadTestReportLogMapper { + long countByExample(LoadTestReportLogExample example); + + int deleteByExample(LoadTestReportLogExample example); + + int deleteByPrimaryKey(String reportId); + + int insert(LoadTestReportLog record); + + int insertSelective(LoadTestReportLog record); + + List selectByExampleWithBLOBs(LoadTestReportLogExample example); + + List selectByExample(LoadTestReportLogExample example); + + LoadTestReportLog selectByPrimaryKey(String reportId); + + int updateByExampleSelective(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByExampleWithBLOBs(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByExample(@Param("record") LoadTestReportLog record, @Param("example") LoadTestReportLogExample example); + + int updateByPrimaryKeySelective(LoadTestReportLog record); + + int updateByPrimaryKeyWithBLOBs(LoadTestReportLog record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.xml new file mode 100644 index 0000000000..9d5c8caa2c --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/LoadTestReportLogMapper.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + 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} + + + + + + + + + + + report_id + + + content + + + + + + delete from load_test_report_log + where report_id = #{reportId,jdbcType=VARCHAR} + + + delete from load_test_report_log + + + + + + insert into load_test_report_log (report_id, content) + values (#{reportId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR}) + + + insert into load_test_report_log + + + report_id, + + + content, + + + + + #{reportId,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update load_test_report_log + + + report_id = #{record.reportId,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update load_test_report_log + set report_id = #{record.reportId,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update load_test_report_log + set report_id = #{record.reportId,jdbcType=VARCHAR} + + + + + + update load_test_report_log + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where report_id = #{reportId,jdbcType=VARCHAR} + + + update load_test_report_log + set content = #{content,jdbcType=LONGVARCHAR} + where report_id = #{reportId,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java index f18772485d..dc6f62a650 100644 --- a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java @@ -5,7 +5,6 @@ import io.metersphere.base.mapper.*; import io.metersphere.base.mapper.ext.ExtLoadTestMapper; import io.metersphere.base.mapper.ext.ExtLoadTestReportDetailMapper; import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper; -import io.metersphere.commons.constants.FileType; import io.metersphere.commons.constants.PerformanceTestStatus; import io.metersphere.commons.exception.MSException; import io.metersphere.commons.utils.LogUtil; @@ -22,8 +21,6 @@ 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.Map; import java.util.Optional; @@ -51,6 +48,8 @@ public class PerformanceTestService { private LoadTestReportDetailMapper loadTestReportDetailMapper; @Resource private ExtLoadTestReportDetailMapper extLoadTestReportDetailMapper; + @Resource + private LoadTestReportLogMapper loadTestReportLogMapper; public List list(QueryTestPlanRequest request) { return extLoadTestMapper.list(request); @@ -201,6 +200,10 @@ public class PerformanceTestService { extLoadTestReportMapper.appendLine(testReport.getId(), "\n"); // append \n extLoadTestReportDetailMapper.appendLine(testReport.getId(), "\n"); + // 保存 load_test_report_log + LoadTestReportLog record = new LoadTestReportLog(); + record.setReportId(testReport.getId()); + loadTestReportLogMapper.insert(record); } catch (MSException e) { LogUtil.error(e); loadTest.setStatus(PerformanceTestStatus.Error.name()); diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index d400cae649..b7a3f1a2c3 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -82,6 +82,14 @@ CREATE TABLE IF NOT EXISTS `load_test_report_result` ( DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; +CREATE TABLE IF NOT EXISTS `load_test_report_log` ( + `report_id` varchar(50) NOT NULL, + `content` longtext, + PRIMARY KEY (`report_id`) +) + ENGINE=InnoDB + DEFAULT CHARSET=utf8mb4 + COLLATE=utf8mb4_bin; CREATE TABLE IF NOT EXISTS `organization` ( `id` varchar(50) NOT NULL COMMENT 'Organization ID', From 28a2d25ce0967d73fa26a9dce99e40d06b92aace Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 29 Apr 2020 13:53:26 +0800 Subject: [PATCH 11/31] i18n --- .../main/java/io/metersphere/service/UserService.java | 11 ++++++----- .../java/io/metersphere/service/WorkspaceService.java | 2 +- .../src/main/resources/i18n/messages_en_US.properties | 7 ++++++- .../src/main/resources/i18n/messages_zh_CN.properties | 7 ++++++- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index dc7246aa0a..0e95828e6c 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -15,6 +15,7 @@ import io.metersphere.dto.OrganizationMemberDTO; import io.metersphere.dto.UserDTO; import io.metersphere.dto.UserRoleDTO; import io.metersphere.dto.UserRoleHelpDTO; +import io.metersphere.i18n.Translator; import io.metersphere.user.SessionUser; import io.metersphere.user.SessionUtils; import org.apache.commons.lang3.StringUtils; @@ -54,11 +55,11 @@ public class UserService { private void checkUserParam(User user) { if (StringUtils.isBlank(user.getName())) { - MSException.throwException("user_name_empty"); + MSException.throwException(Translator.get("user_name_is_null")); } if (StringUtils.isBlank(user.getEmail())) { - MSException.throwException("user_email_empty"); + MSException.throwException(Translator.get("user_email_is_null")); } // password } @@ -76,7 +77,7 @@ public class UserService { criteria.andEmailEqualTo(user.getEmail()); List userList = userMapper.selectByExample(userExample); if (!CollectionUtils.isEmpty(userList)) { - MSException.throwException("user_email_is_exist"); + MSException.throwException(Translator.get("user_email_already_exists")); } userMapper.insertSelective(user); } @@ -325,10 +326,10 @@ public class UserService { public boolean checkUserPassword(String userId, String password) { if (StringUtils.isBlank(userId)) { - MSException.throwException("Username cannot be null"); + MSException.throwException(Translator.get("user_name_is_null")); } if (StringUtils.isBlank(password)) { - MSException.throwException("Password cannot be null"); + MSException.throwException(Translator.get("password_is_null")); } UserExample example = new UserExample(); example.createCriteria().andIdEqualTo(userId).andPasswordEqualTo(CodingUtil.md5(password)); diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 7956a9f90c..99e3f228f9 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -150,7 +150,7 @@ public class WorkspaceService { WorkspaceExample example = new WorkspaceExample(); example.createCriteria().andIdEqualTo(workspaceId); if (workspaceMapper.countByExample(example) == 0) { - MSException.throwException("workspace_not_exist"); + MSException.throwException(Translator.get("workspace_not_exists")); } } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 97c25ebe9c..5dcf8e7cb9 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -23,4 +23,9 @@ max_thread_insufficient=The number of concurrent users exceeds cannot_edit_load_test_running=Cannot modify the running test test_not_found=Test cannot be found: test_not_running=Test is not running -before_delete_plan=There is an associated test case under this plan, please unlink it first! \ No newline at end of file +before_delete_plan=There is an associated test case under this plan, please unlink it first! +user_email_already_exists=User email already exists +user_name_is_null=User name cannot be null +user_email_is_null=User email cannot be null +password_is_null=Password cannot be null +workspace_not_exists=Workspace is not exists \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 150bd0d446..4203e0043e 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -23,4 +23,9 @@ max_thread_insufficient=并发用户数超额 cannot_edit_load_test_running=不能修改正在运行的测试 test_not_found=测试不存在: test_not_running=测试未运行 -before_delete_plan=该计划下存在关联测试用例,请先取消关联! \ No newline at end of file +before_delete_plan=该计划下存在关联测试用例,请先取消关联! +user_email_already_exists=用户邮箱已存在 +user_name_is_null=用户名不能为空 +user_email_is_null=用户邮箱不能为空 +password_is_null=密码不能为空 +workspace_not_exists=工作空间不存在 \ No newline at end of file From 29f0891767bf6a2aa447b1364682ef63f34c0e9f Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 14:12:51 +0800 Subject: [PATCH 12/31] log save --- .../main/java/io/metersphere/service/PerformanceTestService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java index dc6f62a650..ac7a2adf63 100644 --- a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java @@ -203,6 +203,7 @@ public class PerformanceTestService { // 保存 load_test_report_log LoadTestReportLog record = new LoadTestReportLog(); record.setReportId(testReport.getId()); + record.setContent(StringUtils.EMPTY); loadTestReportLogMapper.insert(record); } catch (MSException e) { LogUtil.error(e); From 63f3b96486fc5f2921ac6e057a82463b06440f7d Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Wed, 29 Apr 2020 14:14:01 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/service/UserService.java | 106 ------------------ .../metersphere/service/WorkspaceService.java | 18 +-- 2 files changed, 2 insertions(+), 122 deletions(-) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index 0e95828e6c..b14ef7aa24 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -23,7 +23,6 @@ import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; - import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; @@ -129,107 +128,6 @@ public class UserService { userMapper.updateByPrimaryKeySelective(user); } - /*public List getUserRolesList(String userId) { - UserRoleExample userRoleExample = new UserRoleExample(); - userRoleExample.createCriteria().andUserIdEqualTo(userId); - List userRolesList = userRoleMapper.selectByExample(userRoleExample); - List roleIds = userRolesList.stream().map(UserRole::getRoleId).collect(Collectors.toList()); - RoleExample roleExample = new RoleExample(); - roleExample.createCriteria().andIdIn(roleIds); - return roleMapper.selectByExample(roleExample); - } - - public List getUserRoleList(String userId) { - if (StringUtils.isEmpty(userId)) { - return new ArrayList<>(); - } - return convertUserRoleDTO(extUserRoleMapper.getUserRoleHelpList(userId)); - }*/ - - private List convertUserRoleDTO(List helpDTOList) { - StringBuilder buffer = new StringBuilder(); - - Map roleMap = new HashMap<>(); - - List resultList = new ArrayList<>(); - - List otherList = new ArrayList<>(); - - Set orgSet = new HashSet<>(); - - Set workspaceSet = new HashSet<>(); - - for (UserRoleHelpDTO helpDTO : helpDTOList) { - UserRoleDTO userRoleDTO = roleMap.get(helpDTO.getSourceId()); - - if (userRoleDTO == null) { - userRoleDTO = new UserRoleDTO(); - - if (!StringUtils.isEmpty(helpDTO.getParentId())) { - workspaceSet.add(helpDTO.getParentId()); - userRoleDTO.setType("workspace"); - } else { - orgSet.add(helpDTO.getSourceId()); - userRoleDTO.setType("organization"); - } - - userRoleDTO.setId(helpDTO.getSourceId()); - userRoleDTO.setRoleId(helpDTO.getRoleId()); - userRoleDTO.setName(helpDTO.getSourceName()); - userRoleDTO.setParentId(helpDTO.getParentId()); - userRoleDTO.setDesc(helpDTO.getRoleName()); - - } else { - userRoleDTO.setDesc(userRoleDTO.getDesc() + "," + helpDTO.getRoleName()); - } - roleMap.put(helpDTO.getSourceId(), userRoleDTO); - } - - if (!StringUtils.isEmpty(buffer.toString())) { - UserRoleDTO dto = new UserRoleDTO(); - dto.setId("admin"); - dto.setType("admin"); - dto.setDesc(buffer.toString()); - resultList.add(dto); - } - - for (String org : orgSet) { - workspaceSet.remove(org); - } - - List orgWorkSpace = new ArrayList<>(roleMap.values()); - - if (!CollectionUtils.isEmpty(workspaceSet)) { - for (String orgId : workspaceSet) { - Organization organization = organizationMapper.selectByPrimaryKey(orgId); - if (organization != null) { - UserRoleDTO dto = new UserRoleDTO(); - dto.setId(orgId); - dto.setName(organization.getName()); - dto.setSwitchable(false); - dto.setType("organization"); - orgWorkSpace.add(dto); - } - } - } - - orgWorkSpace.sort((o1, o2) -> { - if (o1.getParentId() == null) { - return -1; - } - - if (o2.getParentId() == null) { - return 1; - } - - return o1.getParentId().compareTo(o2.getParentId()); - }); - resultList.addAll(orgWorkSpace); - resultList.addAll(otherList); - - return resultList; - } - public void switchUserRole(UserDTO user, String sign, String sourceId) { User newUser = new User(); if (StringUtils.equals("organization", sign)) { @@ -336,10 +234,6 @@ public class UserService { return userMapper.countByExample(example) > 0; } - public List getOrganizationMemberDTO(QueryOrgMemberRequest request) { - return extUserRoleMapper.getOrganizationMemberDTO(request); - } - /** * 查询该组织外的其他用户列表 */ diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 99e3f228f9..79b1c1c894 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -20,7 +20,6 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -59,9 +58,9 @@ public class WorkspaceService { if (workspaceMapper.countByExample(example) > 0) { MSException.throwException(Translator.get("workspace_name_already_exists")); } - workspace.setId(UUID.randomUUID().toString()); // 设置ID + workspace.setId(UUID.randomUUID().toString()); workspace.setCreateTime(currentTime); - workspace.setUpdateTime(currentTime); // 首次 update time + workspace.setUpdateTime(currentTime); workspaceMapper.insertSelective(workspace); } else { workspace.setUpdateTime(currentTime); @@ -112,19 +111,6 @@ public class WorkspaceService { } } - public void checkWorkspaceOwnerByTestManager(String workspaceId) { - checkWorkspaceIsExist(workspaceId); - SessionUser user = SessionUtils.getUser(); - List wsIds = user.getUserRoles().stream() - .filter(ur -> RoleConstants.TEST_MANAGER.equals(ur.getRoleId())) - .map(UserRole::getSourceId) - .collect(Collectors.toList()); - boolean contains = wsIds.contains(workspaceId); - if (!contains) { - MSException.throwException(Translator.get("workspace_does_not_belong_to_user")); - } - } - public void checkWorkspaceOwner(String workspaceId) { checkWorkspaceIsExist(workspaceId); WorkspaceExample example = new WorkspaceExample(); From 09e4ce9ea2f53fc6c5769db0430a50505caecb7f Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 29 Apr 2020 15:49:38 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/components/MsPieChart.vue | 110 ++++++++++++++++++ .../components/BaseInfoComponent.vue | 81 +++++++++++++ .../workspace/components/CommonComponent.vue | 43 +++++++ .../components/TestCaseReportTemplateEdit.vue | 22 +++- .../components/TestResultChartComponent.vue | 67 +++++++++++ .../components/TestResultComponent.vue | 76 ++++++++++++ 6 files changed, 395 insertions(+), 4 deletions(-) create mode 100644 frontend/src/business/components/common/components/MsPieChart.vue create mode 100644 frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue create mode 100644 frontend/src/business/components/settings/workspace/components/CommonComponent.vue create mode 100644 frontend/src/business/components/settings/workspace/components/TestResultChartComponent.vue create mode 100644 frontend/src/business/components/settings/workspace/components/TestResultComponent.vue diff --git a/frontend/src/business/components/common/components/MsPieChart.vue b/frontend/src/business/components/common/components/MsPieChart.vue new file mode 100644 index 0000000000..9ba804afe2 --- /dev/null +++ b/frontend/src/business/components/common/components/MsPieChart.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue b/frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue new file mode 100644 index 0000000000..819330b168 --- /dev/null +++ b/frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/frontend/src/business/components/settings/workspace/components/CommonComponent.vue b/frontend/src/business/components/settings/workspace/components/CommonComponent.vue new file mode 100644 index 0000000000..6bd02f0789 --- /dev/null +++ b/frontend/src/business/components/settings/workspace/components/CommonComponent.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue index c7d32cefff..99a47d2784 100644 --- a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue +++ b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue @@ -67,6 +67,11 @@ :list="previews" group="people" @change="log"> + + + + + @@ -88,8 +81,6 @@ minutes: '0', seconds: '0', title: 'Logging', - testLogging: null, - showTestLogging: false, } }, methods: { @@ -119,11 +110,6 @@ }) } }, - getLog(testId) { - this.result = this.$get('/performance/log/' + testId, response => { - this.testLogging = response.data; - }) - } }, mounted() { this.reportId = this.$route.path.split('/')[4]; @@ -139,8 +125,6 @@ this.$info("报告生成中...."); break; case 'Running': - this.showTestLogging = true; - this.getLog(data.testId); break; default: break; @@ -190,9 +174,4 @@ color: #5C7878; } - .logging-content { - white-space: pre-line; - height: calc(100vh - 450px); - overflow: auto; - } diff --git a/frontend/src/business/components/performance/report/components/LogDetails.vue b/frontend/src/business/components/performance/report/components/LogDetails.vue index 10c7200afd..6ac7f3fcaf 100644 --- a/frontend/src/business/components/performance/report/components/LogDetails.vue +++ b/frontend/src/business/components/performance/report/components/LogDetails.vue @@ -1,15 +1,39 @@ From 7e7faa436a78af423d342c89e394fab4ec173c63 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 15:54:45 +0800 Subject: [PATCH 16/31] log save +1 --- .../src/main/resources/db/migration/V2__metersphere_ddl.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index b7a3f1a2c3..1738254d14 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -83,9 +83,12 @@ CREATE TABLE IF NOT EXISTS `load_test_report_result` ( COLLATE=utf8mb4_bin; CREATE TABLE IF NOT EXISTS `load_test_report_log` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, `report_id` varchar(50) NOT NULL, + `resource_id` varchar(50) DEFAULT NULL, `content` longtext, - PRIMARY KEY (`report_id`) + PRIMARY KEY (`id`), + KEY `load_test_report_log_report_id_resource_name_index` (`report_id`,`resource_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 From 2124226f0f1828952a159663b58a97682f160577 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 29 Apr 2020 16:08:31 +0800 Subject: [PATCH 17/31] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=A8=A1=E7=89=88?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workspace/TestCaseReportTemplate.vue | 62 ++-------------- .../BaseInfoComponent.vue | 0 .../CommonComponent.vue | 0 .../TestResultChartComponent.vue | 2 +- .../TestResultComponent.vue | 0 .../components/TestCaseReportTemplateEdit.vue | 6 +- .../components/TestcaseTemplateItem.vue | 73 +++++++++++++++++++ 7 files changed, 83 insertions(+), 60 deletions(-) rename frontend/src/business/components/settings/workspace/components/{ => TemplateComponent}/BaseInfoComponent.vue (100%) rename frontend/src/business/components/settings/workspace/components/{ => TemplateComponent}/CommonComponent.vue (100%) rename frontend/src/business/components/settings/workspace/components/{ => TemplateComponent}/TestResultChartComponent.vue (94%) rename frontend/src/business/components/settings/workspace/components/{ => TemplateComponent}/TestResultComponent.vue (100%) create mode 100644 frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue diff --git a/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue index af856ff6ea..8d7cef4288 100644 --- a/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue +++ b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue @@ -11,12 +11,7 @@ -
-
- -
- {{ fit }} -
+
@@ -31,9 +26,10 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import TestCaseReportTemplateEdit from "./components/TestCaseReportTemplateEdit"; + import TestcaseTemplateItem from "./components/TestcaseTemplateItem"; export default { name: "TestCaseReportTemplate", - components: {TestCaseReportTemplateEdit, MsTableHeader}, + components: {TestcaseTemplateItem, TestCaseReportTemplateEdit, MsTableHeader}, data() { return { result: {}, @@ -44,12 +40,13 @@ 'scalev-downddddddddddd', 'filelv', 'sontwain', 'cosgewver', 'nodegne', 'scale-dfownddddddddddd', ], - url: '../../../../assets/template.png', condition: {}, } }, methods: { - initTableData() { + initData() { + + // this.$get() }, templateCreate() { @@ -64,53 +61,6 @@ diff --git a/frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/BaseInfoComponent.vue similarity index 100% rename from frontend/src/business/components/settings/workspace/components/BaseInfoComponent.vue rename to frontend/src/business/components/settings/workspace/components/TemplateComponent/BaseInfoComponent.vue diff --git a/frontend/src/business/components/settings/workspace/components/CommonComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/CommonComponent.vue similarity index 100% rename from frontend/src/business/components/settings/workspace/components/CommonComponent.vue rename to frontend/src/business/components/settings/workspace/components/TemplateComponent/CommonComponent.vue diff --git a/frontend/src/business/components/settings/workspace/components/TestResultChartComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue similarity index 94% rename from frontend/src/business/components/settings/workspace/components/TestResultChartComponent.vue rename to frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue index 07b8667a9f..0e6cfbfc8b 100644 --- a/frontend/src/business/components/settings/workspace/components/TestResultChartComponent.vue +++ b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue @@ -14,7 +14,7 @@ + + From b87fa51440b404917ff48f6e96bb359f4e88662c Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 29 Apr 2020 16:38:59 +0800 Subject: [PATCH 18/31] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=90=8E=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/domain/TestCaseReport.java | 47 ++ .../base/domain/TestCaseReportExample.java | 400 ++++++++++++++++++ .../base/domain/TestCaseReportTemplate.java | 47 ++ .../domain/TestCaseReportTemplateExample.java | 400 ++++++++++++++++++ .../base/mapper/TestCaseReportMapper.java | 36 ++ .../base/mapper/TestCaseReportMapper.xml | 234 ++++++++++ .../mapper/TestCaseReportTemplateMapper.java | 36 ++ .../mapper/TestCaseReportTemplateMapper.xml | 234 ++++++++++ .../controller/TestCaseReportController.java | 42 ++ .../TestCaseReportTemplateController.java | 42 ++ .../service/TestCaseReportService.java | 46 ++ .../TestCaseReportTemplateService.java | 48 +++ .../db/migration/V2__metersphere_ddl.sql | 2 +- 13 files changed, 1613 insertions(+), 1 deletion(-) create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java create mode 100644 backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.java create mode 100644 backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml create mode 100644 backend/src/main/java/io/metersphere/controller/TestCaseReportController.java create mode 100644 backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java create mode 100644 backend/src/main/java/io/metersphere/service/TestCaseReportService.java create mode 100644 backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java new file mode 100644 index 0000000000..b70e93cbf2 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java @@ -0,0 +1,47 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestCaseReport implements Serializable { + private Long id; + + private String name; + + private String planId; + + private String content; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPlanId() { + return planId; + } + + public void setPlanId(String planId) { + this.planId = planId == null ? null : planId.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/TestCaseReportExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java new file mode 100644 index 0000000000..f43ff0744f --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportExample.java @@ -0,0 +1,400 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReportExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReportExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + 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 andPlanIdIsNull() { + addCriterion("plan_id is null"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNotNull() { + addCriterion("plan_id is not null"); + return (Criteria) this; + } + + public Criteria andPlanIdEqualTo(String value) { + addCriterion("plan_id =", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotEqualTo(String value) { + addCriterion("plan_id <>", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThan(String value) { + addCriterion("plan_id >", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThanOrEqualTo(String value) { + addCriterion("plan_id >=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThan(String value) { + addCriterion("plan_id <", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThanOrEqualTo(String value) { + addCriterion("plan_id <=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLike(String value) { + addCriterion("plan_id like", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotLike(String value) { + addCriterion("plan_id not like", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdIn(List values) { + addCriterion("plan_id in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotIn(List values) { + addCriterion("plan_id not in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdBetween(String value1, String value2) { + addCriterion("plan_id between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotBetween(String value1, String value2) { + addCriterion("plan_id not between", value1, value2, "planId"); + return (Criteria) this; + } + } + + public 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/TestCaseReportTemplate.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java new file mode 100644 index 0000000000..05220801fd --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java @@ -0,0 +1,47 @@ +package io.metersphere.base.domain; + +import java.io.Serializable; + +public class TestCaseReportTemplate implements Serializable { + private Long id; + + private String name; + + private String workspaceId; + + private String content; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getWorkspaceId() { + return workspaceId; + } + + public void setWorkspaceId(String workspaceId) { + this.workspaceId = workspaceId == null ? null : workspaceId.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/TestCaseReportTemplateExample.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java new file mode 100644 index 0000000000..a0c5b96a60 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplateExample.java @@ -0,0 +1,400 @@ +package io.metersphere.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class TestCaseReportTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public TestCaseReportTemplateExample() { + 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(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", 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(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + 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 andWorkspaceIdIsNull() { + addCriterion("workspace_id is null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIsNotNull() { + addCriterion("workspace_id is not null"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdEqualTo(String value) { + addCriterion("workspace_id =", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotEqualTo(String value) { + addCriterion("workspace_id <>", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThan(String value) { + addCriterion("workspace_id >", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdGreaterThanOrEqualTo(String value) { + addCriterion("workspace_id >=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThan(String value) { + addCriterion("workspace_id <", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLessThanOrEqualTo(String value) { + addCriterion("workspace_id <=", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdLike(String value) { + addCriterion("workspace_id like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotLike(String value) { + addCriterion("workspace_id not like", value, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdIn(List values) { + addCriterion("workspace_id in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotIn(List values) { + addCriterion("workspace_id not in", values, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdBetween(String value1, String value2) { + addCriterion("workspace_id between", value1, value2, "workspaceId"); + return (Criteria) this; + } + + public Criteria andWorkspaceIdNotBetween(String value1, String value2) { + addCriterion("workspace_id not between", value1, value2, "workspaceId"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.java new file mode 100644 index 0000000000..76a5e5cb1a --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReport; +import io.metersphere.base.domain.TestCaseReportExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReportMapper { + long countByExample(TestCaseReportExample example); + + int deleteByExample(TestCaseReportExample example); + + int deleteByPrimaryKey(Long id); + + int insert(TestCaseReport record); + + int insertSelective(TestCaseReport record); + + List selectByExampleWithBLOBs(TestCaseReportExample example); + + List selectByExample(TestCaseReportExample example); + + TestCaseReport selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example); + + int updateByExampleWithBLOBs(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example); + + int updateByExample(@Param("record") TestCaseReport record, @Param("example") TestCaseReportExample example); + + int updateByPrimaryKeySelective(TestCaseReport record); + + int updateByPrimaryKeyWithBLOBs(TestCaseReport record); + + int updateByPrimaryKey(TestCaseReport record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml new file mode 100644 index 0000000000..83b9a98434 --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + 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, name, plan_id + + + content + + + + + + delete from test_case_report + where id = #{id,jdbcType=BIGINT} + + + delete from test_case_report + + + + + + + SELECT LAST_INSERT_ID() + + insert into test_case_report (name, plan_id, content + ) + values (#{name,jdbcType=VARCHAR}, #{planId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + ) + + + + SELECT LAST_INSERT_ID() + + insert into test_case_report + + + name, + + + plan_id, + + + content, + + + + + #{name,jdbcType=VARCHAR}, + + + #{planId,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update test_case_report + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + plan_id = #{record.planId,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update test_case_report + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + plan_id = #{record.planId,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update test_case_report + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + plan_id = #{record.planId,jdbcType=VARCHAR} + + + + + + update test_case_report + + + name = #{name,jdbcType=VARCHAR}, + + + plan_id = #{planId,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update test_case_report + set name = #{name,jdbcType=VARCHAR}, + plan_id = #{planId,jdbcType=VARCHAR}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update test_case_report + set name = #{name,jdbcType=VARCHAR}, + plan_id = #{planId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.java b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.java new file mode 100644 index 0000000000..5c589133ac --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.java @@ -0,0 +1,36 @@ +package io.metersphere.base.mapper; + +import io.metersphere.base.domain.TestCaseReportTemplate; +import io.metersphere.base.domain.TestCaseReportTemplateExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface TestCaseReportTemplateMapper { + long countByExample(TestCaseReportTemplateExample example); + + int deleteByExample(TestCaseReportTemplateExample example); + + int deleteByPrimaryKey(Long id); + + int insert(TestCaseReportTemplate record); + + int insertSelective(TestCaseReportTemplate record); + + List selectByExampleWithBLOBs(TestCaseReportTemplateExample example); + + List selectByExample(TestCaseReportTemplateExample example); + + TestCaseReportTemplate selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example); + + int updateByExampleWithBLOBs(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example); + + int updateByExample(@Param("record") TestCaseReportTemplate record, @Param("example") TestCaseReportTemplateExample example); + + int updateByPrimaryKeySelective(TestCaseReportTemplate record); + + int updateByPrimaryKeyWithBLOBs(TestCaseReportTemplate record); + + int updateByPrimaryKey(TestCaseReportTemplate record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml new file mode 100644 index 0000000000..69175ac67b --- /dev/null +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseReportTemplateMapper.xml @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + 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, name, workspace_id + + + content + + + + + + delete from test_case_report_template + where id = #{id,jdbcType=BIGINT} + + + delete from test_case_report_template + + + + + + + SELECT LAST_INSERT_ID() + + insert into test_case_report_template (name, workspace_id, content + ) + values (#{name,jdbcType=VARCHAR}, #{workspaceId,jdbcType=VARCHAR}, #{content,jdbcType=LONGVARCHAR} + ) + + + + SELECT LAST_INSERT_ID() + + insert into test_case_report_template + + + name, + + + workspace_id, + + + content, + + + + + #{name,jdbcType=VARCHAR}, + + + #{workspaceId,jdbcType=VARCHAR}, + + + #{content,jdbcType=LONGVARCHAR}, + + + + + + update test_case_report_template + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + + + content = #{record.content,jdbcType=LONGVARCHAR}, + + + + + + + + update test_case_report_template + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR}, + content = #{record.content,jdbcType=LONGVARCHAR} + + + + + + update test_case_report_template + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + workspace_id = #{record.workspaceId,jdbcType=VARCHAR} + + + + + + update test_case_report_template + + + name = #{name,jdbcType=VARCHAR}, + + + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=LONGVARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update test_case_report_template + set name = #{name,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR}, + content = #{content,jdbcType=LONGVARCHAR} + where id = #{id,jdbcType=BIGINT} + + + update test_case_report_template + set name = #{name,jdbcType=VARCHAR}, + workspace_id = #{workspaceId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java b/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java new file mode 100644 index 0000000000..5d527b750b --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/TestCaseReportController.java @@ -0,0 +1,42 @@ +package io.metersphere.controller; + +import io.metersphere.base.domain.TestCaseReport; +import io.metersphere.service.TestCaseReportService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +@RequestMapping("/case/report") +@RestController +public class TestCaseReportController { + + @Resource + TestCaseReportService testCaseReportService; + + @PostMapping("/list") + public List list(@RequestBody TestCaseReport request) { + return testCaseReportService.listTestCaseReport(request); + } + + @GetMapping("/get/{id}") + public TestCaseReport get(@PathVariable Long id){ + return testCaseReportService.getTestCaseReport(id); + } + + @PostMapping("/add") + public void add(@RequestBody TestCaseReport TestCaseReport){ + testCaseReportService.addTestCaseReport(TestCaseReport); + } + + @PostMapping("/edit") + public void edit(@RequestBody TestCaseReport TestCaseReport){ + testCaseReportService.editTestCaseReport(TestCaseReport); + } + + @PostMapping("/delete/{id}") + public int delete(@PathVariable Long id){ + return testCaseReportService.deleteTestCaseReport(id); + } + +} diff --git a/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java b/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java new file mode 100644 index 0000000000..b090d7f77f --- /dev/null +++ b/backend/src/main/java/io/metersphere/controller/TestCaseReportTemplateController.java @@ -0,0 +1,42 @@ +package io.metersphere.controller; + +import io.metersphere.base.domain.TestCaseReportTemplate; +import io.metersphere.service.TestCaseReportTemplateService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +@RequestMapping("/case/report/template") +@RestController +public class TestCaseReportTemplateController { + + @Resource + TestCaseReportTemplateService testCaseReportTemplateService; + + @PostMapping("/list") + public List list(@RequestBody TestCaseReportTemplate request) { + return testCaseReportTemplateService.listTestCaseReportTemplate(request); + } + + @GetMapping("/get/{id}") + public TestCaseReportTemplate get(@PathVariable Long id){ + return testCaseReportTemplateService.getTestCaseReportTemplate(id); + } + + @PostMapping("/add") + public void add(@RequestBody TestCaseReportTemplate testCaseReportTemplate){ + testCaseReportTemplateService.addTestCaseReportTemplate(testCaseReportTemplate); + } + + @PostMapping("/edit") + public void edit(@RequestBody TestCaseReportTemplate testCaseReportTemplate){ + testCaseReportTemplateService.editTestCaseReportTemplate(testCaseReportTemplate); + } + + @PostMapping("/delete/{id}") + public int delete(@PathVariable Long id){ + return testCaseReportTemplateService.deleteTestCaseReportTemplate(id); + } + +} diff --git a/backend/src/main/java/io/metersphere/service/TestCaseReportService.java b/backend/src/main/java/io/metersphere/service/TestCaseReportService.java new file mode 100644 index 0000000000..605234c43e --- /dev/null +++ b/backend/src/main/java/io/metersphere/service/TestCaseReportService.java @@ -0,0 +1,46 @@ +package io.metersphere.service; + +import io.metersphere.base.domain.TestCaseReport; +import io.metersphere.base.domain.TestCaseReportExample; +import io.metersphere.base.mapper.TestCaseReportMapper; +import org.apache.commons.lang3.StringUtils; +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 TestCaseReportService { + + @Resource + TestCaseReportMapper testCaseReportMapper; + + public List listTestCaseReport(TestCaseReport request) { + TestCaseReportExample example = new TestCaseReportExample(); + if ( StringUtils.isNotBlank(request.getName()) ) { + example.createCriteria().andNameEqualTo(request.getName()); + } + if ( StringUtils.isNotBlank(request.getPlanId()) ) { + example.createCriteria().andPlanIdEqualTo(request.getPlanId()); + } + return testCaseReportMapper.selectByExample(example); + } + + public TestCaseReport getTestCaseReport(Long id) { + return testCaseReportMapper.selectByPrimaryKey(id); + } + + public void addTestCaseReport(TestCaseReport TestCaseReport) { + testCaseReportMapper.insert(TestCaseReport); + } + + public void editTestCaseReport(TestCaseReport TestCaseReport) { + testCaseReportMapper.updateByPrimaryKeyWithBLOBs(TestCaseReport); + } + + public int deleteTestCaseReport(Long id) { + return testCaseReportMapper.deleteByPrimaryKey(id); + } +} diff --git a/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java b/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java new file mode 100644 index 0000000000..3e0fcd556d --- /dev/null +++ b/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java @@ -0,0 +1,48 @@ +package io.metersphere.service; + +import io.metersphere.base.domain.TestCaseReportTemplate; +import io.metersphere.base.domain.TestCaseReportTemplateExample; +import io.metersphere.base.mapper.TestCaseReportMapper; +import io.metersphere.base.mapper.TestCaseReportTemplateMapper; +import org.apache.commons.lang3.StringUtils; +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 TestCaseReportTemplateService { + + @Resource + TestCaseReportTemplateMapper testCaseReportTemplateMapper; + + public List listTestCaseReportTemplate(TestCaseReportTemplate request) { + TestCaseReportTemplateExample example = new TestCaseReportTemplateExample(); + if ( StringUtils.isNotBlank(request.getName()) ) { + example.createCriteria().andNameEqualTo(request.getName()); + } + if ( StringUtils.isNotBlank(request.getWorkspaceId()) ) { + example.createCriteria().andWorkspaceIdEqualTo(request.getWorkspaceId()); + } + return testCaseReportTemplateMapper.selectByExample(example); + } + + public TestCaseReportTemplate getTestCaseReportTemplate(Long id) { + return testCaseReportTemplateMapper.selectByPrimaryKey(id); + } + + public void addTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) { + testCaseReportTemplateMapper.insert(testCaseReportTemplate); + } + + public void editTestCaseReportTemplate(TestCaseReportTemplate testCaseReportTemplate) { + testCaseReportTemplateMapper.updateByPrimaryKeyWithBLOBs(testCaseReportTemplate); + } + + public int deleteTestCaseReportTemplate(Long id) { + return testCaseReportTemplateMapper.deleteByPrimaryKey(id); + } + +} diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index b7a3f1a2c3..45ae183514 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -341,7 +341,7 @@ CREATE TABLE IF NOT EXISTS `test_case_report_template` ( CREATE TABLE IF NOT EXISTS `test_case_report` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `name` varchar(64) NOT NULL COMMENT 'Test case report name', - `plan_id` bigint(50) DEFAULT NULL COMMENT 'Plan ID relation to', + `plan_id` varchar(50) NOT NULL COMMENT 'Plan ID relation to', `content` longtext COMMENT 'Report content (JSON format)', PRIMARY KEY (`id`) ) From 7f965302ad10e7045a2fd2fbf8fdd6eb7935d85d Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 17:50:25 +0800 Subject: [PATCH 19/31] env --- .../engine/kubernetes/KubernetesTestEngine.java | 1 + .../engine/kubernetes/crds/jmeter/JmeterSpec.java | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java b/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java index cd23508f92..d40840e9ba 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java +++ b/backend/src/main/java/io/metersphere/engine/kubernetes/KubernetesTestEngine.java @@ -90,6 +90,7 @@ public class KubernetesTestEngine extends AbstractEngine { jmeter.setSpec(new JmeterSpec() {{ setReplicas(1); setImage(JMETER_IMAGE); + setEnv(context.getEnv()); }}); LogUtil.info("Load test started. " + context.getTestId()); kubernetesProvider.applyCustomResource(jmeter); diff --git a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java b/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java index d2baaac44d..9ed26694e0 100644 --- a/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java +++ b/backend/src/main/java/io/metersphere/engine/kubernetes/crds/jmeter/JmeterSpec.java @@ -4,11 +4,15 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.model.KubernetesResource; +import java.util.HashMap; +import java.util.Map; + @JsonDeserialize @JsonInclude(JsonInclude.Include.NON_EMPTY) public class JmeterSpec implements KubernetesResource { private int replicas = 1; private String image; + private Map env = new HashMap<>(); public int getReplicas() { return replicas; @@ -25,4 +29,12 @@ public class JmeterSpec implements KubernetesResource { public void setImage(String image) { this.image = image; } + + public Map getEnv() { + return env; + } + + public void setEnv(Map env) { + this.env = env; + } } From 1bd57e5186c7e3c03d75663d9ef56fb2327ec033 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 29 Apr 2020 19:00:58 +0800 Subject: [PATCH 20/31] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=A5=E5=91=8A?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TestCaseReportTemplateService.java | 1 + .../components/common/router/router.js | 1 + .../business/components/settings/Setting.vue | 4 +- .../workspace/TestCaseReportTemplate.vue | 36 ++++++----- .../components/TemplateComponentBar.vue | 55 ++++++++++++++++ .../components/TestCaseReportTemplateEdit.vue | 63 +++---------------- .../components/TestcaseTemplateItem.vue | 26 +++++--- 7 files changed, 108 insertions(+), 78 deletions(-) create mode 100644 frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue diff --git a/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java b/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java index 3e0fcd556d..59ee2c6e32 100644 --- a/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java +++ b/backend/src/main/java/io/metersphere/service/TestCaseReportTemplateService.java @@ -26,6 +26,7 @@ public class TestCaseReportTemplateService { if ( StringUtils.isNotBlank(request.getWorkspaceId()) ) { example.createCriteria().andWorkspaceIdEqualTo(request.getWorkspaceId()); } + example.or(example.createCriteria().andWorkspaceIdIsNull()); return testCaseReportTemplateMapper.selectByExample(example); } diff --git a/frontend/src/business/components/common/router/router.js b/frontend/src/business/components/common/router/router.js index 8fe42dc524..c30b37dab8 100644 --- a/frontend/src/business/components/common/router/router.js +++ b/frontend/src/business/components/common/router/router.js @@ -82,6 +82,7 @@ const router = new VueRouter({ }, { path: 'testcase/report/template', + name: 'testCaseReportTemplate', component: TestCaseReportTemplate } ] diff --git a/frontend/src/business/components/settings/Setting.vue b/frontend/src/business/components/settings/Setting.vue index 22e37acc4a..e741a6dfb9 100644 --- a/frontend/src/business/components/settings/Setting.vue +++ b/frontend/src/business/components/settings/Setting.vue @@ -7,7 +7,9 @@
- + + +
diff --git a/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue index 8d7cef4288..2ba4b56aab 100644 --- a/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue +++ b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue @@ -3,7 +3,7 @@
- + @@ -27,33 +28,40 @@ import MsTableHeader from "../../common/components/MsTableHeader"; import TestCaseReportTemplateEdit from "./components/TestCaseReportTemplateEdit"; import TestcaseTemplateItem from "./components/TestcaseTemplateItem"; + import {WORKSPACE_ID} from '../../../../common/js/constants'; + export default { name: "TestCaseReportTemplate", components: {TestcaseTemplateItem, TestCaseReportTemplateEdit, MsTableHeader}, data() { return { result: {}, - fits: ['默认模版', 'congewtain', 'cogewver', 'nongwee', 'scale-downddddddddddd', - 'faill', 'cdontain', 'codver', 'nodne', 'scalde-downddddddddddd', - 'fill', 'cowntain', 'corwver', - 'nonewbe', - 'scalev-downddddddddddd', - 'filelv', 'sontwain', 'cosgewver', 'nodegne', 'scale-dfownddddddddddd', - ], condition: {}, + templates: [] + } + }, + mounted() { + this.initData(); + }, + watch: { + '$route'(to) { + if (to.path.indexOf("setting/testcase/report/template") >= 0) { + this.initData(); + } } }, methods: { initData() { - - // this.$get() - + this.condition.workspaceId = localStorage.getItem(WORKSPACE_ID); + this.result = this.$post('/case/report/template/list', this.condition, response => { + this.templates = response.data; + }); }, templateCreate() { }, - templateEdit() { - this.$refs.templateEdit.open(); + templateEdit(template) { + this.$refs.templateEdit.open(template); } } } diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue new file mode 100644 index 0000000000..697cf4711a --- /dev/null +++ b/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue @@ -0,0 +1,55 @@ + + + + + diff --git a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue index c3c4699085..22f4c65150 100644 --- a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue +++ b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue @@ -31,9 +31,6 @@
- - -
@@ -48,20 +45,12 @@ :group="{ name: 'people', pull: 'clone', put: false }" :clone="cloneDog" @change="log"> - - - {{ item.name }} - 系统 - 自定义 - + - - - - - -
-
- -
@@ -107,11 +90,13 @@ import BaseInfoComponent from "./TemplateComponent/BaseInfoComponent"; import TestResultComponent from "./TemplateComponent/TestResultComponent"; import TestResultChartComponent from "./TemplateComponent/TestResultChartComponent"; + import TemplateComponentBar from "./TemplateComponentBar"; let idGlobal = 8; export default { name: "TestCaseReportTemplateEdit", components: { + TemplateComponentBar, TestResultChartComponent, TestResultComponent, BaseInfoComponent, @@ -205,40 +190,18 @@ } .el-main { - height: 1000px; + height: calc(100vh - 70px); + width: calc(100vw - 320px); margin-left: 300px; margin-top: 0; margin-bottom: 0; - } - - .template-component i { - float: left; - height: 20px; - line-height: 20px; - } - - .template-component .el-tag { - float: right; - height: 20px; - line-height: 20px; - } - - .template-component span { - display: inline-block; - height: 20px; - line-height: 20px; - } - - .template-component { - display: block; - margin-left: 10px; - width: 90%; - margin-bottom: 5px; + position: absolute; } .el-card { margin: 5px auto; min-height: 300px; + width: 80%; } .description > span { @@ -255,16 +218,4 @@ background: #F5F5F5; } - .template-content { - - } - - .el-scrollbar { - height: 100%; - } - - .template-component { - font-size: 16px; - } - diff --git a/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue b/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue index e3490ce0c6..d14e4ba93b 100644 --- a/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue +++ b/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue @@ -1,9 +1,9 @@ @@ -11,9 +11,21 @@ export default { name: "TestcaseTemplateItem", props: { - name: { - type: String, - default: 'Template name' + template: { + type: Object, + default() { + return {} + } + } + }, + methods: { + templateEdit() { + this.$emit('templateEdit', this.template); + }, + templateDelete() { + this.post('/case/report/template/delete/' + this.template.id, () => { + this.$success('删除成功'); + }); } } } From 3ebccfecdb67ebeb6252b4e89e9d4ae058487dca Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 29 Apr 2020 19:06:24 +0800 Subject: [PATCH 21/31] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/apache/jmeter/jmeter.properties | 1348 ----------------- 1 file changed, 1348 deletions(-) delete mode 100644 backend/src/main/resources/org/apache/jmeter/jmeter.properties diff --git a/backend/src/main/resources/org/apache/jmeter/jmeter.properties b/backend/src/main/resources/org/apache/jmeter/jmeter.properties deleted file mode 100644 index 125746d495..0000000000 --- a/backend/src/main/resources/org/apache/jmeter/jmeter.properties +++ /dev/null @@ -1,1348 +0,0 @@ -################################################################################ -# Apache JMeter Property file -################################################################################ - -## Licensed to the Apache Software Foundation (ASF) under one or more -## contributor license agreements. See the NOTICE file distributed with -## this work for additional information regarding copyright ownership. -## The ASF licenses this file to You under the Apache License, Version 2.0 -## (the "License"); you may not use this file except in compliance with -## the License. You may obtain a copy of the License at -## -## http://www.apache.org/licenses/LICENSE-2.0 -## -## Unless required by applicable law or agreed to in writing, software -## distributed under the License is distributed on an "AS IS" BASIS, -## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -## See the License for the specific language governing permissions and -## limitations under the License. - -################################################################################ -# -# THIS FILE SHOULD NOT BE MODIFIED -# -# This avoids having to re-apply the modifications when upgrading JMeter -# Instead only user.properties should be modified: -# 1/ copy the property you want to modify to user.properties from jmeter.properties -# 2/ Change its value there -# -################################################################################ - -# JMeter properties are described in the file -# http://jmeter.apache.org/usermanual/properties_reference.html -# A local copy can be found in -# printable_docs/usermanual/properties_reference.html - -#Preferred GUI language. Comment out to use the JVM default locale's language. -#language=en - - -# Additional locale(s) to add to the displayed list. -# The current default list is: en, fr, de, no, es, tr, ja, zh_CN, zh_TW, pl, pt_BR -# [see JMeterMenuBar#makeLanguageMenu()] -# The entries are a comma-separated list of language names -#locales.add=zu - - -#--------------------------------------------------------------------------- -# XML Parser -#--------------------------------------------------------------------------- - -# Path to a Properties file containing Namespace mapping in the form -# prefix=Namespace -# Example: -# ns=http://biz.aol.com/schema/2006-12-18 -#xpath.namespace.config= - - -# XPath2 query cache for storing compiled XPath queries -#xpath2query.parser.cache.size=400 - -#--------------------------------------------------------------------------- -# SSL configuration -#--------------------------------------------------------------------------- - -## SSL System properties are now in system.properties - -# JMeter no longer converts javax.xxx property entries in this file into System properties. -# These must now be defined in the system.properties file or on the command-line. -# The system.properties file gives more flexibility. - -# By default, SSL session contexts are now created per-thread, rather than being shared. -# The original behaviour can be enabled by setting the JMeter property to true -#https.sessioncontext.shared=false - -# Be aware that https default protocol may vary depending on the version of JVM -# See https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https -# See https://bz.apache.org/bugzilla/show_bug.cgi?id=58236 -# Default HTTPS protocol level: -#https.default.protocol=TLS -# This may need to be changed here (or in user.properties) to: -#https.default.protocol=SSLv3 - -# List of protocols to enable. You may have to select only a subset if you find issues with target server. -# This is needed when server does not support Socket version negotiation, this can lead to: -# javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated -# java.net.SocketException: Connection reset -# see https://bz.apache.org/bugzilla/show_bug.cgi?id=54759 -#https.socket.protocols=SSLv2Hello SSLv3 TLSv1 - -# Control if we allow reuse of cached SSL context between iterations -# set the value to 'false' to reset the SSL context each iteration -# Deprecated since 5.0 -#https.use.cached.ssl.context=true - -# -# Reset HTTP State when starting a new Thread Group iteration which means: -# true means next iteration is associated to a new user -# false means next iteration is associated to same user -# true involves: -# - Closing opened connection -# - resetting SSL State -#httpclient.reset_state_on_thread_group_iteration=true - -# Start and end index to be used with keystores with many entries -# The default is to use entry 0, i.e. the first -#https.keyStoreStartIndex=0 -#https.keyStoreEndIndex=0 - -#--------------------------------------------------------------------------- -# Look and Feel configuration -#--------------------------------------------------------------------------- - -#Classname of the Swing default UI -# -# The LAF classnames that are available are now displayed as ToolTip text -# when hovering over the Options/Look and Feel selection list. -# -# You can either use a full class name, as shown below, -# or one of the strings "System" or "CrossPlatform" which means -# JMeter will use the corresponding string returned by UIManager.getLookAndFeelClassName() - -# LAF can be overridden by os.name (lowercased, spaces replaced by '_') -# Sample os.name LAF: -#jmeter.laf.windows_xp=javax.swing.plaf.metal.MetalLookAndFeel - -# Failing that, the OS family = os.name, but only up to first space: -# Sample OS family LAF: -#jmeter.laf.windows=com.sun.java.swing.plaf.windows.WindowsLookAndFeel - -# Custom settings for Mac using System LAF if you don't want to use Darcula -#jmeter.laf.mac=System - -# Failing that, the JMeter default laf can be defined: -#jmeter.laf=System - -# If none of the above jmeter.laf properties are defined, JMeter uses the CrossPlatform LAF. -# This is because the CrossPlatform LAF generally looks better than the System LAF. -# See https://bz.apache.org/bugzilla/show_bug.cgi?id=52026 for details -# N.B. the laf can be defined in user.properties. - -# LoggerPanel display -# default to false -#jmeter.loggerpanel.display=false - -# Enable LogViewer Panel to receive log event even if closed -# Enabled since 2.12 -# Note this has some impact on performances, but as GUI mode must -# not be used for Load Test it is acceptable -#jmeter.loggerpanel.enable_when_closed=true - -# Max lines kept in LoggerPanel, default to 1000 chars -# 0 means no limit -#jmeter.loggerpanel.maxlength=1000 - -# Interval period in ms to process the queue of events of the listeners -#jmeter.gui.refresh_period=500 - -# HiDPI mode (default: false) -# Activate a 'pseudo'-hidpi mode. Allows to increase size of some UI elements -# which are not correctly managed by JVM with high resolution screens in Linux or Windows -#jmeter.hidpi.mode=false -# To enable pseudo-hidpi mode change to true -#jmeter.hidpi.mode=true -# HiDPI scale factor -#jmeter.hidpi.scale.factor=1.0 -# Suggested value for HiDPI -#jmeter.hidpi.scale.factor=2.0 - -# Toolbar display -# Toolbar icon definitions -#jmeter.toolbar.icons=org/apache/jmeter/images/toolbar/icons-toolbar.properties -# Toolbar list -#jmeter.toolbar=new,open,close,save,save_as_testplan,|,cut,copy,paste,|,expand,collapse,toggle,|,test_start,test_stop,test_shutdown,|,test_start_remote_all,test_stop_remote_all,test_shutdown_remote_all,|,test_clear,test_clear_all,|,search,search_reset,|,function_helper,help -# Toolbar icons default size: 22x22. Available sizes are: 22x22, 32x32, 48x48 -#jmeter.toolbar.icons.size=22x22 -# Suggested value for HiDPI -#jmeter.toolbar.icons.size=48x48 - -# Icon definitions -# default: -#jmeter.icons=org/apache/jmeter/images/icon.properties -# alternate: -#jmeter.icons=org/apache/jmeter/images/icon_1.properties -# Historical icon set (deprecated) -#jmeter.icons=org/apache/jmeter/images/icon_old.properties - -# Tree icons default size: 19x19. Available sizes are: 19x19, 24x24, 32x32, 48x48 -# Useful for HiDPI display (see below) -#jmeter.tree.icons.size=19x19 -# Suggested value for HiDPI screen like 3200x1800: -#jmeter.tree.icons.size=32x32 - -#Components to not display in JMeter GUI (GUI class name or static label) -# These elements are deprecated and will be removed in next version: -# MongoDB Script, MongoDB Source Config, Monitor Results -# BSF Elements -not_in_menu=org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler,org.apache.jmeter.protocol.mongodb.config.MongoSourceElement,\ - org.apache.jmeter.timers.BSFTimer,org.apache.jmeter.modifiers.BSFPreProcessor,org.apache.jmeter.extractor.BSFPostProcessor,org.apache.jmeter.assertions.BSFAssertion,\ - org.apache.jmeter.visualizers.BSFListener,org.apache.jmeter.protocol.java.sampler.BSFSampler,\ - org.apache.jmeter.protocol.http.control.gui.SoapSamplerGui - -# Number of items in undo history -# Feature is disabled by default (0) due to known and not fixed bugs: -# https://bz.apache.org/bugzilla/show_bug.cgi?id=57043 -# https://bz.apache.org/bugzilla/show_bug.cgi?id=57039 -# https://bz.apache.org/bugzilla/show_bug.cgi?id=57040 -# Set it to a number > 0 (25 can be a good default) -# The bigger it is, the more it consumes memory -#undo.history.size=0 - -# Hotkeys to add JMeter components, will add elements when you press Ctrl+0 .. Ctrl+9 (Command+0 .. Command+9 on Mac) -gui.quick_0=ThreadGroupGui -gui.quick_1=HttpTestSampleGui -gui.quick_2=RegexExtractorGui -gui.quick_3=AssertionGui -gui.quick_4=ConstantTimerGui -gui.quick_5=TestActionGui -gui.quick_6=JSR223PostProcessor -gui.quick_7=JSR223PreProcessor -gui.quick_8=DebugSampler -gui.quick_9=ViewResultsFullVisualizer - - -#--------------------------------------------------------------------------- -# JMX Backup configuration -#--------------------------------------------------------------------------- -#Enable auto backups of the .jmx file when a test plan is saved. -#When enabled, before the .jmx is saved, it will be backed up to the directory pointed -#by the jmeter.gui.action.save.backup_directory property (see below). Backup file names are built -#after the jmx file being saved. For example, saving test-plan.jmx will create a test-plan-000012.jmx -#in the backup directory provided that the last created backup file is test-plan-000011.jmx. -#Default value is true indicating that auto backups are enabled -#jmeter.gui.action.save.backup_on_save=true - -#Set the backup directory path where JMX backups will be created upon save in the GUI. -#If not set (what it defaults to) then backup files will be created in -#a sub-directory of the JMeter base installation. The default directory is ${JMETER_HOME}/backups -#If set and the directory does not exist, it will be created. -#jmeter.gui.action.save.backup_directory= - -#Set the maximum time (in hours) that backup files should be preserved since the save time. -#By default no expiration time is set which means we keep backups for ever. -#jmeter.gui.action.save.keep_backup_max_hours=0 - -#Set the maximum number of backup files that should be preserved. By default 10 backups will be preserved. -#Setting this to zero will cause the backups to not being deleted (unless keep_backup_max_hours is set to a non zero value) -#jmeter.gui.action.save.keep_backup_max_count=10 - -#Enable auto saving of the .jmx file before start run a test plan -#When enabled, before the run, the .jmx will be saved and also backed up to the directory pointed -#save_automatically_before_run=true - -#--------------------------------------------------------------------------- -# Remote hosts and RMI configuration -#--------------------------------------------------------------------------- - -# Remote Hosts - comma delimited -remote_hosts=127.0.0.1 -#remote_hosts=localhost:1099,localhost:2010 - -# RMI port to be used by the server (must start rmiregistry with same port) -#server_port=1099 - -# To change the port to (say) 1234: -# On the server(s) -# - set server_port=1234 -# - start rmiregistry with port 1234 -# On Windows this can be done by: -# SET SERVER_PORT=1234 -# JMETER-SERVER -# -# On Unix: -# SERVER_PORT=1234 jmeter-server -# -# On the client: -# - set remote_hosts=server:1234 - -# Parameter that controls the RMI port used by RemoteSampleListenerImpl (The Controller) -# Default value is 0 which means port is randomly assigned -# You may need to open Firewall port on the Controller machine -#client.rmi.localport=0 - -# When distributed test is starting, there may be several attempts to initialize -# remote engines. By default, only single try is made. Increase following property -# to make it retry for additional times -#client.tries=1 - -# If there is initialization retries, following property sets delay between attempts -#client.retries_delay=5000 - -# When all initialization tries was made, test will fail if some remote engines are failed -# Set following property to true to ignore failed nodes and proceed with test -#client.continue_on_fail=false - -# To change the default port (1099) used to access the server: -#server.rmi.port=1234 - -# To use a specific port for the JMeter server engine, define -# the following property before starting the server: -#server.rmi.localport=4000 - -# The jmeter server creates by default the RMI registry as part of the server process. -# To stop the server creating the RMI registry: -#server.rmi.create=false - -# Define the following property to cause JMeter to exit after the first test -#server.exitaftertest=true - -# -# Configuration of Secure RMI connection -# -# Type of keystore : JKS -#server.rmi.ssl.keystore.type=JKS -# -# Keystore file that contains private key -#server.rmi.ssl.keystore.file=rmi_keystore.jks -# -# Password of Keystore -#server.rmi.ssl.keystore.password=changeit -# -# Key alias -#server.rmi.ssl.keystore.alias=rmi -# -# Type of truststore : JKS -#server.rmi.ssl.truststore.type=JKS -# -# Keystore file that contains certificate -#server.rmi.ssl.truststore.file=rmi_keystore.jks -# -# Password of Trust store -#server.rmi.ssl.truststore.password=changeit -# -# Set this if you don't want to use SSL for RMI -#server.rmi.ssl.disable=false -server.rmi.ssl.disable=true -#--------------------------------------------------------------------------- -# Include Controller -#--------------------------------------------------------------------------- - -# Prefix used by IncludeController when building file name -#includecontroller.prefix= - -#--------------------------------------------------------------------------- -# Shared HTTP configuration between HC4 and Java Implementations -#--------------------------------------------------------------------------- - -# -# Should JMeter add to POST request content-type header if missing: -# Content-Type: application/x-www-form-urlencoded -# Was true before version 5.0 -#post_add_content_type_if_missing=false - -#--------------------------------------------------------------------------- -# HTTP Java configuration -#--------------------------------------------------------------------------- - -# Number of connection retries performed by HTTP Java sampler before giving up -# 0 means no retry since version 3.0 -#http.java.sampler.retries=0 - -#--------------------------------------------------------------------------- -# Following properties apply to Apache HttpClient -#--------------------------------------------------------------------------- - -# set the socket timeout (or use the parameter http.socket.timeout) -# for AJP Sampler implementation. -# Value is in milliseconds -#httpclient.timeout=0 -# 0 == no timeout - -# Set the http version (defaults to 1.1) -#httpclient.version=1.1 (or use the parameter http.protocol.version) - -# Define characters per second > 0 to emulate slow connections -#httpclient.socket.http.cps=0 -#httpclient.socket.https.cps=0 - -#Enable loopback protocol -#httpclient.loopback=true - -# Define the local host address to be used for multi-homed hosts -#httpclient.localaddress=1.2.3.4 - -#--------------------------------------------------------------------------- -# AuthManager Kerberos configuration -#--------------------------------------------------------------------------- - -# AuthManager Kerberos configuration -# Name of application module used in jaas.conf -#kerberos_jaas_application=JMeter - -# Should ports be stripped from urls before constructing SPNs -# for SPNEGO authentication -#kerberos.spnego.strip_port=true - -# Should credentials be delegated to webservers when using -# SPNEGO authentication -#kerberos.spnego.delegate_cred=false - -#--------------------------------------------------------------------------- -# Apache HttpComponents HTTPClient configuration (HTTPClient4) -#--------------------------------------------------------------------------- - -# define a properties file for overriding Apache HttpClient parameters -# Uncomment this line if you put anything in hc.parameters file -#hc.parameters.file=hc.parameters - -# If true, default HC4 User-Agent will not be added -#httpclient4.default_user_agent_disabled=false - -# Preemptively send Authorization Header when BASIC auth is used -#httpclient4.auth.preemptive=true - -# Number of retries to attempt (default 0) -#httpclient4.retrycount=0 - -# true if it's OK to retry requests that have been sent -# This will retry Idempotent and non Idempotent requests -# This should usually be false, but it can be useful -# when testing against some Load Balancers like Amazon ELB -#httpclient4.request_sent_retry_enabled=false - -# Idle connection timeout (Milliseconds) to apply if the server does not send -# Keep-Alive headers (default 0) -# Set this > 0 to compensate for servers that don't send a Keep-Alive header -# If <= 0, idle timeout will only apply if the server sends a Keep-Alive header -#httpclient4.idletimeout=0 - -# Check connections if the elapsed time (Milliseconds) since the last -# use of the connection exceed this value -#httpclient4.validate_after_inactivity=1700 - -# TTL (in Milliseconds) represents an absolute value. -# No matter what, the connection will not be re-used beyond its TTL. -#httpclient4.time_to_live=2000 - -# Max size in bytes of PUT body to retain in result sampler. -# Bigger results will be clipped. -#httpclient4.max_body_retain_size=32768 - -# Ignore EOFException that some edgy application may emit to signal end of GZIP stream -# Defaults to false -#httpclient4.gzip_relax_mode=false - -# Ignore EOFException that some edgy application may emit to signal end of Deflated stream -# Defaults to false -#httpclient4.deflate_relax_mode=false - -#--------------------------------------------------------------------------- -# HTTP Cache Manager configuration -#--------------------------------------------------------------------------- -# -# Space or comma separated list of methods that can be cached -#cacheable_methods=GET -# N.B. This property is currently a temporary solution for Bug 56162 - -# Since 2.12, JMeter does not create anymore a Sample Result with 204 response -# code for a resource found in cache which is inline with what browser do. -#cache_manager.cached_resource_mode=RETURN_NO_SAMPLE - -# You can choose between 3 modes: -# RETURN_NO_SAMPLE (default) -# RETURN_200_CACHE -# RETURN_CUSTOM_STATUS - -# Those mode have the following behaviours: -# RETURN_NO_SAMPLE: -# this mode returns no Sample Result, it has no additional configuration - -# RETURN_200_CACHE: -# this mode will return Sample Result with response code to 200 and -# response message to "(ex cache)", you can modify response message by setting -# RETURN_200_CACHE.message=(ex cache) - -# RETURN_CUSTOM_STATUS: -# This mode lets you select what response code and message you want to return, -# if you use this mode you need to set those properties -# RETURN_CUSTOM_STATUS.code= -# RETURN_CUSTOM_STATUS.message= - -#--------------------------------------------------------------------------- -# Results file configuration -#--------------------------------------------------------------------------- - -# This section helps determine how result data will be saved. -# The commented out values are the defaults. - -# legitimate values: xml, csv, db. Only xml and csv are currently supported. -#jmeter.save.saveservice.output_format=csv - -# The below properties are true when field should be saved; false otherwise -# -# assertion_results_failure_message only affects CSV output -#jmeter.save.saveservice.assertion_results_failure_message=true -# -# legitimate values: none, first, all -#jmeter.save.saveservice.assertion_results=none -# -#jmeter.save.saveservice.data_type=true -#jmeter.save.saveservice.label=true -#jmeter.save.saveservice.response_code=true -# response_data is not currently supported for CSV output -#jmeter.save.saveservice.response_data=false -# Save ResponseData for failed samples -#jmeter.save.saveservice.response_data.on_error=false -#jmeter.save.saveservice.response_message=true -#jmeter.save.saveservice.successful=true -#jmeter.save.saveservice.thread_name=true -#jmeter.save.saveservice.time=true -#jmeter.save.saveservice.subresults=true -#jmeter.save.saveservice.assertions=true -#jmeter.save.saveservice.latency=true -# Only available with HttpClient4 -#jmeter.save.saveservice.connect_time=true -#jmeter.save.saveservice.samplerData=false -#jmeter.save.saveservice.responseHeaders=false -#jmeter.save.saveservice.requestHeaders=false -#jmeter.save.saveservice.encoding=false -#jmeter.save.saveservice.bytes=true -# Only available with HttpClient4 -#jmeter.save.saveservice.sent_bytes=true -#jmeter.save.saveservice.url=true -#jmeter.save.saveservice.filename=false -#jmeter.save.saveservice.hostname=false -#jmeter.save.saveservice.thread_counts=true -#jmeter.save.saveservice.sample_count=false -#jmeter.save.saveservice.idle_time=true - -# Timestamp format - this only affects CSV output files -# legitimate values: none, ms, or a format suitable for SimpleDateFormat -#jmeter.save.saveservice.timestamp_format=ms -#jmeter.save.saveservice.timestamp_format=yyyy/MM/dd HH:mm:ss.SSS - -# For use with Comma-separated value (CSV) files or other formats -# where the fields' values are separated by specified delimiters. -# Default: -#jmeter.save.saveservice.default_delimiter=, -# For TAB, one can use: -#jmeter.save.saveservice.default_delimiter=\t - -# Only applies to CSV format files: -# Print field names as first line in CSV -#jmeter.save.saveservice.print_field_names=true - -# Optional list of JMeter variable names whose values are to be saved in the result data files. -# Use commas to separate the names. For example: -#sample_variables=SESSION_ID,REFERENCE -# N.B. The current implementation saves the values in XML as attributes, -# so the names must be valid XML names. -# By default JMeter sends the variable to all servers -# to ensure that the correct data is available at the client. - -# Optional xml processing instruction for line 2 of the file: -# Example: -#jmeter.save.saveservice.xml_pi= -# Default value: -#jmeter.save.saveservice.xml_pi= - -# Prefix used to identify filenames that are relative to the current base -#jmeter.save.saveservice.base_prefix=~/ - -# AutoFlush on each line written in XML or CSV output -# Setting this to true will result in less test results data loss in case of Crash -# but with impact on performances, particularly for intensive tests (low or no pauses) -# Since JMeter 2.10, this is false by default -#jmeter.save.saveservice.autoflush=false - -#--------------------------------------------------------------------------- -# Settings that affect SampleResults -#--------------------------------------------------------------------------- - -# Save the start time stamp instead of the end -# This also affects the timestamp stored in result files -sampleresult.timestamp.start=true - -# Whether to use System.nanoTime() - otherwise only use System.currentTimeMillis() -#sampleresult.useNanoTime=true - -# Use a background thread to calculate the nanoTime offset -# Set this to <= 0 to disable the background thread -#sampleresult.nanoThreadSleep=5000 - -# Since version 5.0 JMeter has a new SubResult Naming Policy which numbers subresults by default -# This property if set to true discards renaming policy. This can be required if you're using JMeter for functional testing. -# Defaults to: false -#subresults.disable_renaming=false - -#--------------------------------------------------------------------------- -# Upgrade property -#--------------------------------------------------------------------------- - -# File that holds a record of name changes for backward compatibility issues -upgrade_properties=/bin/upgrade.properties - -#--------------------------------------------------------------------------- -# JMeter Test Script recorder configuration -# -# N.B. The element was originally called the Proxy recorder, which is why the -# properties have the prefix "proxy". -#--------------------------------------------------------------------------- - -# If the recorder detects a gap of at least 5s (default) between HTTP requests, -# it assumes that the user has clicked a new URL -#proxy.pause=5000 - -# Add numeric suffix to Sampler names (default true) -#proxy.number.requests=true - -# List of URL patterns that will be added to URL Patterns to exclude -# Separate multiple lines with ; -#proxy.excludes.suggested=.*\\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff|woff2) - -# Change the default HTTP Sampler (currently HttpClient4) -# Java: -#jmeter.httpsampler=HTTPSampler -#or -#jmeter.httpsampler=Java -# -# HttpClient4.x -#jmeter.httpsampler=HttpClient4 - -# By default JMeter tries to be more lenient with RFC2616 redirects and allows -# relative paths. -# If you want to test strict conformance, set this value to true -# When the property is true, JMeter follows http://tools.ietf.org/html/rfc3986#section-5.2 -#jmeter.httpclient.strict_rfc2616=false - -# Default content-type include filter to use -#proxy.content_type_include=text/html|text/plain|text/xml -# Default content-type exclude filter to use -#proxy.content_type_exclude=image/.*|text/css|application/.* - -# Default headers to remove from Header Manager elements -# (Cookie and Authorization are always removed) -#proxy.headers.remove=If-Modified-Since,If-None-Match,Host - -# Binary content-type handling -# These content-types will be handled by saving the request in a file: -#proxy.binary.types=application/x-amf,application/x-java-serialized-object,binary/octet-stream -# The files will be saved in this directory: -#proxy.binary.directory=user.dir -# The files will be created with this file filesuffix: -#proxy.binary.filesuffix=.binary - -#--------------------------------------------------------------------------- -# Test Script Recorder certificate configuration -#--------------------------------------------------------------------------- - -#proxy.cert.directory= -#proxy.cert.file=proxyserver.jks -#proxy.cert.type=JKS -#proxy.cert.keystorepass=password -#proxy.cert.keypassword=password -#proxy.cert.factory=SunX509 -# define this property if you wish to use your own keystore -#proxy.cert.alias= -# The default validity for certificates created by JMeter -#proxy.cert.validity=7 -# Use dynamic key generation (if supported by JMeter/JVM) -# If false, will revert to using a single key with no certificate -#proxy.cert.dynamic_keys=true - -#--------------------------------------------------------------------------- -# Test Script Recorder miscellaneous configuration -#--------------------------------------------------------------------------- - -# Whether to attempt disabling of samples that resulted from redirects -# where the generated samples use auto-redirection -#proxy.redirect.disabling=true - -# SSL configuration -#proxy.ssl.protocol=TLS - -#--------------------------------------------------------------------------- -# JMeter Proxy configuration -#--------------------------------------------------------------------------- -# use command-line flags for user-name and password -#http.proxyDomain=NTLM domain, if required by HTTPClient sampler - -#--------------------------------------------------------------------------- -# HTTPSampleResponse Parser configuration -#--------------------------------------------------------------------------- - -# Space-separated list of parser groups -HTTPResponse.parsers=htmlParser wmlParser cssParser -# for each parser, there should be a parser.types and a parser.className property - -# CSS Parser based on ph-css -cssParser.className=org.apache.jmeter.protocol.http.parser.CssParser -cssParser.types=text/css - -# CSS parser LRU cache size -# This cache stores the URLs found in a CSS to avoid continuously parsing the CSS -# By default the cache size is 400 -# It can be disabled by setting its value to 0 -#css.parser.cache.size=400 - -# Let the CSS Parser ignore all css errors -#css.parser.ignore_all_css_errors=true - -#--------------------------------------------------------------------------- -# HTML Parser configuration -#--------------------------------------------------------------------------- - -# Define the HTML parser to be used. -# Default parser: -# This new parser (since 2.10) should perform better than all others -# see https://bz.apache.org/bugzilla/show_bug.cgi?id=55632 -# Do not comment this property -htmlParser.className=org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser - -# Other parsers: -# Default parser before 2.10 -#htmlParser.className=org.apache.jmeter.protocol.http.parser.JTidyHTMLParser -# Note that Regexp extractor may detect references that have been commented out. -# In many cases it will work OK, but you should be aware that it may generate -# additional references. -#htmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser -# This parser is based on JSoup, it should be the most accurate but less -# performant than LagartoBasedHtmlParser -#htmlParser.className=org.apache.jmeter.protocol.http.parser.JsoupBasedHtmlParser - -#Used by HTTPSamplerBase to associate htmlParser with content types below -htmlParser.types=text/html application/xhtml+xml application/xml text/xml - -#--------------------------------------------------------------------------- -# WML Parser configuration -#--------------------------------------------------------------------------- - -wmlParser.className=org.apache.jmeter.protocol.http.parser.RegexpHTMLParser - -#Used by HTTPSamplerBase to associate wmlParser with content types below -wmlParser.types=text/vnd.wap.wml - -#--------------------------------------------------------------------------- -# Remote batching configuration -#--------------------------------------------------------------------------- -# How is Sample sender implementations configured: -# - true (default) means client configuration will be used -# - false means server configuration will be used -#sample_sender_client_configured=true - -# By default when Stripping modes are used JMeter since 3.1 will strip -# response even for SampleResults in error. -# If you want to revert to previous behaviour (no stripping of Responses in error) -# set this property to false -#sample_sender_strip_also_on_error=true - -# Remote batching support -# Since JMeter 2.9, default is MODE_STRIPPED_BATCH, which returns samples in -# batch mode (every 100 samples or every minute by default) -# Note also that MODE_STRIPPED_BATCH strips response data from SampleResult, so if you need it change to -# another mode -# Batch returns samples in batches -# Statistical returns sample summary statistics -# mode can also be the class name of an implementation of org.apache.jmeter.samplers.SampleSender -#mode=Standard -#mode=Batch -#mode=Statistical -#Set to true to key statistical samples on threadName rather than threadGroup -#key_on_threadname=false -#mode=Stripped -#mode=StrippedBatch -#mode=org.example.load.MySampleSender -# -#num_sample_threshold=100 -# Value is in milliseconds -#time_threshold=60000 -# -# Asynchronous sender; uses a queue and background worker process to return the samples -#mode=Asynch -# default queue size -#asynch.batch.queue.size=100 -# Same as Asynch but strips response data from SampleResult -#mode=StrippedAsynch -# -# DiskStore: Serialises the samples to disk, rather than saving in memory -#mode=DiskStore -# Same as DiskStore but strips response data from SampleResult -#mode=StrippedDiskStore -# Note: the mode is currently resolved on the client; -# other properties (e.g. time_threshold) are resolved on the server. - -#--------------------------------------------------------------------------- -# JDBC Request configuration -#--------------------------------------------------------------------------- - -# String used to indicate a null value -#jdbcsampler.nullmarker=]NULL[ -# -# Max size of BLOBs and CLOBs to store in JDBC sampler. Result will be cut off -#jdbcsampler.max_retain_result_size=65536 - -# Database validation query -# based in https://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases list -jdbc.config.check.query=select 1 from INFORMATION_SCHEMA.SYSTEM_USERS|select 1 from dual|select 1 from sysibm.sysdummy1|select 1|select 1 from rdb$database -jdbc.config.jdbc.driver.class=com.mysql.jdbc.Driver|org.postgresql.Driver|oracle.jdbc.OracleDriver|com.ingres.jdbc.IngresDriver|com.microsoft.sqlserver.jdbc.SQLServerDriver|com.microsoft.jdbc.sqlserver.SQLServerDriver|org.apache.derby.jdbc.ClientDriver|org.hsqldb.jdbc.JDBCDriver|com.ibm.db2.jcc.DB2Driver|org.apache.derby.jdbc.ClientDriver|org.h2.Driver|org.firebirdsql.jdbc.FBDriver|org.mariadb.jdbc.Driver|org.sqlite.JDBC|net.sourceforge.jtds.jdbc.Driver|com.exasol.jdbc.EXADriver - -#--------------------------------------------------------------------------- -# OS Process Sampler configuration -#--------------------------------------------------------------------------- -# Polling to see if process has finished its work, used when a timeout is configured on sampler -#os_sampler.poll_for_timeout=100 - -#--------------------------------------------------------------------------- -# TCP Sampler configuration -#--------------------------------------------------------------------------- - -# The default handler class -#tcp.handler=TCPClientImpl -# -# eolByte = byte value for end of line -# set this to a value outside the range -128 to +127 to skip eol checking -#tcp.eolByte=1000 -# -# TCP Charset, used by org.apache.jmeter.protocol.tcp.sampler.TCPClientImpl -# default to Platform defaults charset as returned by Charset.defaultCharset().name() -#tcp.charset= -# -# status.prefix and suffix = strings that enclose the status response code -#tcp.status.prefix=Status= -#tcp.status.suffix=. -# -# status.properties = property file to convert codes to messages -#tcp.status.properties=mytestfiles/tcpstatus.properties - -# The length prefix used by LengthPrefixedBinaryTCPClientImpl implementation -# defaults to 2 bytes. -#tcp.binarylength.prefix.length=2 - -#--------------------------------------------------------------------------- -# Summariser - Generate Summary Results - configuration (mainly applies to non-GUI mode) -#--------------------------------------------------------------------------- -# -# Comment the following property to disable the default non-GUI summariser -# [or change the value to rename it] -# (applies to non-GUI mode only) -summariser.name=summary -# -# interval between summaries (in seconds) default 30 seconds -#summariser.interval=30 -# -# Write messages to log file -#summariser.log=true -# -# Write messages to System.out -#summariser.out=true - -# Ignore SampleResults generated by TransactionControllers -# defaults to true -#summariser.ignore_transaction_controller_sample_result=true - - -#--------------------------------------------------------------------------- -# Aggregate Report and Aggregate Graph - configuration -#--------------------------------------------------------------------------- -# -# Percentiles to display in reports -# Can be float value between 0 and 100 -# First percentile to display, defaults to 90% -#aggregate_rpt_pct1=90 -# Second percentile to display, defaults to 95% -#aggregate_rpt_pct2=95 -# Second percentile to display, defaults to 99% -#aggregate_rpt_pct3=99 - -#--------------------------------------------------------------------------- -# BackendListener - configuration -#--------------------------------------------------------------------------- -# -# Backend metrics window mode (fixed=fixed-size window, timed=time boxed) -#backend_metrics_window_mode=fixed -# Backend metrics sliding window size for Percentiles, Min, Max -#backend_metrics_window=100 - -# Backend metrics sliding window size for Percentiles, Min, Max -# when backend_metrics_window_mode is timed -# Setting this value too high can lead to OOM -#backend_metrics_large_window=5000 - -######################## -# Graphite Backend -######################## -# Send interval in second -# Defaults to 1 second -#backend_graphite.send_interval=1 - -######################## -# Influx Backend -######################## - -# Send interval in second -# Defaults to 5 seconds -#backend_influxdb.send_interval=5 -#Influxdb timeouts -#backend_influxdb.connection_timeout=1000 -#backend_influxdb.socket_timeout=3000 -#backend_influxdb.connection_request_timeout=100 - -#--------------------------------------------------------------------------- -# BeanShell configuration -#--------------------------------------------------------------------------- - -# BeanShell Server properties -# -# Define the port number as non-zero to start the http server on that port -#beanshell.server.port=9000 -# The telnet server will be started on the next port - -# -# Define the server initialisation file -beanshell.server.file=../extras/startup.bsh - -# -# Define a file to be processed at startup -# This is processed using its own interpreter. -#beanshell.init.file= - -# -# Define the intialisation files for BeanShell Sampler, Function and other BeanShell elements -# N.B. Beanshell test elements do not share interpreters. -# Each element in each thread has its own interpreter. -# This is retained between samples. -#beanshell.sampler.init=BeanShellSampler.bshrc -#beanshell.function.init=BeanShellFunction.bshrc -#beanshell.assertion.init=BeanShellAssertion.bshrc -#beanshell.listener.init=etc -#beanshell.postprocessor.init=etc -#beanshell.preprocessor.init=etc -#beanshell.timer.init=etc - -# The file BeanShellListeners.bshrc contains sample definitions -# of Test and Thread Listeners. - -#--------------------------------------------------------------------------- -# JSR-223 function -#--------------------------------------------------------------------------- - -# Path to JSR-223 file containing script to call on JMeter startup -# JMeter will try to guess the engine to use by the extension -# of the name of the file. -# This script can use pre-defined variables: -# log : Logger to log any message -# props : JMeter Property -# OUT : System.OUT -#jsr223.init.file= - -#--------------------------------------------------------------------------- -# Groovy function -#--------------------------------------------------------------------------- - -#Path to Groovy file containing utility functions to make available to __groovy function -#groovy.utilities= - -# Example -#groovy.utilities=bin/utility.groovy - -#--------------------------------------------------------------------------- -# MailerModel configuration -#--------------------------------------------------------------------------- - -# Number of successful samples before a message is sent -#mailer.successlimit=2 -# -# Number of failed samples before a message is sent -#mailer.failurelimit=2 - -#--------------------------------------------------------------------------- -# CSVRead configuration -#--------------------------------------------------------------------------- - -# CSVRead delimiter setting (default ",") -# Make sure that there are no trailing spaces or tabs after the delimiter -# characters, or these will be included in the list of valid delimiters -#csvread.delimiter=, -#csvread.delimiter=; -#csvread.delimiter=! -#csvread.delimiter=~ -# The following line has a tab after the = -#csvread.delimiter= - -#--------------------------------------------------------------------------- -# __time() function configuration -# -# The properties below can be used to redefine the default formats -#--------------------------------------------------------------------------- -#time.YMD=yyyyMMdd -#time.HMS=HHmmss -#time.YMDHMS=yyyyMMdd-HHmmss -#time.USER1= -#time.USER2= - -#--------------------------------------------------------------------------- -# CSV DataSet configuration -#--------------------------------------------------------------------------- - -# String to return at EOF (if recycle not used) -#csvdataset.eofstring= -#list in https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html -csvdataset.file.encoding_list=UTF-8|UTF-16|ISO-8859-15|US-ASCII - - -#--------------------------------------------------------------------------- -# LDAP Sampler configuration -#--------------------------------------------------------------------------- -# Maximum number of search results returned by a search that will be sorted -# to guarantee a stable ordering (if more results then this limit are returned -# then no sorting is done). Set to 0 to turn off all sorting, in which case -# "Equals" response assertions will be very likely to fail against search results. -# -#ldapsampler.max_sorted_results=1000 - -# Number of characters to log for each of three sections (starting matching section, diff section, -# ending matching section where not all sections will appear for all diffs) diff display when an Equals -# assertion fails. So a value of 100 means a maximum of 300 characters of diff text will be displayed -# (+ a number of extra characters like "..." and "[[["/"]]]" which are used to decorate it). -#assertion.equals_section_diff_len=100 -# test written out to log to signify start/end of diff delta -#assertion.equals_diff_delta_start=[[[ -#assertion.equals_diff_delta_end=]]] - -#--------------------------------------------------------------------------- -# Miscellaneous configuration -#--------------------------------------------------------------------------- - -# Size of cache used by CSS Selector Extractor (for JODD implementation only) -# to store parsed CSS Selector expressions. -#cssselector.parser.cache.size=400 - - -# Used to control what happens when you start a test and -# have listeners that could overwrite existing result files -# Possible values: -# ASK : Ask user -# APPEND : Append results to existing file -# DELETE : Delete existing file and start a new file -#resultcollector.action_if_file_exists=ASK - -# If defined, then start the mirror server on the port -#mirror.server.port=8081 - -# ORO PatternCacheLRU size -#oro.patterncache.size=1000 - -#TestBeanGui -# -#propertyEditorSearchPath=null - -# Turn expert mode on/off: expert mode will show expert-mode beans and properties -#jmeter.expertMode=true - -# Max size of bytes stored in memory per SampleResult -# Ensure you don't exceed max capacity of a Java Array and remember -# that the higher it is, the higher JMeter will consume heap -# Defaults to 0, which means no truncation -#httpsampler.max_bytes_to_store_per_request=0 - -# Max size of buffer in bytes used when reading responses -# Defaults to 64k -#httpsampler.max_buffer_size=66560 - -# Maximum redirects to follow in a single sequence (default 20) -#httpsampler.max_redirects=20 -# Maximum frame/iframe nesting depth (default 5) -#httpsampler.max_frame_depth=5 - -# Revert to BUG 51939 behaviour (no separate container for embedded resources) by setting the following false: -#httpsampler.separate.container=true - -# If embedded resources download fails due to missing resources or other reasons, if this property is true -# Parent sample will not be marked as failed -#httpsampler.ignore_failed_embedded_resources=false - -#keep alive time for the parallel download threads (in seconds) -#httpsampler.parallel_download_thread_keepalive_inseconds=60 - -# Don't keep the embedded resources response data : just keep the size and the md5 -# default to false -#httpsampler.embedded_resources_use_md5=false - -# List of extra HTTP methods that should be available in select box -#httpsampler.user_defined_methods=VERSION-CONTROL,REPORT,CHECKOUT,CHECKIN,UNCHECKOUT,MKWORKSPACE,UPDATE,LABEL,MERGE,BASELINE-CONTROL,MKACTIVITY - -# The encoding to be used if none is provided (default ISO-8859-1) -#sampleresult.default.encoding=ISO-8859-1 - -# CookieManager behaviour - should cookies with null/empty values be deleted? -# Default is true. Use false to revert to original behaviour -#CookieManager.delete_null_cookies=true - -# CookieManager behaviour - should variable cookies be allowed? -# Default is true. Use false to revert to original behaviour -#CookieManager.allow_variable_cookies=true - -# CookieManager behaviour - should Cookies be stored as variables? -# Default is false -#CookieManager.save.cookies=false -CookieManager.save.cookies=true - -# CookieManager behaviour - prefix to add to cookie name before storing it as a variable -# Default is COOKIE_; to remove the prefix, define it as one or more spaces -#CookieManager.name.prefix= - -# CookieManager behaviour - check received cookies are valid before storing them? -# Default is true. Use false to revert to previous behaviour -#CookieManager.check.cookies=true - -# Netscape HTTP Cookie file -cookies=cookies - -# Ability to switch to Nashorn as default Javascript Engine used by IfController and __javaScript function -# JMeter works as following: -# - JDK >= 8 and javascript.use_rhino=false or not set : Nashorn -# - JDK >= 8 and javascript.use_rhino=true: Rhino -# If you want to use Rhino on JDK8, set this property to true -#javascript.use_rhino=false - -# Number of milliseconds to wait for a thread to stop -#jmeterengine.threadstop.wait=5000 - -#Whether to invoke System.exit(0) in server exit code after stopping RMI -#jmeterengine.remote.system.exit=false - -# Whether to call System.exit(1) on failure to stop threads in non-GUI mode. -# This only takes effect if the test was explicitly requested to stop. -# If this is disabled, it may be necessary to kill the JVM externally -#jmeterengine.stopfail.system.exit=true - -# Whether to force call System.exit(0) at end of test in non-GUI mode, even if -# there were no failures and the test was not explicitly asked to stop. -# Without this, the JVM may never exit if there are other threads spawned by -# the test which never exit. -#jmeterengine.force.system.exit=false - -# How long to pause (in ms) in the daemon thread before reporting that the JVM has failed to exit. -# If the value is <= 0, the JMeter does not start the daemon thread -#jmeter.exit.check.pause=2000 - -# If running non-GUI, then JMeter listens on the following port for a shutdown message. -# To disable, set the port to 1000 or less. -#jmeterengine.nongui.port=4445 -# -# If the initial port is busy, keep trying until this port is reached -# (to disable searching, set the value less than or equal to the .port property) -#jmeterengine.nongui.maxport=4455 - -# How often to check for shutdown during ramp-up (milliseconds) -#jmeterthread.rampup.granularity=1000 - -#Should JMeter expand the tree when loading a test plan? -# default value is false since JMeter 2.7 -#onload.expandtree=false - -#JSyntaxTextArea configuration -#jsyntaxtextarea.wrapstyleword=true -#jsyntaxtextarea.linewrap=true -#jsyntaxtextarea.codefolding=true -# Set 0 to disable undo feature in JSyntaxTextArea -#jsyntaxtextarea.maxundos=50 -# Change the font on the (JSyntax) Text Areas. (Useful for HiDPI screens) -#jsyntaxtextarea.font.family=Hack -#jsyntaxtextarea.font.size=14 - -# Set this to false to disable the use of JSyntaxTextArea for the Console Logger panel -#loggerpanel.usejsyntaxtext=true - -# Maximum size of HTML page that can be displayed; default=10 mbytes -# Set to 0 to disable the size check and display the whole response -#view.results.tree.max_size=10485760 - -# Order of Renderers in View Results Tree -# Note full class names should be used for non jmeter core renderers -# For JMeter core renderers, class names start with . and are automatically -# prefixed with org.apache.jmeter.visualizers -view.results.tree.renderers_order=.RenderAsText,.RenderAsRegexp,.RenderAsBoundaryExtractor,.RenderAsCssJQuery,.RenderAsXPath,org.apache.jmeter.extractor.json.render.RenderAsJsonRenderer,.RenderAsHTML,.RenderAsHTMLFormatted,.RenderAsHTMLWithEmbedded,.RenderAsDocument,.RenderAsJSON,.RenderAsXML - -# Maximum number of results in the results tree -# Set to 0 to store all results (might consume a lot of memory) -#view.results.tree.max_results=500 - -# Maximum size of Document that can be parsed by Tika engine; defaut=10 * 1024 * 1024 (10MB) -# Set to 0 to disable the size check -#document.max_size=0 - -#JMS options -# Enable the following property to stop JMS Point-to-Point Sampler from using -# the properties java.naming.security.[principal|credentials] when creating the queue connection -#JMSSampler.useSecurity.properties=false - -# Set the following value to true in order to skip the delete confirmation dialogue -#confirm.delete.skip=false - -# Used by JSR223 elements -# Size of compiled scripts cache -#jsr223.compiled_scripts_cache_size=100 - -#--------------------------------------------------------------------------- -# Classpath configuration -#--------------------------------------------------------------------------- - -# List of directories (separated by ;) to search for additional JMeter plugin classes, -# for example new GUI elements and samplers. -# Any jar file in such a directory will be automatically included, -# jar files in sub directories are ignored. -# The given value is in addition to any jars found in the lib/ext directory. -# Do not use this for utility or plugin dependency jars. -#search_paths=/app1/lib;/app2/lib - -# List of directories that JMeter will search for utility and plugin dependency classes. -# Use your platform path separator to separate multiple paths. -# Any jar file in such a directory will be automatically included, -# jar files in sub directories are ignored. -# The given value is in addition to any jars found in the lib directory. -# All entries will be added to the class path of the system class loader -# and also to the path of the JMeter internal loader. -# Paths with spaces may cause problems for the JVM -#user.classpath=../classes;../lib - -# List of directories (separated by ;) that JMeter will search for utility -# and plugin dependency classes. -# Any jar file in such a directory will be automatically included, -# jar files in sub directories are ignored. -# The given value is in addition to any jars found in the lib directory -# or given by the user.classpath property. -# All entries will be added to the path of the JMeter internal loader only. -# For plugin dependencies this property should be used instead of user.classpath. -#plugin_dependency_paths=../dependencies/lib;../app1/;../app2/ - -# Classpath finder -# ================ -# The classpath finder currently needs to load every single JMeter class to find -# the classes it needs. -# For non-GUI mode, it's only necessary to scan for Function classes, but all classes -# are still loaded. -# All current Function classes include ".function." in their name, -# and none include ".gui." in the name, so the number of unwanted classes loaded can be -# reduced by checking for these. However, if a valid function class name does not match -# these restrictions, it will not be loaded. If problems are encountered, then comment -# or change the following properties: -classfinder.functions.contain=.functions. -classfinder.functions.notContain=.gui. - - -#--------------------------------------------------------------------------- -# Additional property files to load -#--------------------------------------------------------------------------- - -# Should JMeter automatically load additional JMeter properties? -# File name to look for (comment to disable) -user.properties=user.properties - -# Should JMeter automatically load additional system properties? -# File name to look for (comment to disable) -system.properties=system.properties - -# Comma separated list of files that contain reference to templates and their description -# Path must be relative to JMeter root folder -#template.files=/bin/templates/templates.xml - - -#--------------------------------------------------------------------------- -# Thread Group Validation feature -#--------------------------------------------------------------------------- - -# Validation is the name of the feature used to rapidly validate a Thread Group runs fine -# Default implementation is org.apache.jmeter.gui.action.validation.TreeClonerForValidation -# It runs validation without timers, with 1 thread, 1 iteration and Startup Delay set to 0 -# You can implement your own policy that must extend org.apache.jmeter.engine.TreeCloner -# JMeter will instantiate it and use it to create the Tree used to run validation on Thread Group -#testplan_validation.tree_cloner_class=org.apache.jmeter.validation.ComponentTreeClonerForValidation - -# Number of threads to use to validate a Thread Group -#testplan_validation.nb_threads_per_thread_group=1 - -# Ignore BackendListener when validating the thread group of plan -#testplan_validation.ignore_backends=true - -# Ignore timers when validating the thread group of plan -#testplan_validation.ignore_timers=true - -# Number of iterations to use to validate a Thread Group -#testplan_validation.number_iterations=1 - -# Force throuput controllers that work in percentage mode to be a 100% -# Disabled by default -#testplan_validation.tpc_force_100_pct=false - -#--------------------------------------------------------------------------- -# Think Time configuration -#--------------------------------------------------------------------------- - -# -# Apply a factor on computed pauses by the following Timers: -# - Gaussian Random Timer -# - Uniform Random Timer -# - Poisson Random Timer -# -#timer.factor=1.0f - -# Default implementation that create the Timer structure to add to Test Plan -# Implementation of interface org.apache.jmeter.gui.action.thinktime.ThinkTimeCreator -#think_time_creator.impl=org.apache.jmeter.thinktime.DefaultThinkTimeCreator - -# Default Timer GUI class added to Test Plan by DefaultThinkTimeCreator -#think_time_creator.default_timer_implementation=org.apache.jmeter.timers.gui.UniformRandomTimerGui - -# Default constant pause of Timer -#think_time_creator.default_constant_pause=1000 - -# Default range pause of Timer -#think_time_creator.default_range=100 - - -# Change this parameter if you want to override the APDEX satisfaction threshold. -jmeter.reportgenerator.apdex_satisfied_threshold=500 - -# Change this parameter if you want to override the APDEX tolerance threshold. -jmeter.reportgenerator.apdex_tolerated_threshold=1500 - -# Timeout in milliseconds for Report generation when using Tools > Generate HTML report -#generate_report_ui.generation_timeout=120000 -#--------------------------------------------------------------------------- -# Naming Policy configuration -#--------------------------------------------------------------------------- - -# Prefix used when naming elements -#naming_policy.prefix= -# Suffix used when naming elements -#naming_policy.suffix= - -# Implementation of interface org.apache.jmeter.gui.action.TreeNodeNamingPolicy -#naming_policy.impl=org.apache.jmeter.gui.action.impl.DefaultTreeNodeNamingPolicy - -#--------------------------------------------------------------------------- -# Help Documentation -#--------------------------------------------------------------------------- - -# Switch that allows using Local documentation opened in JMeter GUI -# By default we use Online documentation opened in Browser -#help.local=false - -#--------------------------------------------------------------------------- -# Documentation generation -#--------------------------------------------------------------------------- - -# Path to XSL file used to generate Schematic View of Test Plan -# When empty, JMeter will use the embedded one in src/core/org/apache/jmeter/gui/action/schematic.xsl -#docgeneration.schematic_xsl= From 5cfdebc7d499c394ed1f0effac8bb2633b9c8e77 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 30 Apr 2020 10:36:27 +0800 Subject: [PATCH 22/31] csv --- backend/pom.xml | 6 - .../io/metersphere/report/base/Metric.java | 180 ---------------- .../src/test/java/io/metersphere/JtlTest.java | 204 ------------------ .../src/test/java/io/metersphere/Metric.java | 180 ---------------- .../io/metersphere/ReportContentTests.java | 61 ------ 5 files changed, 631 deletions(-) delete mode 100644 backend/src/main/java/io/metersphere/report/base/Metric.java delete mode 100644 backend/src/test/java/io/metersphere/JtlTest.java delete mode 100644 backend/src/test/java/io/metersphere/Metric.java delete mode 100644 backend/src/test/java/io/metersphere/ReportContentTests.java diff --git a/backend/pom.xml b/backend/pom.xml index 786bc1da9b..011c51a609 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -128,12 +128,6 @@ slf4j-simple - - com.opencsv - opencsv - 5.1 - - diff --git a/backend/src/main/java/io/metersphere/report/base/Metric.java b/backend/src/main/java/io/metersphere/report/base/Metric.java deleted file mode 100644 index 69ad56d1c9..0000000000 --- a/backend/src/main/java/io/metersphere/report/base/Metric.java +++ /dev/null @@ -1,180 +0,0 @@ -package io.metersphere.report.base; - -import com.opencsv.bean.CsvBindByName; - -public class Metric { - // timestamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect - - @CsvBindByName(column = "timestamp") // 访问开始时间 - private String timestamp; - @CsvBindByName(column = "elapsed") // 访问开始到结束的用时 - 响应时间 - private String elapsed; - @CsvBindByName(column = "label") // 请求的标签 - private String label; - @CsvBindByName(column = "responseCode") // 响应码 - private String responseCode; - @CsvBindByName(column = "responseMessage") // 响应信息 - private String responseMessage; - @CsvBindByName(column = "threadName") // 请求所属线程 - private String threadName; - @CsvBindByName(column = "dataType") // 数据类型 - private String dataType; - @CsvBindByName(column = "success") // 访问是否成功 - private String success; - @CsvBindByName(column = "failureMessage") // 访问失败信息 - private String failureMessage; - @CsvBindByName(column = "bytes") // - private String bytes; - @CsvBindByName(column = "sentBytes") // - private String sentBytes; - @CsvBindByName(column = "grpThreads") // 线程组 - private String grpThreads; - @CsvBindByName(column = "allThreads") // - private String allThreads; - @CsvBindByName(column = "URL") // - private String url; - @CsvBindByName(column = "Latency") // 延时 - private String latency; - @CsvBindByName(column = "IdleTime") // 闲置时间 - private String idleTime; - @CsvBindByName(column = "Connect") // - private String connect; - - - public String getTimestamp() { - return timestamp; - } - - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - - public String getElapsed() { - return elapsed; - } - - public void setElapsed(String elapsed) { - this.elapsed = elapsed; - } - - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getResponseCode() { - return responseCode; - } - - public void setResponseCode(String responseCode) { - this.responseCode = responseCode; - } - - public String getResponseMessage() { - return responseMessage; - } - - public void setResponseMessage(String responseMessage) { - this.responseMessage = responseMessage; - } - - public String getThreadName() { - return threadName; - } - - public void setThreadName(String threadName) { - this.threadName = threadName; - } - - public String getDataType() { - return dataType; - } - - public void setDataType(String dataType) { - this.dataType = dataType; - } - - public String getSuccess() { - return success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public String getFailureMessage() { - return failureMessage; - } - - public void setFailureMessage(String failureMessage) { - this.failureMessage = failureMessage; - } - - public String getBytes() { - return bytes; - } - - public void setBytes(String bytes) { - this.bytes = bytes; - } - - public String getSentBytes() { - return sentBytes; - } - - public void setSentBytes(String sentBytes) { - this.sentBytes = sentBytes; - } - - public String getGrpThreads() { - return grpThreads; - } - - public void setGrpThreads(String grpThreads) { - this.grpThreads = grpThreads; - } - - public String getAllThreads() { - return allThreads; - } - - public void setAllThreads(String allThreads) { - this.allThreads = allThreads; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getLatency() { - return latency; - } - - public void setLatency(String latency) { - this.latency = latency; - } - - public String getIdleTime() { - return idleTime; - } - - public void setIdleTime(String idleTime) { - this.idleTime = idleTime; - } - - public String getConnect() { - return connect; - } - - public void setConnect(String connect) { - this.connect = connect; - } -} diff --git a/backend/src/test/java/io/metersphere/JtlTest.java b/backend/src/test/java/io/metersphere/JtlTest.java deleted file mode 100644 index cf701cfa55..0000000000 --- a/backend/src/test/java/io/metersphere/JtlTest.java +++ /dev/null @@ -1,204 +0,0 @@ -package io.metersphere; - -import com.opencsv.bean.CsvToBean; -import com.opencsv.bean.CsvToBeanBuilder; -import com.opencsv.bean.HeaderColumnNameMappingStrategy; -import org.junit.Test; -import java.io.Reader; -import java.io.StringReader; -import java.util.*; -import java.util.stream.Collectors; - - -public class JtlTest { - - public static List beanBuilderExample(String content) { - HeaderColumnNameMappingStrategy ms = new HeaderColumnNameMappingStrategy<>(); - ms.setType(io.metersphere.Metric.class); - try (Reader reader = new StringReader(content)) { - - CsvToBean cb = new CsvToBeanBuilder(reader) - .withType(Metric.class) - .withSkipLines(0) - .withMappingStrategy(ms) - .withIgnoreLeadingWhiteSpace(true) - .build(); - - return cb.parse(); - } catch (Exception ex) { - ex.printStackTrace(); - } - return null; - } - - @Test - public void getRequestStatistics() { - String jtlString = "timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect\n" + - "1584602493891,1107,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-3,text,true,,1473653,6950,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=c81989f3-27d5-4b1a-a2db-03ddb06475d5&login=true&scope=openid,232,0,26\n" + - "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-3,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,26\n" + - "1584602494128,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-3,,true,,615,577,3,3,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + - "1584602494142,33,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-3,text,true,,8068,851,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=c81989f3-27d5-4b1a-a2db-03ddb06475d5&login=true&scope=openid,32,0,0\n" + - "1584602494242,756,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-3,text,true,,1464756,4955,3,3,https://rddev2.fit2cloud.com/login,46,0,0\n" + - "1584602493891,1154,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-2,text,true,,1473685,6950,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=374d02c0-6e1f-4937-b457-27d6e6ccf264&login=true&scope=openid,232,0,25\n" + - "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-2,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,25\n" + - "1584602494128,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-2,,true,,615,577,3,3,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + - "1584602494142,35,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-2,text,true,,8068,851,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=374d02c0-6e1f-4937-b457-27d6e6ccf264&login=true&scope=openid,35,0,0\n" + - "1584602494242,803,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-2,text,true,,1464788,4955,3,3,https://rddev2.fit2cloud.com/login,45,0,0\n" + - "1584602493891,1316,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-1,text,true,,1473686,6942,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=515530c4-0f36-454a-b536-9a11c7d2c47a&login=true&scope=openid,232,0,25\n" + - "1584602493891,235,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-1,,true,,214,567,3,3,https://rddev2.fit2cloud.com/,232,0,25\n" + - "1584602494128,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-1,,true,,614,577,3,3,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + - "1584602494142,36,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-1,text,true,,8068,850,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=515530c4-0f36-454a-b536-9a11c7d2c47a&login=true&scope=openid,35,0,0\n" + - "1584602494242,965,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-1,text,true,,1464790,4948,3,3,https://rddev2.fit2cloud.com/login,48,0,0\n" + - "1584602496824,550,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-5,text,true,,1473644,6950,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=211a68fc-eb1e-482d-b5d2-636b411a133e&login=true&scope=openid,54,0,0\n" + - "1584602496824,54,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-5,,true,,214,567,5,5,https://rddev2.fit2cloud.com/,54,0,0\n" + - "1584602496878,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-5,,true,,615,577,5,5,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + - "1584602496890,29,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-5,text,true,,8074,851,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=211a68fc-eb1e-482d-b5d2-636b411a133e&login=true&scope=openid,29,0,0\n" + - "1584602496922,452,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-5,text,true,,1464741,4955,5,5,https://rddev2.fit2cloud.com/login,20,0,0\n" + - "1584602496821,559,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-4,text,true,,1473633,6958,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=e6ebc175-e3dc-4c99-933b-f6610688dbfe&login=true&scope=openid,57,0,2\n" + - "1584602496821,57,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-4,,true,,214,567,5,5,https://rddev2.fit2cloud.com/,57,0,2\n" + - "1584602496878,11,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-4,,true,,616,577,5,5,https://rddev2.fit2cloud.com/dashboard/,11,0,0\n" + - "1584602496889,27,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-4,text,true,,8068,852,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=e6ebc175-e3dc-4c99-933b-f6610688dbfe&login=true&scope=openid,27,0,0\n" + - "1584602496919,461,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-4,text,true,,1464735,4962,5,5,https://rddev2.fit2cloud.com/login,20,0,0\n" + - "1584602499028,73,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-1,text,false,,4469,1745,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,73,0,6\n" + - "1584602499125,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-1,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + - "1584602499126,21,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,12438,559,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,21,0,0\n" + - "1584602499251,18,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1916,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,18,0,0\n" + - "1584602498833,509,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-7,text,true,,1473651,6942,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1f8130d4-f1c4-44f5-8633-03cc4892f31c&login=true&scope=openid,39,0,1\n" + - "1584602498833,39,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-7,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,39,0,1\n" + - "1584602498872,9,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-7,,true,,614,577,8,8,https://rddev2.fit2cloud.com/dashboard/,9,0,0\n" + - "1584602498881,18,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-7,text,true,,8074,850,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1f8130d4-f1c4-44f5-8633-03cc4892f31c&login=true&scope=openid,18,0,0\n" + - "1584602498901,441,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-7,text,true,,1464749,4948,8,8,https://rddev2.fit2cloud.com/login,25,0,0\n" + - "1584602499325,71,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-2,text,false,,4469,1746,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,70,0,4\n" + - "1584602499445,16,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1570,581,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,16,0,0\n" + - "1584602498832,637,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-6,text,true,,1473640,6958,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=ceda817a-6ac6-4516-9cd8-c1b25429bf94&login=true&scope=openid,50,0,1\n" + - "1584602498832,50,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-6,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,50,0,1\n" + - "1584602498882,9,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-6,,true,,616,577,8,8,https://rddev2.fit2cloud.com/dashboard/,9,0,0\n" + - "1584602498891,35,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-6,text,true,,8068,852,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=ceda817a-6ac6-4516-9cd8-c1b25429bf94&login=true&scope=openid,35,0,0\n" + - "1584602498927,542,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-6,text,true,,1464742,4962,8,8,https://rddev2.fit2cloud.com/login,23,0,0\n" + - "1584602498836,635,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-8,text,true,,1473639,6950,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1b42574e-756d-4157-9987-a8e1df496718&login=true&scope=openid,46,0,0\n" + - "1584602498836,46,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-8,,true,,214,567,8,8,https://rddev2.fit2cloud.com/,46,0,0\n" + - "1584602498883,12,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-8,,true,,615,577,8,8,https://rddev2.fit2cloud.com/dashboard/,12,0,0\n" + - "1584602498896,36,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-8,text,true,,8074,851,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=1b42574e-756d-4157-9987-a8e1df496718&login=true&scope=openid,36,0,0\n" + - "1584602498933,538,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-8,text,true,,1464736,4955,8,8,https://rddev2.fit2cloud.com/login,26,0,0\n" + - "1584602499605,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-2,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + - "1584602499607,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,12424,560,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + - "1584602499856,21,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,2516,572,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,21,0,0\n" + - "1584602500034,27,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1916,574,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,27,0,0\n" + - "1584602500182,23,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-1,text,true,,288,566,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,23,0,0\n" + - "1584602500484,18,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1570,582,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,18,0,0\n" + - "1584602500504,16,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,2516,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,16,0,0\n" + - "1584602500206,420,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-1,text,true,,1473342,5748,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=573519c4-a91b-4e46-b28d-f68231a8faf8&login=true&scope=openid,10,0,0\n" + - "1584602500206,10,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-1,,true,,555,550,8,8,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,10,0,0\n" + - "1584602500216,23,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-1,text,true,,8038,1439,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=573519c4-a91b-4e46-b28d-f68231a8faf8&login=true&scope=openid,23,0,0\n" + - "1584602500243,383,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-1,text,true,,1464749,3759,8,8,https://rddev2.fit2cloud.com/login,24,0,0\n" + - "1584602500622,18,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-2,text,true,,288,567,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,18,0,0\n" + - "1584602500735,15,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,503,506,8,8,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,15,0,0\n" + - "1584602501143,58,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-5,text,false,,4469,1746,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,58,0,4\n" + - "1584602501233,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-5,text,false,,1392,0,8,8,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + - "1584602501234,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,12438,560,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + - "1584602501253,17,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1916,574,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,17,0,0\n" + - "1584602500841,509,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-2,text,true,,1473319,5757,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=c27f5334-b14f-43e8-ba3d-a31d6f385c32&login=true&scope=openid,13,0,0\n" + - "1584602500841,13,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-2,,true,,555,551,8,8,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,13,0,0\n" + - "1584602500855,29,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-2,text,true,,8038,1440,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=c27f5334-b14f-43e8-ba3d-a31d6f385c32&login=true&scope=openid,29,0,0\n" + - "1584602500887,463,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-2,text,true,,1464726,3766,8,8,https://rddev2.fit2cloud.com/login,26,0,0\n" + - "1584602501352,16,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,503,507,8,8,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,16,0,0\n" + - "1584602501458,13,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1570,582,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,13,0,0\n" + - "1584602501663,17,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,2516,573,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-list.html?_t=1577351137654,17,0,0\n" + - "1584602501435,359,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-1,text,true,,1473387,6761,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=832af3d4-2ca4-4e23-bf2a-e14a01d27fc0&login=true&scope=openid,11,0,0\n" + - "1584602501435,11,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-1,,true,,558,653,8,8,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,11,0,0\n" + - "1584602501446,22,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-1,text,true,,8030,1614,8,8,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=832af3d4-2ca4-4e23-bf2a-e14a01d27fc0&login=true&scope=openid,22,0,0\n" + - "1584602501471,323,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-1,text,true,,1464799,4494,8,8,https://rddev2.fit2cloud.com/login,23,0,0\n" + - "1584602501784,17,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,200,OK,Thread Group 1-5,text,true,,288,567,8,8,https://rddev2.fit2cloud.com/dashboard/anonymous/license/validate?_nocache=1578039505321,17,0,0\n" + - "1584602501907,304,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-1,text,true,,1473471,6749,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=1904f64b-a8f9-44d8-867e-359cfe46297f&login=true&scope=openid,10,0,0\n" + - "1584602501907,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-1,,true,,555,652,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,10,0,0\n" + - "1584602501917,24,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-1,text,true,,8021,1603,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=1904f64b-a8f9-44d8-867e-359cfe46297f&login=true&scope=openid,24,0,0\n" + - "1584602501943,268,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-1,text,true,,1464895,4494,10,10,https://rddev2.fit2cloud.com/login,23,0,0\n" + - "1584602502213,16,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,1162,499,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,16,0,0\n" + - "1584602501802,513,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,200,OK,Thread Group 1-5,text,true,,1473342,5757,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=7d3aea03-3217-44da-81be-35c41c1db2d7&login=true&scope=openid,15,0,0\n" + - "1584602501802,15,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-0,302,Found,Thread Group 1-5,,true,,555,551,10,10,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321,15,0,0\n" + - "1584602501817,23,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-1,200,OK,Thread Group 1-5,text,true,,8038,1440,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fmodule%2Fall?_nocache%3D1578039505321&state=7d3aea03-3217-44da-81be-35c41c1db2d7&login=true&scope=openid,23,0,0\n" + - "1584602501842,473,https://rddev2.fit2cloud.com/dashboard/module/all?_nocache=1578039505321-2,200,OK,Thread Group 1-5,text,true,,1464749,3766,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + - "1584602502316,28,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,503,507,10,10,https://rddev2.fit2cloud.com/web-public/fit2cloud/html/loading/loading.html?_t=1577351137654,28,0,0\n" + - "1584602502110,631,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-10,text,true,,1473668,6950,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=26792af8-d8cd-4ed6-b0e0-68ad7220004f&login=true&scope=openid,63,0,1\n" + - "1584602502110,63,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-10,,true,,214,567,10,10,https://rddev2.fit2cloud.com/,63,0,1\n" + - "1584602502173,15,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-10,,true,,615,577,10,10,https://rddev2.fit2cloud.com/dashboard/,15,0,0\n" + - "1584602502189,39,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-10,text,true,,8074,851,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=26792af8-d8cd-4ed6-b0e0-68ad7220004f&login=true&scope=openid,39,0,0\n" + - "1584602502229,512,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-10,text,true,,1464765,4955,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + - "1584602502169,625,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-2,text,true,,1473329,6770,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=7bfdeacf-3f22-449d-88f9-f0d792bfe1bb&login=true&scope=openid,19,0,0\n" + - "1584602502169,19,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-2,,true,,558,654,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,19,0,0\n" + - "1584602502189,32,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-2,text,true,,8030,1615,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=7bfdeacf-3f22-449d-88f9-f0d792bfe1bb&login=true&scope=openid,32,0,0\n" + - "1584602502222,572,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-2,text,true,,1464741,4501,10,10,https://rddev2.fit2cloud.com/login,21,0,0\n" + - "1584602502110,713,https://rddev2.fit2cloud.com/,200,OK,Thread Group 1-9,text,true,,1473667,6942,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=cb0aadfc-16eb-486b-b7f1-2c2df1c3231c&login=true&scope=openid,63,0,1\n" + - "1584602502110,63,https://rddev2.fit2cloud.com/-0,302,Found,Thread Group 1-9,,true,,214,567,10,10,https://rddev2.fit2cloud.com/,63,0,1\n" + - "1584602502174,21,https://rddev2.fit2cloud.com/-1,302,Found,Thread Group 1-9,,true,,614,577,10,10,https://rddev2.fit2cloud.com/dashboard/,21,0,0\n" + - "1584602502195,34,https://rddev2.fit2cloud.com/-2,200,OK,Thread Group 1-9,text,true,,8074,850,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2F&state=cb0aadfc-16eb-486b-b7f1-2c2df1c3231c&login=true&scope=openid,34,0,0\n" + - "1584602502231,592,https://rddev2.fit2cloud.com/-3,200,OK,Thread Group 1-9,text,true,,1464765,4948,10,10,https://rddev2.fit2cloud.com/login,21,0,0\n" + - "1584602502434,434,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-1,text,true,,1473315,6926,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=b2a99afa-66a7-411d-bba9-239c9b20de82&login=true&scope=openid,18,0,0\n" + - "1584602502434,18,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-1,,true,,558,731,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,18,0,0\n" + - "1584602502452,27,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-1,text,true,,8024,1603,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=b2a99afa-66a7-411d-bba9-239c9b20de82&login=true&scope=openid,27,0,0\n" + - "1584602502481,387,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-1,text,true,,1464733,4592,10,10,https://rddev2.fit2cloud.com/login,25,0,0\n" + - "1584602502839,65,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-3,text,false,,4462,1746,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,65,0,1\n" + - "1584602502961,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-3,text,false,,1392,0,10,10,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + - "1584602503108,27,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,12438,560,10,10,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,27,0,0\n" + - "1584602503239,23,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,1916,574,10,10,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,23,0,0\n" + - "1584602503006,262,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484,200,OK,Thread Group 1-1,text,true,,1473599,5844,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fcurrent%2Finfo?_nocache%3D1578039505484&state=10ff89f8-c521-42a3-99bd-d2929d4260cc&login=true&scope=openid,14,0,0\n" + - "1584602503006,14,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-0,302,Found,Thread Group 1-1,,true,,564,557,10,10,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484,14,0,0\n" + - "1584602503021,22,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-1,200,OK,Thread Group 1-1,text,true,,8056,1528,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fcurrent%2Finfo?_nocache%3D1578039505484&state=10ff89f8-c521-42a3-99bd-d2929d4260cc&login=true&scope=openid,22,0,0\n" + - "1584602503047,221,https://rddev2.fit2cloud.com/dashboard/user/current/info?_nocache=1578039505484-2,200,OK,Thread Group 1-1,text,true,,1464979,3759,10,10,https://rddev2.fit2cloud.com/login,20,0,0\n" + - "1584602502806,506,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-2,text,true,,1473450,6758,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=f4ac4eb9-f92a-4bcc-8214-3eac6df6d1c9&login=true&scope=openid,12,0,0\n" + - "1584602502806,12,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-2,,true,,555,653,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,12,0,0\n" + - "1584602502819,26,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-2,text,true,,8027,1604,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=f4ac4eb9-f92a-4bcc-8214-3eac6df6d1c9&login=true&scope=openid,26,0,0\n" + - "1584602502846,466,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-2,text,true,,1464868,4501,10,10,https://rddev2.fit2cloud.com/login,15,0,0\n" + - "1584602503314,13,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-2,text,true,,1162,500,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,13,0,0\n" + - "1584602503471,15,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/header-menu.html?_t=1577351137654,200,OK,Thread Group 1-1,text,true,,3117,574,10,10,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/header-menu.html?_t=1577351137654,15,0,0\n" + - "1584602503471,54,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-4,text,false,,4462,1747,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,54,0,4\n" + - "1584602503569,0,https://rddev2.fit2cloud.com/dashboard/?state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1&code=efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc,Non HTTP response code: java.net.URISyntaxException,\"Non HTTP response message: Illegal character in query at index 45: https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",Thread Group 1-4,text,false,,1392,0,10,10,\"https://rddev2.fit2cloud.com/dashboard/?code=\n" + - " efe49afa-7afb-4c38-8e0c-38323291938c.191d0330-dd9f-4bb0-8c24-0e3df46e2ff1.fd56cca3-6d54-44aa-b879-a35e79fc1bfc\n" + - " &state=3d31fe47-47bd-47f2-950d-9d135e0600ef&session_state=191d0330-dd9f-4bb0-8c24-0e3df46e2ff1\",0,0,0\n" + - "1584602503108,494,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-5,text,true,,1473344,6770,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=bbc579c2-fce7-4f4c-a9e0-9e27c818248c&login=true&scope=openid,21,0,0\n" + - "1584602503108,21,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-5,,true,,558,654,10,10,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,21,0,0\n" + - "1584602503129,39,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-5,text,true,,8030,1615,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=bbc579c2-fce7-4f4c-a9e0-9e27c818248c&login=true&scope=openid,39,0,0\n" + - "1584602503170,432,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-2,200,OK,Thread Group 1-5,text,true,,1464756,4501,10,10,https://rddev2.fit2cloud.com/login,25,0,0\n" + - "1584602503607,363,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,200,OK,Thread Group 1-5,text,true,,1473560,6758,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=db071ff5-a114-4a0d-b693-fd1d8e477e75&login=true&scope=openid,12,0,0\n" + - "1584602503607,12,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-0,302,Found,Thread Group 1-5,,true,,555,653,10,10,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50,12,0,0\n" + - "1584602503619,23,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-1,200,OK,Thread Group 1-5,text,true,,8027,1604,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fnotification%2Flist%2Funread%2F1%2F50&state=db071ff5-a114-4a0d-b693-fd1d8e477e75&login=true&scope=openid,23,0,0\n" + - "1584602503644,326,https://rddev2.fit2cloud.com/dashboard/notification/list/unread/1/50-2,200,OK,Thread Group 1-5,text,true,,1464978,4501,10,10,https://rddev2.fit2cloud.com/login,18,0,0\n" + - "1584602503971,15,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,200,OK,Thread Group 1-5,text,true,,1162,500,10,10,https://rddev2.fit2cloud.com/web-public/project/html/pagination.html?_t=1577351137654,15,0,0\n" + - "1584602503971,19,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,200,OK,Thread Group 1-4,text,true,,12438,561,10,10,https://rddev2.fit2cloud.com/dashboard/anonymous/i18n/en_US.json?_t=1577351137654,19,0,0\n" + - "1584602503792,32,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551,200,OK,Thread Group 1-1,text,true,,8617,2109,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fsource%2Flist?_nocache%3D1578039505551&state=2bc90b74-8d32-4217-a573-bfbd969b6b16&login=true&scope=openid,10,0,0\n" + - "1584602503792,10,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551-0,302,Found,Thread Group 1-1,,true,,563,556,10,10,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551,10,0,0\n" + - "1584602503803,21,https://rddev2.fit2cloud.com/dashboard/user/source/list?_nocache=1578039505551-1,200,OK,Thread Group 1-1,text,true,,8054,1553,10,10,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fuser%2Fsource%2Flist?_nocache%3D1578039505551&state=2bc90b74-8d32-4217-a573-bfbd969b6b16&login=true&scope=openid,21,0,0\n" + - "1584602504095,21,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-9,text,false,,4469,1745,9,9,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,21,0,0\n" + - "1584602504100,20,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,200,OK,Thread Group 1-4,text,true,,1916,575,8,8,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/task-menus.html?_t=1577351137654,20,0,0\n" + - "1584602504095,27,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-10,text,false,,4462,1746,7,7,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,27,0,0\n" + - "1584602504095,39,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,200,OK,Thread Group 1-2,text,true,,8588,2336,6,6,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=24c9d65b-0421-4732-8193-0bf5f70b3fa4&login=true&scope=openid,13,0,0\n" + - "1584602504095,13,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-0,302,Found,Thread Group 1-2,,true,,558,732,6,6,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50,13,0,0\n" + - "1584602504108,26,https://rddev2.fit2cloud.com/dashboard/flow/runtime/task/pending/1/50-1,200,OK,Thread Group 1-2,text,true,,8030,1604,6,6,https://rddev2.fit2cloud.com/auth/realms/cmp/protocol/openid-connect/auth?response_type=code&client_id=cmp-client&redirect_uri=https%3A%2F%2Frddev2.fit2cloud.com%2Fdashboard%2Fflow%2Fruntime%2Ftask%2Fpending%2F1%2F50&state=24c9d65b-0421-4732-8193-0bf5f70b3fa4&login=true&scope=openid,26,0,0\n" + - "1584602504095,55,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-8,text,false,,4469,1746,5,5,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,55,0,3\n" + - "1584602504095,59,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-6,text,false,,4462,1747,4,4,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,59,0,4\n" + - "1584602504095,65,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate?session_code=YWUneSay4qlQuHRZsD4kPaZDIIR50KJLaNpW7uhsD-Q&execution=c7620733-54ab-46b2-802b-66764e42682b&client_id=cmp-client&tab_id=S8xOQPgCmhQ,400,Bad Request,Thread Group 1-7,text,false,,4469,1745,3,3,https://rddev2.fit2cloud.com/auth/realms/cmp/login-actions/authenticate,65,0,4\n" + - "1584602504200,12,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,200,OK,Thread Group 1-3,text,true,,1570,582,2,2,https://rddev2.fit2cloud.com/dashboard/web-public/project/html/notification-menus.html?_t=1577351137654,12,0,0\n"; - List metrics = beanBuilderExample(jtlString); - // 根据label分组,label作为map的key - Map> map = metrics.stream().collect(Collectors.groupingBy(Metric::getLabel)); - } - -} diff --git a/backend/src/test/java/io/metersphere/Metric.java b/backend/src/test/java/io/metersphere/Metric.java deleted file mode 100644 index e1c6bb6370..0000000000 --- a/backend/src/test/java/io/metersphere/Metric.java +++ /dev/null @@ -1,180 +0,0 @@ -package io.metersphere; - -import com.opencsv.bean.CsvBindByName; - -public class Metric { - // timestamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect - - @CsvBindByName(column = "timestamp") - private String timestamp; - @CsvBindByName(column = "elapsed") - private String elapsed; - @CsvBindByName(column = "label") - private String label; - @CsvBindByName(column = "responseCode") - private String responseCode; - @CsvBindByName(column = "responseMessage") - private String responseMessage; - @CsvBindByName(column = "threadName") - private String threadName; - @CsvBindByName(column = "dataType") - private String dataType; - @CsvBindByName(column = "success") - private String success; - @CsvBindByName(column = "failureMessage") - private String failureMessage; - @CsvBindByName(column = "bytes") - private String bytes; - @CsvBindByName(column = "sentBytes") - private String sentBytes; - @CsvBindByName(column = "grpThreads") - private String grpThreads; - @CsvBindByName(column = "allThreads") - private String allThreads; - @CsvBindByName(column = "URL") - private String url; - @CsvBindByName(column = "Latency") - private String latency; - @CsvBindByName(column = "IdleTime") - private String idleTime; - @CsvBindByName(column = "Connect") - private String connect; - - - public String getTimestamp() { - return timestamp; - } - - public void setTimestamp(String timestamp) { - this.timestamp = timestamp; - } - - public String getElapsed() { - return elapsed; - } - - public void setElapsed(String elapsed) { - this.elapsed = elapsed; - } - - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getResponseCode() { - return responseCode; - } - - public void setResponseCode(String responseCode) { - this.responseCode = responseCode; - } - - public String getResponseMessage() { - return responseMessage; - } - - public void setResponseMessage(String responseMessage) { - this.responseMessage = responseMessage; - } - - public String getThreadName() { - return threadName; - } - - public void setThreadName(String threadName) { - this.threadName = threadName; - } - - public String getDataType() { - return dataType; - } - - public void setDataType(String dataType) { - this.dataType = dataType; - } - - public String getSuccess() { - return success; - } - - public void setSuccess(String success) { - this.success = success; - } - - public String getFailureMessage() { - return failureMessage; - } - - public void setFailureMessage(String failureMessage) { - this.failureMessage = failureMessage; - } - - public String getBytes() { - return bytes; - } - - public void setBytes(String bytes) { - this.bytes = bytes; - } - - public String getSentBytes() { - return sentBytes; - } - - public void setSentBytes(String sentBytes) { - this.sentBytes = sentBytes; - } - - public String getGrpThreads() { - return grpThreads; - } - - public void setGrpThreads(String grpThreads) { - this.grpThreads = grpThreads; - } - - public String getAllThreads() { - return allThreads; - } - - public void setAllThreads(String allThreads) { - this.allThreads = allThreads; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getLatency() { - return latency; - } - - public void setLatency(String latency) { - this.latency = latency; - } - - public String getIdleTime() { - return idleTime; - } - - public void setIdleTime(String idleTime) { - this.idleTime = idleTime; - } - - public String getConnect() { - return connect; - } - - public void setConnect(String connect) { - this.connect = connect; - } -} diff --git a/backend/src/test/java/io/metersphere/ReportContentTests.java b/backend/src/test/java/io/metersphere/ReportContentTests.java deleted file mode 100644 index bac9afcd74..0000000000 --- a/backend/src/test/java/io/metersphere/ReportContentTests.java +++ /dev/null @@ -1,61 +0,0 @@ -package io.metersphere; - -import com.opencsv.bean.CsvToBean; -import com.opencsv.bean.CsvToBeanBuilder; -import com.opencsv.bean.HeaderColumnNameMappingStrategy; -import io.metersphere.base.domain.LoadTestReportDetail; -import io.metersphere.base.domain.LoadTestReportWithBLOBs; -import io.metersphere.base.mapper.LoadTestReportDetailMapper; -import io.metersphere.base.mapper.LoadTestReportMapper; -import io.metersphere.report.base.Metric; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; - -import javax.annotation.Resource; -import java.io.Reader; -import java.io.StringReader; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class ReportContentTests { - @Resource - private LoadTestReportDetailMapper loadTestReportDetailMapper; - @Resource - private LoadTestReportMapper loadTestReportMapper; - - @Test - public void test1() { - String reportId = "ba972086-7d74-4f58-99b0-9c014114fd99"; - LoadTestReportDetail loadTestReportDetail = loadTestReportDetailMapper.selectByPrimaryKey(reportId); - LoadTestReportWithBLOBs loadTestReportWithBLOBs = loadTestReportMapper.selectByPrimaryKey(reportId); - - HeaderColumnNameMappingStrategy ms = new HeaderColumnNameMappingStrategy<>(); - ms.setType(Metric.class); - try (Reader reader = new StringReader(loadTestReportDetail.getContent())) { - CsvToBean cb = new CsvToBeanBuilder(reader) - .withType(Metric.class) - .withSkipLines(0) - .withMappingStrategy(ms) - .withIgnoreLeadingWhiteSpace(true) - .build(); - System.out.println(cb.parse().size()); - - } catch (Exception ex) { - ex.printStackTrace(); - } - try (Reader reader = new StringReader(loadTestReportWithBLOBs.getContent())) { - CsvToBean cb = new CsvToBeanBuilder(reader) - .withType(Metric.class) - .withSkipLines(0) - .withMappingStrategy(ms) - .withIgnoreLeadingWhiteSpace(true) - .build(); - System.out.println(cb.parse().size()); - - } catch (Exception ex) { - ex.printStackTrace(); - } - } -} From ae6f7b8e715bf61fa6b50f588b6037e102d6962b Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 30 Apr 2020 11:04:37 +0800 Subject: [PATCH 23/31] properties --- backend/pom.xml | 6 ++++ .../metersphere/config/JmeterProperties.java | 2 +- .../src/main/resources/application.properties | 29 ++++++++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 011c51a609..10ee9e77ab 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -39,6 +39,12 @@ + + org.springframework.boot + spring-boot-configuration-processor + true + + org.springframework.boot spring-boot-starter diff --git a/backend/src/main/java/io/metersphere/config/JmeterProperties.java b/backend/src/main/java/io/metersphere/config/JmeterProperties.java index fa49d34ed6..5621c4c247 100644 --- a/backend/src/main/java/io/metersphere/config/JmeterProperties.java +++ b/backend/src/main/java/io/metersphere/config/JmeterProperties.java @@ -8,7 +8,7 @@ public class JmeterProperties { public static final String JMETER_PREFIX = "jmeter"; - private String image = "registry.fit2cloud.com/metersphere/jmeter-master:0.0.3"; + private String image; public String getImage() { return image; diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 728e362036..5488751529 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -36,4 +36,31 @@ spring.flyway.baseline-version=0 spring.flyway.encoding=UTF-8 spring.flyway.validate-on-migrate=false -spring.messages.basename=i18n/messages \ No newline at end of file +spring.messages.basename=i18n/messages + +# kafka +kafka.acks=1 +kafka.fields= +kafka.timestamp=yyyy-MM-dd'T'HH:mm:ss.SSSZZ +kafka.sample-filter= +kafka.test-mode=info +kafka.parse-all-req-headers=false +kafka.parse-all-res-headers=false +kafka.compression-type= +kafka.batch-size=16384 +kafka.client-id=JMeterKafkaBackendListener +kafka.connections-max-idle-ms=180000 +kafka.ssl.enabled=false +kafka.ssl.key-password= +kafka.ssl.keystore-location= +kafka.ssl.keystore-password= +kafka.ssl.truststore-location= +kafka.ssl.truststore-password= +kafka.ssl.enabled-protocols=TLSv1.2,TLSv1.1,TLSv1 +kafka.ssl.keystore-type=JKS +kafka.ssl.protocol=TLS +kafka.ssl.provider= +kafka.ssl.truststore-type= + +# jmeter +jmeter.image=registry.fit2cloud.com/metersphere/jmeter-master:0.0.4 \ No newline at end of file From d051b50513cdf1130c4f4ff083e74fc6e2dfc835 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 30 Apr 2020 11:29:13 +0800 Subject: [PATCH 24/31] nothing --- backend/src/main/java/io/metersphere/security/ShiroDBRealm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java b/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java index 74a468a7a4..639d7250ae 100644 --- a/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java +++ b/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java @@ -67,7 +67,7 @@ public class ShiroDBRealm extends AuthorizingRealm { UserDTO user = userService.getUserDTO(userId); String msg; if (user == null) { - msg = "not exist user is trying to login, user:" + userId; + msg = "The user does not exist: " + userId; logger.warn(msg); throw new UnknownAccountException(msg); } From 98878cd93655a8d408a2b5c6e5645978efd7a5e8 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 30 Apr 2020 14:39:11 +0800 Subject: [PATCH 25/31] bug fix --- .../io/metersphere/controller/LoginController.java | 4 ++-- .../io/metersphere/controller/UserController.java | 6 ++---- .../controller/WorkspaceController.java | 1 + .../metersphere/service/OrganizationService.java | 11 ++++++++++- .../java/io/metersphere/service/UserService.java | 6 +++++- .../io/metersphere/service/WorkspaceService.java | 14 ++++++++++++-- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/backend/src/main/java/io/metersphere/controller/LoginController.java b/backend/src/main/java/io/metersphere/controller/LoginController.java index 62b3e8656e..7846954ed9 100644 --- a/backend/src/main/java/io/metersphere/controller/LoginController.java +++ b/backend/src/main/java/io/metersphere/controller/LoginController.java @@ -54,10 +54,10 @@ public class LoginController { List org = userRoles.stream().filter(ur -> ur.getRoleId().startsWith("org")).collect(Collectors.toList()); if (test.size() > 0) { String wsId = test.get(0).getSourceId(); - userService.switchUserRole(user, "workspace", wsId); + userService.switchUserRole("workspace", wsId); } else if (org.size() > 0) { String orgId = org.get(0).getSourceId(); - userService.switchUserRole(user, "organization", orgId); + userService.switchUserRole("organization", orgId); } } // 返回 userDTO diff --git a/backend/src/main/java/io/metersphere/controller/UserController.java b/backend/src/main/java/io/metersphere/controller/UserController.java index 8fc38ecb06..5338a0ef39 100644 --- a/backend/src/main/java/io/metersphere/controller/UserController.java +++ b/backend/src/main/java/io/metersphere/controller/UserController.java @@ -129,16 +129,14 @@ public class UserController { @PostMapping("/switch/source/org/{sourceId}") @RequiresRoles(RoleConstants.ORG_ADMIN) public UserDTO switchOrganization(@PathVariable(value = "sourceId") String sourceId) { - UserDTO user = SessionUtils.getUser(); - userService.switchUserRole(user,"organization",sourceId); + userService.switchUserRole("organization",sourceId); return SessionUtils.getUser(); } @PostMapping("/switch/source/ws/{sourceId}") @RequiresRoles(value = {RoleConstants.TEST_MANAGER,RoleConstants.TEST_VIEWER,RoleConstants.TEST_USER}, logical = Logical.OR) public UserDTO switchWorkspace(@PathVariable(value = "sourceId") String sourceId) { - UserDTO user = SessionUtils.getUser(); - userService.switchUserRole(user, "workspace", sourceId); + userService.switchUserRole("workspace", sourceId); return SessionUtils.getUser(); } diff --git a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java index 45f02ff1ae..580013ed18 100644 --- a/backend/src/main/java/io/metersphere/controller/WorkspaceController.java +++ b/backend/src/main/java/io/metersphere/controller/WorkspaceController.java @@ -27,6 +27,7 @@ public class WorkspaceController { @PostMapping("add") @RequiresRoles(RoleConstants.ORG_ADMIN) public Workspace addWorkspace(@RequestBody Workspace workspace) { + workspaceService.checkWorkspaceOwnerByOrgAdmin(workspace.getId()); return workspaceService.saveWorkspace(workspace); } diff --git a/backend/src/main/java/io/metersphere/service/OrganizationService.java b/backend/src/main/java/io/metersphere/service/OrganizationService.java index 1be525c6ce..bc7c7b1e30 100644 --- a/backend/src/main/java/io/metersphere/service/OrganizationService.java +++ b/backend/src/main/java/io/metersphere/service/OrganizationService.java @@ -4,12 +4,14 @@ import io.metersphere.base.domain.*; import io.metersphere.base.mapper.OrganizationMapper; import io.metersphere.base.mapper.UserMapper; import io.metersphere.base.mapper.UserRoleMapper; +import io.metersphere.base.mapper.WorkspaceMapper; import io.metersphere.base.mapper.ext.ExtOrganizationMapper; import io.metersphere.base.mapper.ext.ExtUserRoleMapper; import io.metersphere.commons.constants.RoleConstants; import io.metersphere.commons.exception.MSException; import io.metersphere.controller.request.OrganizationRequest; import io.metersphere.dto.OrganizationMemberDTO; +import io.metersphere.dto.UserDTO; import io.metersphere.dto.UserRoleHelpDTO; import io.metersphere.i18n.Translator; import io.metersphere.user.SessionUser; @@ -39,6 +41,12 @@ public class OrganizationService { private UserMapper userMapper; @Resource private ExtOrganizationMapper extOrganizationMapper; + @Resource + private WorkspaceMapper workspaceMapper; + @Resource + private WorkspaceService workspaceService; + @Resource + private UserService userService; public Organization addOrganization(Organization organization) { long currentTimeMillis = System.currentTimeMillis(); @@ -123,7 +131,8 @@ public class OrganizationService { } public void checkOrgOwner(String organizationId) { - SessionUser user = SessionUtils.getUser(); + SessionUser sessionUser = SessionUtils.getUser(); + UserDTO user = userService.getUserDTO(sessionUser.getId()); List collect = user.getUserRoles().stream() .filter(ur -> RoleConstants.ORG_ADMIN.equals(ur.getRoleId())) .map(UserRole::getSourceId) diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index b14ef7aa24..acb0dcc975 100644 --- a/backend/src/main/java/io/metersphere/service/UserService.java +++ b/backend/src/main/java/io/metersphere/service/UserService.java @@ -128,7 +128,11 @@ public class UserService { userMapper.updateByPrimaryKeySelective(user); } - public void switchUserRole(UserDTO user, String sign, String sourceId) { + public void switchUserRole(String sign, String sourceId) { + SessionUser sessionUser = SessionUtils.getUser(); + // 获取最新UserDTO + UserDTO user = getUserDTO(sessionUser.getId()); + User newUser = new User(); if (StringUtils.equals("organization", sign)) { user.setLastOrganizationId(sourceId); diff --git a/backend/src/main/java/io/metersphere/service/WorkspaceService.java b/backend/src/main/java/io/metersphere/service/WorkspaceService.java index 79b1c1c894..9b4d79ac0a 100644 --- a/backend/src/main/java/io/metersphere/service/WorkspaceService.java +++ b/backend/src/main/java/io/metersphere/service/WorkspaceService.java @@ -1,6 +1,7 @@ package io.metersphere.service; import io.metersphere.base.domain.*; +import io.metersphere.base.mapper.ProjectMapper; import io.metersphere.base.mapper.UserMapper; import io.metersphere.base.mapper.UserRoleMapper; import io.metersphere.base.mapper.WorkspaceMapper; @@ -10,6 +11,7 @@ import io.metersphere.base.mapper.ext.ExtWorkspaceMapper; import io.metersphere.commons.constants.RoleConstants; import io.metersphere.commons.exception.MSException; import io.metersphere.controller.request.WorkspaceRequest; +import io.metersphere.dto.UserDTO; import io.metersphere.dto.UserRoleHelpDTO; import io.metersphere.dto.WorkspaceDTO; import io.metersphere.dto.WorkspaceMemberDTO; @@ -41,6 +43,12 @@ public class WorkspaceService { private UserMapper userMapper; @Resource private ExtOrganizationMapper extOrganizationMapper; + @Resource + private ProjectService projectService; + @Resource + private ProjectMapper projectMapper; + @Resource + private UserService userService; public Workspace saveWorkspace(Workspace workspace) { if (StringUtils.isBlank(workspace.getName())) { @@ -98,7 +106,8 @@ public class WorkspaceService { public void checkWorkspaceOwnerByOrgAdmin(String workspaceId) { checkWorkspaceIsExist(workspaceId); WorkspaceExample example = new WorkspaceExample(); - SessionUser user = SessionUtils.getUser(); + SessionUser sessionUser = SessionUtils.getUser(); + UserDTO user = userService.getUserDTO(sessionUser.getId()); List orgIds = user.getUserRoles().stream() .filter(ur -> RoleConstants.ORG_ADMIN.equals(ur.getRoleId())) .map(UserRole::getSourceId) @@ -114,7 +123,8 @@ public class WorkspaceService { public void checkWorkspaceOwner(String workspaceId) { checkWorkspaceIsExist(workspaceId); WorkspaceExample example = new WorkspaceExample(); - SessionUser user = SessionUtils.getUser(); + SessionUser sessionUser = SessionUtils.getUser(); + UserDTO user = userService.getUserDTO(sessionUser.getId()); List orgIds = user.getUserRoles().stream() .filter(ur -> RoleConstants.ORG_ADMIN.equals(ur.getRoleId())) .map(UserRole::getSourceId) From cec3af5062e13d1e4e41f9e998a6273078fb07b6 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 30 Apr 2020 15:18:18 +0800 Subject: [PATCH 26/31] =?UTF-8?q?=E9=80=89=E6=8B=A9=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E6=B1=A0=E5=8A=A0=E4=B8=8A=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/components/PerformancePressureConfig.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 6363dae7b5..68ae48c662 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -1,5 +1,5 @@