diff --git a/backend/.gitignore b/backend/.gitignore index 731f40bf3abe919c1748a6baedd6f4852f8709de..44cceecb40e7d964c74026c81082be1cb7cae0d9 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -26,6 +26,7 @@ yarn-error.log* src/main/resources/static src/main/resources/templates +src/test/ target .settings .project diff --git a/backend/pom.xml b/backend/pom.xml index 786bc1da9b29871073eaf8d9e02931e69aaa5897..75b67f5b2b46315975139cf342cd89e7a39ab6c8 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 @@ -60,6 +66,7 @@ org.projectlombok lombok + provided @@ -128,12 +135,6 @@ slf4j-simple - - com.opencsv - opencsv - 5.1 - - @@ -255,6 +256,11 @@ mysql-connector-java 5.1.41 + + com.itfsw + mybatis-generator-plugin + 1.3.8 + diff --git a/backend/src/main/java/io/metersphere/Application.java b/backend/src/main/java/io/metersphere/Application.java index 2527f9510730a4964179b4e46aef652b20c8e2c1..730b14804572e339941e5e94614ba9e38a70dbcc 100644 --- a/backend/src/main/java/io/metersphere/Application.java +++ b/backend/src/main/java/io/metersphere/Application.java @@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.web.servlet.ServletComponentScan; +import org.springframework.context.annotation.PropertySource; @SpringBootApplication(exclude = {QuartzAutoConfiguration.class}) @ServletComponentScan @@ -14,6 +15,7 @@ import org.springframework.boot.web.servlet.ServletComponentScan; KafkaProperties.class, JmeterProperties.class }) +@PropertySource(value = {"file:/opt/metersphere/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true) public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); diff --git a/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java new file mode 100644 index 0000000000000000000000000000000000000000..31f2e7771fa64beb72c3a47debe1faa42e8b739b --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/jmeter/APIBackendListenerClient.java @@ -0,0 +1,45 @@ +package io.metersphere.api.jmeter; + +import org.apache.jmeter.assertions.AssertionResult; +import org.apache.jmeter.samplers.SampleResult; +import org.apache.jmeter.visualizers.backend.AbstractBackendListenerClient; +import org.apache.jmeter.visualizers.backend.BackendListenerContext; + +import java.io.Serializable; +import java.util.List; +import java.util.concurrent.atomic.AtomicInteger; + +public class APIBackendListenerClient extends AbstractBackendListenerClient implements Serializable { + + private final AtomicInteger count = new AtomicInteger(); + + @Override + public void handleSampleResults(List sampleResults, BackendListenerContext context) { + System.out.println(context.getParameter("id")); + sampleResults.forEach(result -> { + for (AssertionResult assertionResult : result.getAssertionResults()) { + System.out.println(assertionResult.getName() + ": " + assertionResult.isError()); + System.out.println(assertionResult.getName() + ": " + assertionResult.isFailure()); + System.out.println(assertionResult.getName() + ": " + assertionResult.getFailureMessage()); + } + + println("getSampleLabel", result.getSampleLabel()); + println("getErrorCount", result.getErrorCount()); + println("getRequestHeaders", result.getRequestHeaders()); + println("getResponseHeaders", result.getResponseHeaders()); + println("getSampleLabel", result.getSampleLabel()); + println("getSampleLabel", result.getSampleLabel()); + println("getResponseCode", result.getResponseCode()); + println("getResponseCode size", result.getResponseData().length); + println("getLatency", result.getLatency()); + println("end - start", result.getEndTime() - result.getStartTime()); + println("getTimeStamp", result.getTimeStamp()); + println("getTime", result.getTime()); + }); + System.err.println(count.addAndGet(sampleResults.size())); + } + + private void println(String name, Object value) { + System.out.println(name + ": " + value); + } +} diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java new file mode 100644 index 0000000000000000000000000000000000000000..147ac67d167fa4dbbfa53cfec2487958a92c1271 --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -0,0 +1,35 @@ +package io.metersphere.api.jmeter; + +import io.metersphere.commons.exception.MSException; +import io.metersphere.i18n.Translator; +import org.apache.jmeter.save.SaveService; +import org.apache.jmeter.util.JMeterUtils; +import org.apache.jorphan.collections.HashTree; +import org.springframework.stereotype.Service; + +import java.io.InputStream; +import java.lang.reflect.Field; + +@Service +public class JMeterService { + + public void run(InputStream is) { + JMeterUtils.loadJMeterProperties("/Users/q4speed/Downloads/apache-jmeter-5.2.1/bin/jmeter.properties"); + JMeterUtils.setJMeterHome("/Users/q4speed/Downloads/apache-jmeter-5.2.1"); + try { + Object scriptWrapper = SaveService.loadElement(is); + HashTree testPlan = getHashTree(scriptWrapper); + + LocalRunner runner = new LocalRunner(testPlan); + runner.run(); + } catch (Exception e) { + MSException.throwException(Translator.get("api_load_script_error")); + } + } + + public HashTree getHashTree(Object scriptWrapper) throws Exception { + Field field = scriptWrapper.getClass().getDeclaredField("testPlan"); + field.setAccessible(true); + return (HashTree) field.get(scriptWrapper); + } +} diff --git a/backend/src/main/java/io/metersphere/api/jmeter/LocalRunner.java b/backend/src/main/java/io/metersphere/api/jmeter/LocalRunner.java new file mode 100644 index 0000000000000000000000000000000000000000..3db1bb7095e8c93036762d3a39db3549430a6a3c --- /dev/null +++ b/backend/src/main/java/io/metersphere/api/jmeter/LocalRunner.java @@ -0,0 +1,24 @@ +package io.metersphere.api.jmeter; + +import org.apache.jmeter.engine.JMeterEngine; +import org.apache.jmeter.engine.JMeterEngineException; +import org.apache.jmeter.engine.StandardJMeterEngine; +import org.apache.jorphan.collections.HashTree; + +public class LocalRunner { + private final HashTree jmxTree; + + public LocalRunner(HashTree jmxTree) { + this.jmxTree = jmxTree; + } + + public void run() { + JMeterEngine engine = new StandardJMeterEngine(); + engine.configure(jmxTree); + try { + engine.runTest(); + } catch (JMeterEngineException e) { + engine.stopTest(true); + } + } +} diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestService.java index 546d5343a7f978e4f92c51f552841a61242774d6..b4d1d0720c1eeee2353ee0b26c0d5cb809966ffa 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestService.java @@ -4,6 +4,7 @@ import io.metersphere.api.dto.APITestResult; import io.metersphere.api.dto.DeleteAPITestRequest; import io.metersphere.api.dto.QueryAPITestRequest; import io.metersphere.api.dto.SaveAPITestRequest; +import io.metersphere.api.jmeter.JMeterService; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.ApiTestFileMapper; import io.metersphere.base.mapper.ApiTestMapper; @@ -18,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.web.multipart.MultipartFile; +import java.io.IOException; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; @@ -36,6 +38,8 @@ public class ApiTestService { private ApiTestFileMapper apiTestFileMapper; @Resource private FileService fileService; + @Resource + private JMeterService jMeterService; public List list(QueryAPITestRequest request) { return extApiTestMapper.list(request); @@ -47,7 +51,7 @@ public class ApiTestService { } public String save(SaveAPITestRequest request, List files) { - if (files == null) { + if (files == null || files.isEmpty()) { throw new IllegalArgumentException(Translator.get("file_cannot_be_null")); } @@ -75,11 +79,26 @@ public class ApiTestService { } public void delete(DeleteAPITestRequest request) { + deleteFileByTestId(request.getId()); apiTestMapper.deleteByPrimaryKey(request.getId()); } public String run(SaveAPITestRequest request, List files) { - return save(request, files); + String id = save(request, files); + try { + changeStatus(request.getId(), APITestStatus.Running); + jMeterService.run(files.get(0).getInputStream()); + } catch (IOException e) { + MSException.throwException(Translator.get("api_load_script_error")); + } + return id; + } + + public void changeStatus(String id, APITestStatus status) { + ApiTestWithBLOBs apiTest = new ApiTestWithBLOBs(); + apiTest.setId(id); + apiTest.setStatus(status.name()); + apiTestMapper.updateByPrimaryKeySelective(apiTest); } private ApiTestWithBLOBs updateTest(SaveAPITestRequest request) { @@ -113,7 +132,7 @@ public class ApiTestService { return test; } - public void deleteFileByTestId(String testId) { + private void deleteFileByTestId(String testId) { ApiTestFileExample ApiTestFileExample = new ApiTestFileExample(); ApiTestFileExample.createCriteria().andTestIdEqualTo(testId); final List ApiTestFiles = apiTestFileMapper.selectByExample(ApiTestFileExample); @@ -121,9 +140,20 @@ public class ApiTestService { if (!CollectionUtils.isEmpty(ApiTestFiles)) { final List fileIds = ApiTestFiles.stream().map(ApiTestFile::getFileId).collect(Collectors.toList()); - fileService.deleteFileByIds(fileIds); } } + private ApiTestFile getFileByTestId(String testId) { + ApiTestFileExample ApiTestFileExample = new ApiTestFileExample(); + ApiTestFileExample.createCriteria().andTestIdEqualTo(testId); + final List ApiTestFiles = apiTestFileMapper.selectByExample(ApiTestFileExample); + apiTestFileMapper.selectByExample(ApiTestFileExample); + if (!CollectionUtils.isEmpty(ApiTestFiles)) { + return ApiTestFiles.get(0); + } else { + return null; + } + } + } diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTest.java b/backend/src/main/java/io/metersphere/base/domain/ApiTest.java index 0e38a14f5476144c0f95d7088ed83fec299e4da5..181e99a348492ae49626ee1dcfc042aa2a51c776 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTest.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTest.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTest implements Serializable { private String id; @@ -18,60 +21,4 @@ public class ApiTest implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java index 21722361768b6a2d146639606ce2c55baad7111c..f465702ba5d85992d9bc6efaf4491af65fe5328d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestFile.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTestFile implements Serializable { private String testId; private String fileId; private static final long serialVersionUID = 1L; - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java index 4f5813887010be1b3c763b4705be276a038e6ae0..87b1e7aebe1ac8ca890a033c9bd6d43e84eebe4c 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestReport.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class ApiTestReport implements Serializable { private String id; @@ -20,68 +23,4 @@ public class ApiTestReport implements Serializable { private String content; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getContent() { - return content; - } - - public void setContent(String content) { - this.content = content == null ? null : content.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java index 8e9bb95b4a8601441da57e9d1824f6dc3c6787b9..04d3109a696a3c3483176d9e54793a1984b94411 100644 --- a/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/ApiTestWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class ApiTestWithBLOBs extends ApiTest implements Serializable { private String scenarioDefinition; private String schedule; private static final long serialVersionUID = 1L; - - public String getScenarioDefinition() { - return scenarioDefinition; - } - - public void setScenarioDefinition(String scenarioDefinition) { - this.scenarioDefinition = scenarioDefinition == null ? null : scenarioDefinition.trim(); - } - - public String getSchedule() { - return schedule; - } - - public void setSchedule(String schedule) { - this.schedule = schedule == null ? null : schedule.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FileContent.java b/backend/src/main/java/io/metersphere/base/domain/FileContent.java index 3efd1137345180e4a014e64790fa6c981aefb74a..a693730050607d9d2caf30f89731edad45147a47 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileContent.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileContent.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class FileContent implements Serializable { private String fileId; private byte[] file; private static final long serialVersionUID = 1L; - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } - - public byte[] getFile() { - return file; - } - - public void setFile(byte[] file) { - this.file = file; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java index 29792982fd01c494116bd3599ab1a452bcd472af..ee799a3fc45fd11d9447ef43657ddb77f462fc3a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java +++ b/backend/src/main/java/io/metersphere/base/domain/FileMetadata.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class FileMetadata implements Serializable { private String id; @@ -16,52 +19,4 @@ public class FileMetadata implements Serializable { private Long size; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public Long getSize() { - return size; - } - - public void setSize(Long size) { - this.size = size; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTest.java b/backend/src/main/java/io/metersphere/base/domain/LoadTest.java index 0bf8f560156e2044117f864c22cfc93525fbd180..8c8c89a1a641f8fc1b33f0dc71d1580a4d5a3b75 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTest.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTest.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTest implements Serializable { private String id; @@ -20,68 +23,4 @@ public class LoadTest implements Serializable { private String testResourcePoolId; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getTestResourcePoolId() { - return testResourcePoolId; - } - - public void setTestResourcePoolId(String testResourcePoolId) { - this.testResourcePoolId = testResourcePoolId == null ? null : testResourcePoolId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java index cc243ec086cbce3b89d0ddc9106bf81bade5635d..0fc212656ec79ea5834999f296c0544f776e9516 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestFile.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestFile implements Serializable { private String testId; private String fileId; private static final long serialVersionUID = 1L; - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getFileId() { - return fileId; - } - - public void setFileId(String fileId) { - this.fileId = fileId == null ? null : fileId.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java index 4b5a36376fa16465b4ddf4dca1b645cd3295a503..c0d76f67ce359e895ffed705d95c4e15e9637fb7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReport.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReport implements Serializable { private String id; @@ -16,52 +19,4 @@ public class LoadTestReport implements Serializable { private String status; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestId() { - return testId; - } - - public void setTestId(String testId) { - this.testId = testId == null ? null : testId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java index 80425ac5254bd4cd45a66b3daccf6ce9fc7a9160..442ce74b061d24b808655f2e8aa87c20a735de28 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportDetail.java @@ -1,27 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportDetail 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/LoadTestReportLog.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java index 5f49329f18d0811606493cbbc8c01b2c42067cc7..6221094d72fec04b29b5165da0c5b4e15808b820 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportLog.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportLog implements Serializable { private Long id; @@ -12,36 +15,4 @@ public class LoadTestReportLog implements Serializable { private String content; private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId == null ? null : reportId.trim(); - } - - public String getResourceId() { - return resourceId; - } - - public void setResourceId(String resourceId) { - this.resourceId = resourceId == null ? null : resourceId.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/LoadTestReportResult.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java index 65c62c6e6b847de071c15c409984f7994a35d21e..f22100b7250624b15d1493ff3973fd993b598677 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportResult.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class LoadTestReportResult implements Serializable { private Long id; @@ -12,36 +15,4 @@ public class LoadTestReportResult implements Serializable { private String reportValue; private static final long serialVersionUID = 1L; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getReportId() { - return reportId; - } - - public void setReportId(String reportId) { - this.reportId = reportId == null ? null : reportId.trim(); - } - - public String getReportKey() { - return reportKey; - } - - public void setReportKey(String reportKey) { - this.reportKey = reportKey == null ? null : reportKey.trim(); - } - - public String getReportValue() { - return reportValue; - } - - public void setReportValue(String reportValue) { - this.reportValue = reportValue == null ? null : reportValue.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java index bb63601231c73436e099e28cde8ea8f6b79c6e16..3e8d33d570f8523b7e6bebaa50b5080dbc22c59d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestReportWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class LoadTestReportWithBLOBs extends LoadTestReport implements Serializable { private String description; private String content; private static final long serialVersionUID = 1L; - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.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/LoadTestWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java index 70b0a75b921c01048f8e78a72109941a40e7f7dd..7af18545e12ec3c4f9ddd04def1c00b5f6fce87d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/LoadTestWithBLOBs.java @@ -1,7 +1,14 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class LoadTestWithBLOBs extends LoadTest implements Serializable { private String loadConfiguration; @@ -10,28 +17,4 @@ public class LoadTestWithBLOBs extends LoadTest implements Serializable { private String schedule; private static final long serialVersionUID = 1L; - - public String getLoadConfiguration() { - return loadConfiguration; - } - - public void setLoadConfiguration(String loadConfiguration) { - this.loadConfiguration = loadConfiguration == null ? null : loadConfiguration.trim(); - } - - public String getAdvancedConfiguration() { - return advancedConfiguration; - } - - public void setAdvancedConfiguration(String advancedConfiguration) { - this.advancedConfiguration = advancedConfiguration == null ? null : advancedConfiguration.trim(); - } - - public String getSchedule() { - return schedule; - } - - public void setSchedule(String schedule) { - this.schedule = schedule == null ? null : schedule.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Organization.java b/backend/src/main/java/io/metersphere/base/domain/Organization.java index e792ed3c8900831decbef7c54abf44e0c49040e5..cfc5ae3a739ee6590169debbd825e3c73fdaeeb5 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Organization.java +++ b/backend/src/main/java/io/metersphere/base/domain/Organization.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Organization implements Serializable { private String id; @@ -14,44 +17,4 @@ public class Organization implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Project.java b/backend/src/main/java/io/metersphere/base/domain/Project.java index 4d6a8f8ad4e1c7ffcc1d74c93d3cf4d4f1925b54..f1af671f4e8b719af137ce57f469b6d1197b6b40 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Project.java +++ b/backend/src/main/java/io/metersphere/base/domain/Project.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Project implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Project implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId == null ? null : workspaceId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Role.java b/backend/src/main/java/io/metersphere/base/domain/Role.java index 3a44d8b1d29c288233aeacac5686ff3f3dc6ac43..b2ecae0b96ee49bb0190368e31aa5206682ab4f0 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Role.java +++ b/backend/src/main/java/io/metersphere/base/domain/Role.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Role implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Role implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java b/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java index 6c71ccead2bc8b7beea12f6c336038c9185a0e7b..719d7c1a73a6ca2cd2c77115e2956deadc3e91db 100644 --- a/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java +++ b/backend/src/main/java/io/metersphere/base/domain/SystemParameter.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class SystemParameter implements Serializable { private String paramKey; @@ -12,36 +15,4 @@ public class SystemParameter implements Serializable { private Integer sort; private static final long serialVersionUID = 1L; - - public String getParamKey() { - return paramKey; - } - - public void setParamKey(String paramKey) { - this.paramKey = paramKey == null ? null : paramKey.trim(); - } - - public String getParamValue() { - return paramValue; - } - - public void setParamValue(String paramValue) { - this.paramValue = paramValue == null ? null : paramValue.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public Integer getSort() { - return sort; - } - - public void setSort(Integer sort) { - this.sort = sort; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestCase.java index f78dbe1335cba93353b2cb6dd48a4a8d12f037cd..121b99d8cae33bcc99114b6f57ec0b16741a8ac9 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCase.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCase implements Serializable { private String id; @@ -28,100 +31,4 @@ public class TestCase implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public Integer getNodeId() { - return nodeId; - } - - public void setNodeId(Integer nodeId) { - this.nodeId = nodeId; - } - - public String getNodePath() { - return nodePath; - } - - public void setNodePath(String nodePath) { - this.nodePath = nodePath == null ? null : nodePath.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public String getMaintainer() { - return maintainer; - } - - public void setMaintainer(String maintainer) { - this.maintainer = maintainer == null ? null : maintainer.trim(); - } - - public String getPriority() { - return priority; - } - - public void setPriority(String priority) { - this.priority = priority == null ? null : priority.trim(); - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method == null ? null : method.trim(); - } - - public String getPrerequisite() { - return prerequisite; - } - - public void setPrerequisite(String prerequisite) { - this.prerequisite = prerequisite == null ? null : prerequisite.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java index 1c4b3703258da5bd23426f9c735e899b7427ff20..6237c938e4454cbed548b6e78c8d4a82e7595490 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseNode.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestCaseNode implements Serializable { private Integer id; @@ -18,60 +21,4 @@ public class TestCaseNode implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public Integer getpId() { - return pId; - } - - public void setpId(Integer pId) { - this.pId = pId; - } - - public Integer getLevel() { - return level; - } - - public void setLevel(Integer level) { - this.level = level; - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java index af1f0705ca72746a12c275d3d9cef4a78d7534a2..652ca712e873ddd53fcf5cf61fc0b7e5ae605f58 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReport.java @@ -1,7 +1,9 @@ package io.metersphere.base.domain; import java.io.Serializable; +import lombok.Data; +@Data public class TestCaseReport implements Serializable { private Long id; @@ -16,52 +18,4 @@ public class TestCaseReport implements Serializable { 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 Long getStartTime() { - return startTime; - } - - public void setStartTime(Long startTime) { - this.startTime = startTime; - } - - public Long getEndTime() { - return endTime; - } - - public void setEndTime(Long endTime) { - this.endTime = endTime; - } - - 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/TestCaseReportTemplate.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java index 9075abecf768e33881cb81190e1d9616555b253d..d60cb2dcad698c0ffa84b88de78bbff575e6a030 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseReportTemplate.java @@ -1,7 +1,9 @@ package io.metersphere.base.domain; import java.io.Serializable; +import lombok.Data; +@Data public class TestCaseReportTemplate implements Serializable { private Long id; @@ -16,52 +18,4 @@ public class TestCaseReportTemplate implements Serializable { 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 Long getStartTime() { - return startTime; - } - - public void setStartTime(Long startTime) { - this.startTime = startTime; - } - - public Long getEndTime() { - return endTime; - } - - public void setEndTime(Long endTime) { - this.endTime = endTime; - } - - 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/TestCaseWithBLOBs.java b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java index df325d67b2e65824fd2cc8c298b270bb0d737e63..a07a2e6285025a937b5d07e571488f508d2d3ec9 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestCaseWithBLOBs.java @@ -1,27 +1,18 @@ package io.metersphere.base.domain; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.io.Serializable; +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) public class TestCaseWithBLOBs extends TestCase implements Serializable { private String remark; private String steps; private static final long serialVersionUID = 1L; - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public String getSteps() { - return steps; - } - - public void setSteps(String steps) { - this.steps = steps == null ? null : steps.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java index e19aeba2b9c62304202965b8c5f3c2f6ee3c7221..c968eff1cf5cd866868d53f78e2184697df2888d 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlan.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlan.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestPlan implements Serializable { private String id; @@ -30,108 +33,4 @@ public class TestPlan implements Serializable { private String tags; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getProjectId() { - return projectId; - } - - public void setProjectId(String projectId) { - this.projectId = projectId == null ? null : projectId.trim(); - } - - public String getWorkspaceId() { - return workspaceId; - } - - public void setWorkspaceId(String workspaceId) { - this.workspaceId = workspaceId == null ? null : workspaceId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getStage() { - return stage; - } - - public void setStage(String stage) { - this.stage = stage == null ? null : stage.trim(); - } - - public String getPrincipal() { - return principal; - } - - public void setPrincipal(String principal) { - this.principal = principal == null ? null : principal.trim(); - } - - public String getTestCaseMatchRule() { - return testCaseMatchRule; - } - - public void setTestCaseMatchRule(String testCaseMatchRule) { - this.testCaseMatchRule = testCaseMatchRule == null ? null : testCaseMatchRule.trim(); - } - - public String getExecutorMatchRule() { - return executorMatchRule; - } - - public void setExecutorMatchRule(String executorMatchRule) { - this.executorMatchRule = executorMatchRule == null ? null : executorMatchRule.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getTags() { - return tags; - } - - public void setTags(String tags) { - this.tags = tags == null ? null : tags.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java index c1fe14991f62b9adfb8277b10ac338bb79c0e811..cc6851718fc52490f0bb269253a9379801e3c50a 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestPlanTestCase.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestPlanTestCase implements Serializable { private Integer id; @@ -22,76 +25,4 @@ public class TestPlanTestCase implements Serializable { private String results; private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPlanId() { - return planId; - } - - public void setPlanId(String planId) { - this.planId = planId == null ? null : planId.trim(); - } - - public String getCaseId() { - return caseId; - } - - public void setCaseId(String caseId) { - this.caseId = caseId == null ? null : caseId.trim(); - } - - public String getExecutor() { - return executor; - } - - public void setExecutor(String executor) { - this.executor = executor == null ? null : executor.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark == null ? null : remark.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getResults() { - return results; - } - - public void setResults(String results) { - this.results = results == null ? null : results.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestResource.java b/backend/src/main/java/io/metersphere/base/domain/TestResource.java index b20b15820e545af31e85b16fe0bcc60221452f80..89925a154a98bef9d094b99a7dbeb37e560d80da 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestResource.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestResource.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestResource implements Serializable { private String id; @@ -16,52 +19,4 @@ public class TestResource implements Serializable { private String configuration; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getTestResourcePoolId() { - return testResourcePoolId; - } - - public void setTestResourcePoolId(String testResourcePoolId) { - this.testResourcePoolId = testResourcePoolId == null ? null : testResourcePoolId.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getConfiguration() { - return configuration; - } - - public void setConfiguration(String configuration) { - this.configuration = configuration == null ? null : configuration.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java b/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java index c2eb38d5dab7d808694246c32b3fd74c75d28b62..de2a5800a1eba2000f103a1c1a49824fc15164f5 100644 --- a/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java +++ b/backend/src/main/java/io/metersphere/base/domain/TestResourcePool.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class TestResourcePool implements Serializable { private String id; @@ -18,60 +21,4 @@ public class TestResourcePool implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type == null ? null : type.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/User.java b/backend/src/main/java/io/metersphere/base/domain/User.java index d72db65c025a90e326dd62678bb20a6f47754591..2236965d7551f16ae323a386da7d55ad7043d565 100644 --- a/backend/src/main/java/io/metersphere/base/domain/User.java +++ b/backend/src/main/java/io/metersphere/base/domain/User.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class User implements Serializable { private String id; @@ -26,92 +29,4 @@ public class User implements Serializable { private String phone; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email == null ? null : email.trim(); - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password == null ? null : password.trim(); - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status == null ? null : status.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } - - public String getLanguage() { - return language; - } - - public void setLanguage(String language) { - this.language = language == null ? null : language.trim(); - } - - public String getLastWorkspaceId() { - return lastWorkspaceId; - } - - public void setLastWorkspaceId(String lastWorkspaceId) { - this.lastWorkspaceId = lastWorkspaceId == null ? null : lastWorkspaceId.trim(); - } - - public String getLastOrganizationId() { - return lastOrganizationId; - } - - public void setLastOrganizationId(String lastOrganizationId) { - this.lastOrganizationId = lastOrganizationId == null ? null : lastOrganizationId.trim(); - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone == null ? null : phone.trim(); - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/UserRole.java b/backend/src/main/java/io/metersphere/base/domain/UserRole.java index 7fad77029355ad2a58ca434c5d5d58c15ac55fe2..9b13531750cff28aae0d78e99a56545f4266a209 100644 --- a/backend/src/main/java/io/metersphere/base/domain/UserRole.java +++ b/backend/src/main/java/io/metersphere/base/domain/UserRole.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class UserRole implements Serializable { private String id; @@ -16,52 +19,4 @@ public class UserRole implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId == null ? null : userId.trim(); - } - - public String getRoleId() { - return roleId; - } - - public void setRoleId(String roleId) { - this.roleId = roleId == null ? null : roleId.trim(); - } - - public String getSourceId() { - return sourceId; - } - - public void setSourceId(String sourceId) { - this.sourceId = sourceId == null ? null : sourceId.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/Workspace.java b/backend/src/main/java/io/metersphere/base/domain/Workspace.java index f2d9b56ce5a75a375ad9ed695630aba4e40fa0f9..f7a881792315f14caeb227a5661b7278240386b7 100644 --- a/backend/src/main/java/io/metersphere/base/domain/Workspace.java +++ b/backend/src/main/java/io/metersphere/base/domain/Workspace.java @@ -1,7 +1,10 @@ package io.metersphere.base.domain; +import lombok.Data; + import java.io.Serializable; +@Data public class Workspace implements Serializable { private String id; @@ -16,52 +19,4 @@ public class Workspace implements Serializable { private Long updateTime; private static final long serialVersionUID = 1L; - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id == null ? null : id.trim(); - } - - public String getOrganizationId() { - return organizationId; - } - - public void setOrganizationId(String organizationId) { - this.organizationId = organizationId == null ? null : organizationId.trim(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name == null ? null : name.trim(); - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description == null ? null : description.trim(); - } - - public Long getCreateTime() { - return createTime; - } - - public void setCreateTime(Long createTime) { - this.createTime = createTime; - } - - public Long getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Long updateTime) { - this.updateTime = updateTime; - } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml index 23b4d55cab226154c198a9c61294e84796236c62..e6b29932c672a4564f3e760b02618436161e3a3e 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/TestCaseNodeMapper.xml @@ -102,22 +102,19 @@ - - SELECT LAST_INSERT_ID() - - insert into test_case_node (project_id, name, p_id, - level, create_time, update_time - ) - values (#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pId,jdbcType=INTEGER}, - #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT} - ) + insert into test_case_node (id, project_id, name, + p_id, level, create_time, + update_time) + values (#{id,jdbcType=INTEGER}, #{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, + #{pId,jdbcType=INTEGER}, #{level,jdbcType=INTEGER}, #{createTime,jdbcType=BIGINT}, + #{updateTime,jdbcType=BIGINT}) - - SELECT LAST_INSERT_ID() - insert into test_case_node + + id, + project_id, @@ -138,6 +135,9 @@ + + #{id,jdbcType=INTEGER}, + #{projectId,jdbcType=VARCHAR}, diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.java b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.java deleted file mode 100644 index 17877364f20a0a3c6573d2f5f123b7e7d3ac0ab5..0000000000000000000000000000000000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.java +++ /dev/null @@ -1,13 +0,0 @@ -package io.metersphere.base.mapper.ext; - -import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest; -import io.metersphere.dto.TestResourcePoolDTO; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ExtTestReourcePoolMapper { - List listResourcePools(@Param("request") QueryResourcePoolRequest request); - -// List listResourcesByPoolId(@Param("poolId") String poolId); -} diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.xml deleted file mode 100644 index f6b84f52bb8077505b6299f54274939f991ed2e8..0000000000000000000000000000000000000000 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReourcePoolMapper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/commons/utils/MybatisInterceptorConfig.java b/backend/src/main/java/io/metersphere/commons/utils/MybatisInterceptorConfig.java index 27dc39450174db0fbbacf389ea8bc8c56f4dc9cb..47979d7586f07c9c47435cfcbaa7b1c5e10949d1 100644 --- a/backend/src/main/java/io/metersphere/commons/utils/MybatisInterceptorConfig.java +++ b/backend/src/main/java/io/metersphere/commons/utils/MybatisInterceptorConfig.java @@ -1,5 +1,10 @@ package io.metersphere.commons.utils; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter public class MybatisInterceptorConfig { private String modelName; private String attrName; @@ -9,7 +14,6 @@ public class MybatisInterceptorConfig { private String undoClass; private String undoMethod; - public MybatisInterceptorConfig() { } @@ -17,100 +21,25 @@ public class MybatisInterceptorConfig { * 用时需谨慎!!!!! * 主要配置多个的时候,参数少一点 * - * @param modelName + * @param modelClass * @param attrName */ - public MybatisInterceptorConfig(String modelName, String attrName) { - this.modelName = modelName; + public MybatisInterceptorConfig(Class modelClass, String attrName) { + this.modelName = modelClass.getName(); this.attrName = attrName; - this.interceptorClass = "io.metersphere.commons.utils.EncryptUtils"; + this.interceptorClass = EncryptUtils.class.getName(); this.interceptorMethod = "aesEncrypt"; - this.undoClass = "io.metersphere.commons.utils.EncryptUtils"; + this.undoClass = EncryptUtils.class.getName(); this.undoMethod = "aesDecrypt"; } - public MybatisInterceptorConfig(String modelName, String attrName, String attrNameForList) { - this.modelName = modelName; - this.attrName = attrName; - this.attrNameForList = attrNameForList; - this.interceptorClass = "io.metersphere.commons.utils.EncryptUtils"; - this.interceptorMethod = "aesEncrypt"; - this.undoClass = "io.metersphere.commons.utils.EncryptUtils"; - this.undoMethod = "aesDecrypt"; - } - - public MybatisInterceptorConfig(String modelName, String attrName, String interceptorClass, String interceptorMethod, String undoMethod) { - this.modelName = modelName; - this.attrName = attrName; - this.interceptorClass = interceptorClass; - this.interceptorMethod = interceptorMethod; - this.undoClass = interceptorClass; - this.undoMethod = undoMethod; - } - - public MybatisInterceptorConfig(String modelName, String attrName, String attrNameForList, String interceptorClass, String interceptorMethod, String undoMethod) { - this.modelName = modelName; - this.attrName = attrName; - this.attrNameForList = attrNameForList; - this.interceptorClass = interceptorClass; - this.interceptorMethod = interceptorMethod; - this.undoClass = interceptorClass; - this.undoMethod = undoMethod; - } - - public String getModelName() { - return modelName; - } - - public void setModelName(String modelName) { - this.modelName = modelName; - } - - public String getAttrName() { - return attrName; - } - - public void setAttrName(String attrName) { + public MybatisInterceptorConfig(Class modelClass, String attrName, Class interceptorClass, String interceptorMethod, String undoMethod) { + this.modelName = modelClass.getName(); this.attrName = attrName; - } - - public String getAttrNameForList() { - return attrNameForList; - } - - public void setAttrNameForList(String attrNameForList) { - this.attrNameForList = attrNameForList; - } - - public String getInterceptorMethod() { - return interceptorMethod; - } - - public void setInterceptorMethod(String interceptorMethod) { + this.interceptorClass = interceptorClass.getName(); this.interceptorMethod = interceptorMethod; - } - - public String getUndoMethod() { - return undoMethod; - } - - public void setUndoMethod(String undoMethod) { + this.undoClass = interceptorClass.getName(); this.undoMethod = undoMethod; } - public String getInterceptorClass() { - return interceptorClass; - } - - public void setInterceptorClass(String interceptorClass) { - this.interceptorClass = interceptorClass; - } - - public String getUndoClass() { - return undoClass; - } - - public void setUndoClass(String undoClass) { - this.undoClass = undoClass; - } } diff --git a/backend/src/main/java/io/metersphere/config/JmeterProperties.java b/backend/src/main/java/io/metersphere/config/JmeterProperties.java index fa49d34ed6ac259d1257a3e9dfd56f991f2d74e5..5621c4c24731188d1b807d94d91da3107dbd1d2a 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/java/io/metersphere/config/MybatisConfig.java b/backend/src/main/java/io/metersphere/config/MybatisConfig.java index b881f98eca406091502d46217c39b4068efdaa60..0d8b6eba2120c53408fb459bd90d339501297ed5 100644 --- a/backend/src/main/java/io/metersphere/config/MybatisConfig.java +++ b/backend/src/main/java/io/metersphere/config/MybatisConfig.java @@ -1,13 +1,15 @@ package io.metersphere.config; import com.github.pagehelper.PageInterceptor; +import io.metersphere.base.domain.FileContent; +import io.metersphere.base.domain.TestResource; +import io.metersphere.commons.utils.CompressUtils; import io.metersphere.commons.utils.MybatisInterceptorConfig; import io.metersphere.interceptor.MybatisInterceptor; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.PropertySource; import org.springframework.transaction.annotation.EnableTransactionManagement; import java.util.ArrayList; @@ -17,7 +19,6 @@ import java.util.Properties; @Configuration @MapperScan(basePackages = "io.metersphere.base.mapper", sqlSessionFactoryRef = "sqlSessionFactory") @EnableTransactionManagement -@PropertySource(value = {"file:/opt/fit2cloud/conf/metersphere.properties"}, encoding = "UTF-8", ignoreResourceNotFound = true) public class MybatisConfig { @Bean @@ -39,7 +40,8 @@ public class MybatisConfig { public MybatisInterceptor dbInterceptor() { MybatisInterceptor interceptor = new MybatisInterceptor(); List configList = new ArrayList<>(); - configList.add(new MybatisInterceptorConfig("io.metersphere.base.domain.FileContent", "file", "io.metersphere.commons.utils.CompressUtils", "zip", "unzip")); + configList.add(new MybatisInterceptorConfig(FileContent.class, "file", CompressUtils.class, "zip", "unzip")); + configList.add(new MybatisInterceptorConfig(TestResource.class, "configuration")); interceptor.setInterceptorConfigList(configList); return interceptor; } diff --git a/backend/src/main/java/io/metersphere/controller/LoginController.java b/backend/src/main/java/io/metersphere/controller/LoginController.java index 62b3e8656e2e9f29d891eb8c3b9e4ab59153e40a..7846954ed9760b7c110ce127822798d95ceb0588 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 8fc38ecb06d4537e67d132a1c9a9d2f889a6b1e5..5338a0ef39b6222a8a7646cdcefd94143666dad9 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 45f02ff1aece9172d4102409a526c13d61d3eb64..580013ed186d86b1db223a22a9b29bc9b7c2d198 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/report/base/ChartsData.java b/backend/src/main/java/io/metersphere/report/base/ChartsData.java index 617c45343cad95515694fe9d855d184873874e7c..f6450973d527a7b90897ca625b1c5e796b4f1bd9 100644 --- a/backend/src/main/java/io/metersphere/report/base/ChartsData.java +++ b/backend/src/main/java/io/metersphere/report/base/ChartsData.java @@ -1,7 +1,10 @@ package io.metersphere.report.base; +import lombok.Data; + import java.math.BigDecimal; +@Data public class ChartsData { /** @@ -52,20 +55,4 @@ public class ChartsData { public void setyAxis2(BigDecimal yAxis2) { this.yAxis2 = yAxis2; } - - public String getGroupName() { - return groupName; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } } diff --git a/backend/src/main/java/io/metersphere/report/base/Errors.java b/backend/src/main/java/io/metersphere/report/base/Errors.java index 1476036a8c39d7f6b333206cd79af6f58a87bdf2..41478c1b1ecf73ba571e8f5ca8fa768b8300c56a 100644 --- a/backend/src/main/java/io/metersphere/report/base/Errors.java +++ b/backend/src/main/java/io/metersphere/report/base/Errors.java @@ -1,41 +1,13 @@ package io.metersphere.report.base; +import lombok.Data; + +@Data public class Errors { private String errorType; private String errorNumber; - private String precentOfErrors; - private String precentOfAllSamples; - - public String getErrorType() { - return errorType; - } - - public void setErrorType(String errorType) { - this.errorType = errorType; - } - - public String getErrorNumber() { - return errorNumber; - } - - public void setErrorNumber(String errorNumber) { - this.errorNumber = errorNumber; - } - - public String getPrecentOfErrors() { - return precentOfErrors; - } - - public void setPrecentOfErrors(String precentOfErrors) { - this.precentOfErrors = precentOfErrors; - } - - public String getPrecentOfAllSamples() { - return precentOfAllSamples; - } + private String percentOfErrors; + private String percentOfAllSamples; - public void setPrecentOfAllSamples(String precentOfAllSamples) { - this.precentOfAllSamples = precentOfAllSamples; - } } diff --git a/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java b/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java index 9e3ac456c52ad50e3b8444f1df56ed5ee4ce50ca..129529acd67555918bf4e91aaef3c19ab2112be3 100644 --- a/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java +++ b/backend/src/main/java/io/metersphere/report/base/ErrorsTop5.java @@ -1,5 +1,8 @@ package io.metersphere.report.base; +import lombok.Data; + +@Data public class ErrorsTop5 { private String sample; @@ -16,107 +19,4 @@ public class ErrorsTop5 { private String error5; private String error5Size; - public String getSample() { - return sample; - } - - public void setSample(String sample) { - this.sample = sample; - } - - public String getSamples() { - return samples; - } - - public void setSamples(String samples) { - this.samples = samples; - } - - public String getErrorsAllSize() { - return errorsAllSize; - } - - public void setErrorsAllSize(String errorsAllSize) { - this.errorsAllSize = errorsAllSize; - } - - public String getError1() { - return error1; - } - - public void setError1(String error1) { - this.error1 = error1; - } - - public String getError1Size() { - return error1Size; - } - - public void setError1Size(String error1Size) { - this.error1Size = error1Size; - } - - public String getError2() { - return error2; - } - - public void setError2(String error2) { - this.error2 = error2; - } - - public String getError2Size() { - return error2Size; - } - - public void setError2Size(String error2Size) { - this.error2Size = error2Size; - } - - public String getError3() { - return error3; - } - - public void setError3(String error3) { - this.error3 = error3; - } - - public String getError3Size() { - return error3Size; - } - - public void setError3Size(String error3Size) { - this.error3Size = error3Size; - } - - public String getError4() { - return error4; - } - - public void setError4(String error4) { - this.error4 = error4; - } - - public String getError4Size() { - return error4Size; - } - - public void setError4Size(String error4Size) { - this.error4Size = error4Size; - } - - public String getError5() { - return error5; - } - - public void setError5(String error5) { - this.error5 = error5; - } - - public String getError5Size() { - return error5Size; - } - - public void setError5Size(String error5Size) { - this.error5Size = error5Size; - } } 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 69ad56d1c959d32e214772d9b59f5704dee96826..0000000000000000000000000000000000000000 --- 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/main/java/io/metersphere/report/base/ReportTimeInfo.java b/backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java index ecb9e587af5f6273b3dd26d9cf7da27c430257b2..72e71cb6a6ca81fe60188d7d1dc715b12757fca3 100644 --- a/backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java +++ b/backend/src/main/java/io/metersphere/report/base/ReportTimeInfo.java @@ -1,32 +1,12 @@ package io.metersphere.report.base; +import lombok.Data; + +@Data public class ReportTimeInfo { private String duration; private String startTime; private String endTime; - public String getDuration() { - return duration; - } - - public void setDuration(String duration) { - this.duration = duration; - } - - public String getStartTime() { - return startTime; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public String getEndTime() { - return endTime; - } - - public void setEndTime(String endTime) { - this.endTime = endTime; - } } diff --git a/backend/src/main/java/io/metersphere/report/base/Statistics.java b/backend/src/main/java/io/metersphere/report/base/Statistics.java index 821b45d27064b13619e4a31dabf6cbc21a5607c4..336a9fea14d6887423172e2b6887cb115077c66e 100644 --- a/backend/src/main/java/io/metersphere/report/base/Statistics.java +++ b/backend/src/main/java/io/metersphere/report/base/Statistics.java @@ -1,5 +1,8 @@ package io.metersphere.report.base; +import lombok.Data; + +@Data public class Statistics { private String label; @@ -28,107 +31,4 @@ public class Statistics { private String sent; - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public String getSamples() { - return samples; - } - - public void setSamples(String samples) { - this.samples = samples; - } - - public String getKo() { - return ko; - } - - public void setKo(String ko) { - this.ko = ko; - } - - public String getError() { - return error; - } - - public void setError(String error) { - this.error = error; - } - - public String getAverage() { - return average; - } - - public void setAverage(String average) { - this.average = average; - } - - public String getMin() { - return min; - } - - public void setMin(String min) { - this.min = min; - } - - public String getMax() { - return max; - } - - public void setMax(String max) { - this.max = max; - } - - public String getTp90() { - return tp90; - } - - public void setTp90(String tp90) { - this.tp90 = tp90; - } - - public String getTp95() { - return tp95; - } - - public void setTp95(String tp95) { - this.tp95 = tp95; - } - - public String getTp99() { - return tp99; - } - - public void setTp99(String tp99) { - this.tp99 = tp99; - } - - public String getTransactions() { - return transactions; - } - - public void setTransactions(String transactions) { - this.transactions = transactions; - } - - public String getSent() { - return sent; - } - - public void setSent(String sent) { - this.sent = sent; - } - - public String getReceived() { - return received; - } - - public void setReceived(String received) { - this.received = received; - } } diff --git a/backend/src/main/java/io/metersphere/report/base/TestOverview.java b/backend/src/main/java/io/metersphere/report/base/TestOverview.java index d478761674dc9f4bd5171f1f6184f1867eb07f84..304ba87443de27eccecf5a1bb7ba1e6ce72caa4c 100644 --- a/backend/src/main/java/io/metersphere/report/base/TestOverview.java +++ b/backend/src/main/java/io/metersphere/report/base/TestOverview.java @@ -1,5 +1,8 @@ package io.metersphere.report.base; +import lombok.Data; + +@Data public class TestOverview { private String maxUsers; @@ -9,51 +12,4 @@ public class TestOverview { private String responseTime90; private String avgBandwidth; - public String getMaxUsers() { - return maxUsers; - } - - public void setMaxUsers(String maxUsers) { - this.maxUsers = maxUsers; - } - - public String getAvgThroughput() { - return avgThroughput; - } - - public void setAvgThroughput(String avgThroughput) { - this.avgThroughput = avgThroughput; - } - - public String getErrors() { - return errors; - } - - public void setErrors(String errors) { - this.errors = errors; - } - - public String getAvgResponseTime() { - return avgResponseTime; - } - - public void setAvgResponseTime(String avgResponseTime) { - this.avgResponseTime = avgResponseTime; - } - - public String getResponseTime90() { - return responseTime90; - } - - public void setResponseTime90(String responseTime90) { - this.responseTime90 = responseTime90; - } - - public String getAvgBandwidth() { - return avgBandwidth; - } - - public void setAvgBandwidth(String avgBandwidth) { - this.avgBandwidth = avgBandwidth; - } } diff --git a/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java b/backend/src/main/java/io/metersphere/security/ShiroDBRealm.java index 74a468a7a4769017fcf94b9058a5b680d5b23a05..639d7250ae9d5c454ca4b03b2ddb2e1154bd7c75 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); } diff --git a/backend/src/main/java/io/metersphere/service/OrganizationService.java b/backend/src/main/java/io/metersphere/service/OrganizationService.java index 1be525c6ceb391bc47abf1e795c1adc19b83b690..c54b4860d1dd8cc95705d6c167b5ac4f793119d9 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(); @@ -59,6 +67,23 @@ public class OrganizationService { } public void deleteOrganization(String organizationId) { + WorkspaceExample example = new WorkspaceExample(); + WorkspaceExample.Criteria criteria = example.createCriteria(); + criteria.andOrganizationIdEqualTo(organizationId); + + // delete workspace + List workspaces = workspaceMapper.selectByExample(example); + List workspaceIdList = workspaces.stream().map(Workspace::getId).collect(Collectors.toList()); + for (String workspaceId : workspaceIdList) { + workspaceService.deleteWorkspace(workspaceId); + } + + // delete organization member + UserRoleExample userRoleExample = new UserRoleExample(); + userRoleExample.createCriteria().andSourceIdEqualTo(organizationId); + userRoleMapper.deleteByExample(userRoleExample); + + // delete org organizationMapper.deleteByPrimaryKey(organizationId); } @@ -123,7 +148,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/PerformanceTestService.java b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java index b248667db001936efbf2b2849f5da84c24da291e..408d9d3717a018131a356029707a1c4940bf04f3 100644 --- a/backend/src/main/java/io/metersphere/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/service/PerformanceTestService.java @@ -50,13 +50,35 @@ public class PerformanceTestService { @Resource private LoadTestReportLogMapper loadTestReportLogMapper; @Resource + private LoadTestReportResultMapper loadTestReportResultMapper; + @Resource private TestResourceService testResourceService; + @Resource + private ReportService reportService; public List list(QueryTestPlanRequest request) { return extLoadTestMapper.list(request); } public void delete(DeleteTestPlanRequest request) { + String testId = request.getId(); + LoadTestReportExample loadTestReportExample = new LoadTestReportExample(); + loadTestReportExample.createCriteria().andTestIdEqualTo(testId); + List loadTestReports = loadTestReportMapper.selectByExample(loadTestReportExample); + List reportIdList = loadTestReports.stream().map(LoadTestReport::getId).collect(Collectors.toList()); + + // delete load_test_report_result + LoadTestReportResultExample loadTestReportResultExample = new LoadTestReportResultExample(); + loadTestReportResultExample.createCriteria().andReportIdIn(reportIdList); + loadTestReportResultMapper.deleteByExample(loadTestReportResultExample); + + // delete load_test_report, delete load_test_report_detail + reportIdList.forEach(reportId -> { + loadTestReportDetailMapper.deleteByPrimaryKey(reportId); + reportService.deleteReport(reportId); + }); + + // delete load_test loadTestMapper.deleteByPrimaryKey(request.getId()); deleteFileByTestId(request.getId()); diff --git a/backend/src/main/java/io/metersphere/service/ProjectService.java b/backend/src/main/java/io/metersphere/service/ProjectService.java index 01901275367ba126cf623236f5f042e601191c0f..4dc397a05d76b9e49defa21de35e57b0b89383c8 100644 --- a/backend/src/main/java/io/metersphere/service/ProjectService.java +++ b/backend/src/main/java/io/metersphere/service/ProjectService.java @@ -1,11 +1,15 @@ package io.metersphere.service; +import io.metersphere.base.domain.LoadTest; +import io.metersphere.base.domain.LoadTestExample; import io.metersphere.base.domain.Project; import io.metersphere.base.domain.ProjectExample; +import io.metersphere.base.mapper.LoadTestMapper; import io.metersphere.base.mapper.ProjectMapper; import io.metersphere.base.mapper.ext.ExtProjectMapper; import io.metersphere.commons.exception.MSException; import io.metersphere.controller.request.ProjectRequest; +import io.metersphere.controller.request.testplan.DeleteTestPlanRequest; import io.metersphere.dto.ProjectDTO; import io.metersphere.i18n.Translator; import io.metersphere.user.SessionUtils; @@ -16,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; import java.util.UUID; +import java.util.stream.Collectors; @Service @Transactional(rollbackFor = Exception.class) @@ -24,6 +29,10 @@ public class ProjectService { private ProjectMapper projectMapper; @Resource private ExtProjectMapper extProjectMapper; + @Resource + private PerformanceTestService performanceTestService; + @Resource + private LoadTestMapper loadTestMapper; public Project addProject(Project project) { if (StringUtils.isBlank(project.getName())) { @@ -54,11 +63,27 @@ public class ProjectService { } public void deleteProject(String projectId) { + // delete test + LoadTestExample loadTestExample = new LoadTestExample(); + loadTestExample.createCriteria().andProjectIdEqualTo(projectId); + List loadTests = loadTestMapper.selectByExample(loadTestExample); + List loadTestIdList = loadTests.stream().map(LoadTest::getId).collect(Collectors.toList()); + loadTestIdList.forEach(loadTestId -> { + DeleteTestPlanRequest deleteTestPlanRequest = new DeleteTestPlanRequest(); + deleteTestPlanRequest.setId(loadTestId); + performanceTestService.delete(deleteTestPlanRequest); + }); + + // TODO 删除项目下 测试跟踪 相关 + + // TODO 删除项目下 接口测试 相关 + + // delete project projectMapper.deleteByPrimaryKey(projectId); } public void updateProject(Project project) { - project.setCreateTime(null);// 创建时间禁止修改 + project.setCreateTime(null); project.setUpdateTime(System.currentTimeMillis()); projectMapper.updateByPrimaryKeySelective(project); } diff --git a/backend/src/main/java/io/metersphere/service/ReportService.java b/backend/src/main/java/io/metersphere/service/ReportService.java index 8b304d54575b1e7760bad627dced77f7e491f97b..a77676995bb710c8f64c37e976bc0c4dd5c9cce7 100644 --- a/backend/src/main/java/io/metersphere/service/ReportService.java +++ b/backend/src/main/java/io/metersphere/service/ReportService.java @@ -1,8 +1,10 @@ package io.metersphere.service; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import io.metersphere.base.domain.*; import io.metersphere.base.mapper.LoadTestMapper; +import io.metersphere.base.mapper.LoadTestReportLogMapper; import io.metersphere.base.mapper.LoadTestReportMapper; import io.metersphere.base.mapper.LoadTestReportResultMapper; import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper; @@ -20,8 +22,10 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service @Transactional(rollbackFor = Exception.class) @@ -35,6 +39,10 @@ public class ReportService { private LoadTestMapper loadTestMapper; @Resource private LoadTestReportResultMapper loadTestReportResultMapper; + @Resource + private LoadTestReportLogMapper loadTestReportLogMapper; + @Resource + private TestResourceService testResourceService; public List getRecentReportList(ReportRequest request) { return extLoadTestReportMapper.getReportList(request); @@ -150,7 +158,34 @@ public class ReportService { } public Map log(String reportId) { - // todo 查询日志 - return null; + Map logMap = new HashMap<>(); + LoadTestReportLogExample example = new LoadTestReportLogExample(); + example.createCriteria().andReportIdEqualTo(reportId); + List loadTestReportLogs = loadTestReportLogMapper.selectByExampleWithBLOBs(example); + loadTestReportLogs.stream().map(log -> { + Map result = new HashMap<>(); + TestResource testResource = testResourceService.getTestResource(log.getResourceId()); + if (testResource == null) { + result.put(log.getResourceId(), log.getContent()); + return result; + } + String configuration = testResource.getConfiguration(); + JSONObject object = JSON.parseObject(configuration); + if (StringUtils.isNotBlank(object.getString("masterUrl"))) { + result.put(object.getString("masterUrl"), log.getContent()); + return result; + } + if (StringUtils.isNotBlank(object.getString("ip"))) { + result.put(object.getString("ip"), log.getContent()); + return result; + + } + result.put(log.getResourceId(), log.getContent()); + return result; + }).forEach(log -> logMap.putAll(log.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))) + ); + + return logMap; } } diff --git a/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java index d790c20012317d604e61c86a45e0d6c3def920cf..fa006957288cfe1bdcdd086dfff3272f44b2b70c 100644 --- a/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/service/TestCaseNodeService.java @@ -92,7 +92,7 @@ public class TestCaseNodeService { List childrens = Optional.ofNullable(nodeTree.getChildren()).orElse(new ArrayList<>()); lowerNodes.forEach(node -> { - if (node.getpId().equals(rootNode.getId())){ + if (node.getPId().equals(rootNode.getId())){ childrens.add(buildNodeTree(nodeLevelMap, node)); nodeTree.setChildren(childrens); } @@ -327,7 +327,7 @@ public class TestCaseNodeService { private Integer insertTestCaseNode(String nodeName, Integer pId, String projectId, Integer level) { TestCaseNode testCaseNode = new TestCaseNode(); testCaseNode.setName(nodeName.trim()); - testCaseNode.setpId(pId); + testCaseNode.setPId(pId); testCaseNode.setProjectId(projectId); testCaseNode.setCreateTime(System.currentTimeMillis()); testCaseNode.setUpdateTime(System.currentTimeMillis()); diff --git a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java index 45817ed53ff436426a560f8a95ecf0ec1c66fe66..ce74519c3862c5f509ce60fb8d105add2f3341d3 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourcePoolService.java @@ -7,15 +7,16 @@ import io.metersphere.base.domain.TestResourcePool; import io.metersphere.base.domain.TestResourcePoolExample; import io.metersphere.base.mapper.TestResourceMapper; import io.metersphere.base.mapper.TestResourcePoolMapper; -import io.metersphere.base.mapper.ext.ExtTestReourcePoolMapper; import io.metersphere.commons.constants.ResourcePoolTypeEnum; import io.metersphere.commons.constants.ResourceStatusEnum; import io.metersphere.commons.exception.MSException; +import io.metersphere.commons.utils.LogUtil; import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest; import io.metersphere.dto.NodeDTO; import io.metersphere.dto.TestResourcePoolDTO; import io.metersphere.engine.kubernetes.provider.KubernetesProvider; import io.metersphere.i18n.Translator; +import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.http.HttpStatus; @@ -25,10 +26,13 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.web.client.RestTemplate; import javax.annotation.Resource; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; import java.util.List; import java.util.UUID; import java.util.stream.Collectors; +import static io.metersphere.commons.constants.ResourceStatusEnum.INVALID; import static io.metersphere.commons.constants.ResourceStatusEnum.VALID; /** @@ -45,8 +49,6 @@ public class TestResourcePoolService { @Resource private TestResourceMapper testResourceMapper; @Resource - private ExtTestReourcePoolMapper extTestReourcePoolMapper; - @Resource private RestTemplate restTemplate; public TestResourcePoolDTO addTestResourcePool(TestResourcePoolDTO testResourcePool) { @@ -71,7 +73,27 @@ public class TestResourcePoolService { } public List listResourcePools(QueryResourcePoolRequest request) { - return extTestReourcePoolMapper.listResourcePools(request); + TestResourcePoolExample example = new TestResourcePoolExample(); + TestResourcePoolExample.Criteria criteria = example.createCriteria(); + if (StringUtils.isNotBlank(request.getName())) { + criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%")); + } + List testResourcePools = testResourcePoolMapper.selectByExample(example); + List testResourcePoolDTOS = new ArrayList<>(); + testResourcePools.forEach(pool -> { + TestResourceExample example2 = new TestResourceExample(); + example2.createCriteria().andTestResourcePoolIdEqualTo(pool.getId()); + List testResources = testResourceMapper.selectByExampleWithBLOBs(example2); + TestResourcePoolDTO testResourcePoolDTO = new TestResourcePoolDTO(); + try { + BeanUtils.copyProperties(testResourcePoolDTO, pool); + testResourcePoolDTO.setResources(testResources); + testResourcePoolDTOS.add(testResourcePoolDTO); + } catch (IllegalAccessException | InvocationTargetException e) { + LogUtil.error(e); + } + }); + return testResourcePoolDTOS; } private void validateTestResourcePool(TestResourcePoolDTO testResourcePool) { @@ -98,6 +120,7 @@ public class TestResourcePoolService { if (nodeIps.size() < testResourcePool.getResources().size()) { MSException.throwException(Translator.get("duplicate_node_ip")); } + testResourcePool.setStatus(VALID.name()); for (TestResource resource : testResourcePool.getResources()) { NodeDTO nodeDTO = JSON.parseObject(resource.getConfiguration(), NodeDTO.class); boolean isValidate = validateNode(nodeDTO); @@ -134,6 +157,7 @@ public class TestResourcePoolService { KubernetesProvider provider = new KubernetesProvider(testResource.getConfiguration()); provider.validateCredential(); testResource.setStatus(VALID.name()); + testResourcePool.setStatus(VALID.name()); } catch (Exception e) { testResource.setStatus(ResourceStatusEnum.INVALID.name()); testResourcePool.setStatus(ResourceStatusEnum.INVALID.name()); @@ -161,6 +185,18 @@ public class TestResourcePoolService { } public List listValidResourcePools() { + QueryResourcePoolRequest request = new QueryResourcePoolRequest(); + List testResourcePools = listResourcePools(request); + // 重新校验 pool + for (TestResourcePoolDTO pool : testResourcePools) { + try { + updateTestResourcePool(pool); + } catch (MSException e) { + pool.setStatus(INVALID.name()); + pool.setUpdateTime(System.currentTimeMillis()); + testResourcePoolMapper.updateByPrimaryKeySelective(pool); + } + } TestResourcePoolExample example = new TestResourcePoolExample(); example.createCriteria().andStatusEqualTo(ResourceStatusEnum.VALID.name()); return testResourcePoolMapper.selectByExample(example); diff --git a/backend/src/main/java/io/metersphere/service/TestResourceService.java b/backend/src/main/java/io/metersphere/service/TestResourceService.java index f6924503debdae77548c8f93355e2a311c3ea7a2..c3ef935ffecb0f9201402ce90b91466024d7d479 100644 --- a/backend/src/main/java/io/metersphere/service/TestResourceService.java +++ b/backend/src/main/java/io/metersphere/service/TestResourceService.java @@ -47,4 +47,8 @@ public class TestResourceService { example.createCriteria().andTestResourcePoolIdEqualTo(resourcePoolId); return testResourceMapper.selectByExampleWithBLOBs(example); } + + public TestResource getTestResource(String resourceId) { + return testResourceMapper.selectByPrimaryKey(resourceId); + } } diff --git a/backend/src/main/java/io/metersphere/service/UserService.java b/backend/src/main/java/io/metersphere/service/UserService.java index b14ef7aa24c7da4f6011264bfe686b008867103f..acb0dcc9754a413a4548ada6cbf03743ca25641a 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 79b1c1c89468d84caafb13b751ae966b17bc9346..a17cfd88556d747ae34a2303ed39d37141a3aa26 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())) { @@ -89,6 +97,21 @@ public class WorkspaceService { } public void deleteWorkspace(String workspaceId) { + // delete project + ProjectExample projectExample = new ProjectExample(); + projectExample.createCriteria().andWorkspaceIdEqualTo(workspaceId); + List projectList = projectMapper.selectByExample(projectExample); + List projectIdList = projectList.stream().map(Project::getId).collect(Collectors.toList()); + projectIdList.forEach(projectId -> { + projectService.deleteProject(projectId); + }); + + // delete workspace member + UserRoleExample userRoleExample = new UserRoleExample(); + userRoleExample.createCriteria().andSourceIdEqualTo(workspaceId); + userRoleMapper.deleteByExample(userRoleExample); + + // delete workspace workspaceMapper.deleteByPrimaryKey(workspaceId); } @@ -98,7 +121,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 +138,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) diff --git a/backend/src/main/resources/application.properties b/backend/src/main/resources/application.properties index 728e362036526a0a1a69e06e4d222c4c1eb847a0..2805932dce48fd6feff73c0f984a366fd0916b38 100644 --- a/backend/src/main/resources/application.properties +++ b/backend/src/main/resources/application.properties @@ -22,7 +22,7 @@ mybatis.configuration.use-column-label=true mybatis.configuration.auto-mapping-behavior=full mybatis.configuration.default-statement-timeout=25000 -logging.file.path=/opt/fit2cloud/logs/${spring.application.name} +logging.file.path=/opt/metersphere/logs/${spring.application.name} # view spring.resources.static-locations=classpath:/templates/,classpath:/static/ @@ -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 diff --git a/backend/src/main/resources/generatorConfig.xml b/backend/src/main/resources/generatorConfig.xml index ebfccc8be055f76f2e85f58d6e395a892b2795c9..7649cf5a1d3500f8508551dc9fefb4d18cc0aa65 100644 --- a/backend/src/main/resources/generatorConfig.xml +++ b/backend/src/main/resources/generatorConfig.xml @@ -3,14 +3,27 @@ "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd" > - + - + + + + + + + + + + + + + + @@ -46,15 +59,6 @@ - - - - - - - - -
diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 5dcf8e7cb9e59acb157b605381cf353453aac94b..db75d199042273439df167253a089333567d703d 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -28,4 +28,6 @@ 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 +workspace_not_exists=Workspace is not exists +#api +api_load_script_error="Load script error" \ 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 4203e0043e7502487174f6baf17205519f39eed2..29bde1069ccaff5edb6e01e9df828b6f17be3c34 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -28,4 +28,6 @@ user_email_already_exists=用户邮箱已存在 user_name_is_null=用户名不能为空 user_email_is_null=用户邮箱不能为空 password_is_null=密码不能为空 -workspace_not_exists=工作空间不存在 \ No newline at end of file +workspace_not_exists=工作空间不存在 +#api +api_load_script_error="读取脚本失败" \ No newline at end of file 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 125746d4954c76d9b2d872a0f60890b57864e0eb..0000000000000000000000000000000000000000 --- 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= diff --git a/backend/src/test/java/io/metersphere/ApplicationTests.java b/backend/src/test/java/io/metersphere/ApplicationTests.java deleted file mode 100644 index 4806fcfaba2d5c370f3728cb42e8f2946c97a213..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/ApplicationTests.java +++ /dev/null @@ -1,54 +0,0 @@ -package io.metersphere; - - -import io.metersphere.base.domain.SystemParameter; -import io.metersphere.base.mapper.UserMapper; -import io.metersphere.commons.constants.ParamConstants; -import io.metersphere.commons.utils.CompressUtils; -import io.metersphere.service.RegistryParamService; -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.util.List; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class ApplicationTests { - @Resource - UserMapper userMapper; - @Resource - private RegistryParamService registryParamService; - - @Test - public void test1() { - final Object test = CompressUtils.zip("test".getBytes()); - final Object unzip = CompressUtils.unzip(test); - System.out.println(new String((byte[]) unzip)); - } - - @Test - public void test2() { - List registry = registryParamService.getRegistry(ParamConstants.Classify.REGISTRY.getValue()); - System.out.println(registry); - for (SystemParameter sp : registry) { - if ("registry.password".equals(sp.getParamKey())) { - sp.setParamValue("Calong@2015"); - } - if ("registry.url".equals(sp.getParamKey())) { - sp.setParamValue("registry.fit2cloud.com"); - } - if ("registry.repo".equals(sp.getParamKey())) { - sp.setParamValue("metersphere"); - } - if ("registry.username".equals(sp.getParamKey())) { - sp.setParamValue("developer"); - } - } - registryParamService.updateRegistry(registry); - } - - -} diff --git a/backend/src/test/java/io/metersphere/BaseTest.java b/backend/src/test/java/io/metersphere/BaseTest.java deleted file mode 100644 index 8c56d027abb4c9a7ef913dd58c370ca6b739e66f..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/BaseTest.java +++ /dev/null @@ -1,34 +0,0 @@ -package io.metersphere; - -import io.fabric8.kubernetes.api.model.Pod; -import io.fabric8.kubernetes.api.model.PodList; -import io.fabric8.kubernetes.client.ConfigBuilder; -import io.fabric8.kubernetes.client.DefaultKubernetesClient; -import io.fabric8.kubernetes.client.KubernetesClient; -import org.junit.Before; -import org.junit.Test; - -public class BaseTest { - protected KubernetesClient kubernetesClient; - - @Before - public void before() { - - try { - ConfigBuilder configBuilder = new ConfigBuilder(); - configBuilder.withMasterUrl("https://172.16.10.93:6443"); - kubernetesClient = new DefaultKubernetesClient(configBuilder.build()); - } catch (Exception e) { - System.out.println(e.getMessage()); - } - - } - - @Test - public void test1() { - PodList list = kubernetesClient.pods().list(); - for (Pod item : list.getItems()) { - System.out.println(item); - } - } -} diff --git a/backend/src/test/java/io/metersphere/JmxFileParseTest.java b/backend/src/test/java/io/metersphere/JmxFileParseTest.java deleted file mode 100644 index 783ebb93bb7bffa95a082bccc10377994139be75..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/JmxFileParseTest.java +++ /dev/null @@ -1,536 +0,0 @@ -package io.metersphere; - -import io.metersphere.config.KafkaProperties; -import org.apache.commons.lang3.StringUtils; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.InputSource; - -import javax.annotation.Resource; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import java.io.File; -import java.io.FileInputStream; -import java.io.StringWriter; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class JmxFileParseTest { - private final static String HASH_TREE_ELEMENT = "hashTree"; - private final static String TEST_PLAN = "TestPlan"; - private final static String STRING_PROP = "stringProp"; - private final static String CONCURRENCY_THREAD_GROUP = "com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup"; - private final static String VARIABLE_THROUGHPUT_TIMER = "kg.apc.jmeter.timers.VariableThroughputTimer"; - private final static String BACKEND_LISTENER = "BackendListener"; - private final static String THREAD_GROUP = "ThreadGroup"; - private final static String CONFIG_TEST_ELEMENT = "ConfigTestElement"; - private final static String DNS_CACHE_MANAGER = "DNSCacheManager"; - private final static String ARGUMENTS = "Arguments"; - @Resource - private KafkaProperties kafkaProperties; - - @Test - public void testProperties() { - System.out.println(kafkaProperties.getSsl()); - } - - @Test - public void parse() throws Exception { - File file = new File("/Users/liuruibin/Downloads/blaze_meter_dev2.jmx"); - file = new File("/Users/liuruibin/Desktop/041301.jmx"); - - final FileInputStream inputStream = new FileInputStream(file); - final InputSource inputSource = new InputSource(inputStream); - - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - - DocumentBuilder docBuilder = factory.newDocumentBuilder(); - final Document document = docBuilder.parse(inputSource); - - final Element jmeterTestPlan = document.getDocumentElement(); - - NodeList childNodes = jmeterTestPlan.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node node = childNodes.item(i); - - if (node instanceof Element) { - Element ele = (Element) node; - - // jmeterTestPlan的子元素肯定是 - parseHashTree(ele); - } - } - - - DOMSource domSource = new DOMSource(document); - StringWriter writer = new StringWriter(); - StreamResult result = new StreamResult(writer); - TransformerFactory tf = TransformerFactory.newInstance(); - Transformer transformer = tf.newTransformer(); - transformer.transform(domSource, result); - System.out.println("XML IN String format is: \n" + writer.toString()); -// FileUtils.writeStringToFile(new File("/tmp/test-jmeter.jmx"), writer.toString(), StandardCharsets.UTF_8); - } - - private void parseHashTree(Element hashTree) { - if (!valid(hashTree)) { - return; - } - - if (hashTree.getChildNodes().getLength() > 0) { - final NodeList childNodes = hashTree.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node node = childNodes.item(i); - if (node instanceof Element) { - Element ele = (Element) node; - if (!valid(ele)) { - continue; - } - - if (nodeNameEquals(ele, HASH_TREE_ELEMENT)) { - parseHashTree(ele); - } else if (nodeNameEquals(ele, TEST_PLAN)) { - processTearDownTestPlan(ele); - } else if (nodeNameEquals(ele, CONCURRENCY_THREAD_GROUP)) { - processConcurrencyThreadGroup(ele); - processCheckoutTimer(ele); - processCheckoutBackendListener(ele); - } else if (nodeNameEquals(ele, THREAD_GROUP)) { - processThreadGroup(ele); - processConcurrencyThreadGroup(ele); - processCheckoutTimer(ele); - processCheckoutBackendListener(ele); - } else if (nodeNameEquals(ele, VARIABLE_THROUGHPUT_TIMER)) { - - } else if (nodeNameEquals(ele, BACKEND_LISTENER)) { -// processBackendListener(ele); - } else if (nodeNameEquals(ele, CONFIG_TEST_ELEMENT)) { -// processConfigTestElement(ele); - } else if (nodeNameEquals(ele, DNS_CACHE_MANAGER)) { -// processDnsCacheManager(ele); - } else if (nodeNameEquals(ele, ARGUMENTS)) { -// processArguments(ele); - } - } - } - } - } - - private void processArguments(Element ele) { - /* - - - - BASE_URL_1 - rddev2.fit2cloud.com - = - - - - */ - NodeList childNodes = ele.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node item = childNodes.item(i); - if (item instanceof Element && nodeNameEquals(item, "collectionProp")) { - removeChildren(item); - Document document = item.getOwnerDocument(); - Element elementProp = document.createElement("elementProp"); - elementProp.setAttribute("name", ""); - elementProp.setAttribute("elementType", ""); - elementProp.appendChild(createStringProp(document, "Argument.name", "")); - elementProp.appendChild(createStringProp(document, "Argument.value", "")); - elementProp.appendChild(createStringProp(document, "Argument.metadata", "=")); - item.appendChild(elementProp); - } - } - - } - - private void processDnsCacheManager(Element ele) { - /* - - - - - baiud.com - 172.16.10.187 - - - true - true - - */ - NodeList childNodes = ele.getChildNodes(); - for (int i = 0, size = childNodes.getLength(); i < size; i++) { - Node item = childNodes.item(i); - if (item instanceof Element && nodeNameEquals(item, "collectionProp") - && StringUtils.equals(((Element) item).getAttribute("name"), "DNSCacheManager.hosts")) { - Node childNode = item.getFirstChild(); - // todo 绑定域名 多个 - while (!(childNode instanceof Element)) { - childNode = childNode.getNextSibling(); - } - Element elementProp = ((Element) childNode); - elementProp.setAttribute("name", "baidu.com"); - elementProp.setAttribute("elementType", "StaticHost"); - removeChildren(elementProp); - elementProp.appendChild(createStringProp(ele.getOwnerDocument(), "StaticHost.Name", "")); - elementProp.appendChild(createStringProp(ele.getOwnerDocument(), "StaticHost.Address", "")); - } - - if (item instanceof Element && nodeNameEquals(item, "boolProp") - && StringUtils.equals(((Element) item).getAttribute("name"), "DNSCacheManager.isCustomResolver")) { - item.getFirstChild().setNodeValue("true"); - } - } - - } - - private void processConfigTestElement(Element ele) { - /* - - - - - - - - - - true - true - 6 - 30000 - - - */ - NodeList childNodes = ele.getChildNodes(); - for (int i = 0, size = childNodes.getLength(); i < size; i++) { - Node item = childNodes.item(i); - if (item instanceof Element && nodeNameEquals(item, STRING_PROP) - && StringUtils.equals(((Element) item).getAttribute("name"), "HTTPSampler.connect_timeout")) { - - item.getFirstChild().setNodeValue("30000"); - } - } - } - - private void processTearDownTestPlan(Element ele) { - /*true*/ - Document document = ele.getOwnerDocument(); - Element tearDownSwitch = createBoolProp(document, "TestPlan.tearDown_on_shutdown", true); - ele.appendChild(tearDownSwitch); - - Node hashTree = ele.getNextSibling(); - while (!(hashTree instanceof Element)) { - hashTree = hashTree.getNextSibling(); - } - /* - - continue - - false - 1 - - 1 - 1 - false - - - true - - */ - Element tearDownElement = document.createElement("PostThreadGroup"); - tearDownElement.setAttribute("guiclass", "PostThreadGroupGui"); - tearDownElement.setAttribute("testclass", "PostThreadGroup"); - tearDownElement.setAttribute("testname", "tearDown Thread Group"); - tearDownElement.setAttribute("enabled", "true"); - tearDownElement.appendChild(createStringProp(document, "ThreadGroup.on_sample_error", "continue")); - tearDownElement.appendChild(createStringProp(document, "ThreadGroup.num_threads", "1")); - tearDownElement.appendChild(createStringProp(document, "ThreadGroup.ramp_time", "1")); - tearDownElement.appendChild(createStringProp(document, "ThreadGroup.duration", "")); - tearDownElement.appendChild(createStringProp(document, "ThreadGroup.delay", "")); - tearDownElement.appendChild(createBoolProp(document, "ThreadGroup.scheduler", false)); - tearDownElement.appendChild(createBoolProp(document, "ThreadGroup.same_user_on_next_iteration", true)); - Element elementProp = document.createElement("elementProp"); - elementProp.setAttribute("name", "ThreadGroup.main_controller"); - elementProp.setAttribute("elementType", "LoopController"); - elementProp.setAttribute("guiclass", "LoopControlPanel"); - elementProp.setAttribute("testclass", "LoopController"); - elementProp.setAttribute("testname", "Loop Controller"); - elementProp.setAttribute("enabled", "true"); - elementProp.appendChild(createBoolProp(document, "LoopController.continue_forever", false)); - elementProp.appendChild(createStringProp(document, "LoopController.loops", "1")); - tearDownElement.appendChild(elementProp); - hashTree.appendChild(tearDownElement); - - Element tearDownHashTree = document.createElement(HASH_TREE_ELEMENT); - /* - - */ - Element onceOnlyController = document.createElement("OnceOnlyController"); - onceOnlyController.setAttribute("guiclass", "OnceOnlyControllerGui"); - onceOnlyController.setAttribute("testclass", "OnceOnlyController"); - onceOnlyController.setAttribute("testname", "Once Only Controller"); - onceOnlyController.setAttribute("enabled", "true"); - tearDownHashTree.appendChild(onceOnlyController); - /* - - - false - true - false - - - - */ - Element onceOnlyHashTree = document.createElement(HASH_TREE_ELEMENT); - Element debugSampler = document.createElement("DebugSampler"); - debugSampler.setAttribute("guiclass", "TestBeanGUI"); - debugSampler.setAttribute("testclass", "DebugSampler"); - debugSampler.setAttribute("testname", "Debug Sampler"); - debugSampler.setAttribute("enabled", "true"); - debugSampler.appendChild(createBoolProp(document, "displayJMeterProperties", false)); - debugSampler.appendChild(createBoolProp(document, "displayJMeterVariables", true)); - debugSampler.appendChild(createBoolProp(document, "displaySystemProperties", false)); - onceOnlyHashTree.appendChild(debugSampler); - // 添加空的 hashTree - onceOnlyHashTree.appendChild(document.createElement(HASH_TREE_ELEMENT)); - tearDownHashTree.appendChild(onceOnlyHashTree); - hashTree.appendChild(tearDownHashTree); - // 添加backend listener - processCheckoutBackendListener(tearDownElement); - } - - private Element createBoolProp(Document document, String name, boolean value) { - Element tearDownSwitch = document.createElement("boolProp"); - tearDownSwitch.setAttribute("name", name); - tearDownSwitch.appendChild(document.createTextNode(String.valueOf(value))); - return tearDownSwitch; - } - - private void processBackendListener(Element backendListener) { - Document document = backendListener.getOwnerDocument(); - // 清空child - removeChildren(backendListener); - backendListener.appendChild(createStringProp(document, "classname", "io.github.rahulsinghai.jmeter.backendlistener.kafka.KafkaBackendClient")); - backendListener.appendChild(createStringProp(document, "QUEUE_SIZE", "5000")); - // elementProp - Element elementProp = document.createElement("elementProp"); - elementProp.setAttribute("name", "arguments"); - elementProp.setAttribute("elementType", "Arguments"); - elementProp.setAttribute("guiclass", "ArgumentsPanel"); - elementProp.setAttribute("testclass", "Arguments"); - elementProp.setAttribute("enabled", "true"); - Element collectionProp = document.createElement("collectionProp"); - collectionProp.setAttribute("name", "Arguments.arguments"); - collectionProp.appendChild(createKafkaProp(document, "kafka.acks", kafkaProperties.getAcks())); - collectionProp.appendChild(createKafkaProp(document, "kafka.bootstrap.servers", kafkaProperties.getBootstrapServers())); - collectionProp.appendChild(createKafkaProp(document, "kafka.topic", kafkaProperties.getTopic())); - collectionProp.appendChild(createKafkaProp(document, "kafka.sample.filter", kafkaProperties.getSampleFilter())); - collectionProp.appendChild(createKafkaProp(document, "kafka.fields", kafkaProperties.getFields())); - collectionProp.appendChild(createKafkaProp(document, "kafka.test.mode", kafkaProperties.getTestMode())); - collectionProp.appendChild(createKafkaProp(document, "kafka.parse.all.req.headers", kafkaProperties.getParseAllReqHeaders())); - collectionProp.appendChild(createKafkaProp(document, "kafka.parse.all.res.headers", kafkaProperties.getParseAllResHeaders())); - collectionProp.appendChild(createKafkaProp(document, "kafka.timestamp", kafkaProperties.getTimestamp())); - collectionProp.appendChild(createKafkaProp(document, "kafka.compression.type", kafkaProperties.getCompressionType())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.enabled", kafkaProperties.getSsl().getEnabled())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.key.password", kafkaProperties.getSsl().getKeyPassword())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.keystore.location", kafkaProperties.getSsl().getKeystoreLocation())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.keystore.password", kafkaProperties.getSsl().getKeystorePassword())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.truststore.location", kafkaProperties.getSsl().getTruststoreLocation())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.truststore.password", kafkaProperties.getSsl().getTruststorePassword())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.enabled.protocols", kafkaProperties.getSsl().getEnabledProtocols())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.keystore.type", kafkaProperties.getSsl().getKeystoreType())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.protocol", kafkaProperties.getSsl().getProtocol())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.provider", kafkaProperties.getSsl().getProvider())); - collectionProp.appendChild(createKafkaProp(document, "kafka.ssl.truststore.type", kafkaProperties.getSsl().getTruststoreType())); - collectionProp.appendChild(createKafkaProp(document, "kafka.batch.size", kafkaProperties.getBatchSize())); - collectionProp.appendChild(createKafkaProp(document, "kafka.client.id", kafkaProperties.getClientId())); - collectionProp.appendChild(createKafkaProp(document, "kafka.connections.max.idle.ms", kafkaProperties.getConnectionsMaxIdleMs())); - // 添加关联关系 test.id test.name - collectionProp.appendChild(createKafkaProp(document, "test.id", "")); - collectionProp.appendChild(createKafkaProp(document, "test.name", "")); - - elementProp.appendChild(collectionProp); - // set elementProp - backendListener.appendChild(elementProp); - } - - private void processCheckoutBackendListener(Element element) { - Document document = element.getOwnerDocument(); - - Node listenerParent = element.getNextSibling(); - while (!(listenerParent instanceof Element)) { - listenerParent = listenerParent.getNextSibling(); - } - - NodeList childNodes = listenerParent.getChildNodes(); - for (int i = 0, l = childNodes.getLength(); i < l; i++) { - Node item = childNodes.item(i); - if (nodeNameEquals(item, BACKEND_LISTENER)) { - // 如果已经存在,不再添加 - return; - } - } - - // add class name - Element backendListener = document.createElement(BACKEND_LISTENER); - backendListener.setAttribute("guiclass", "BackendListenerGui"); - backendListener.setAttribute("testclass", "BackendListener"); - backendListener.setAttribute("testname", "Backend Listener"); - backendListener.setAttribute("enabled", "true"); - listenerParent.appendChild(backendListener); - listenerParent.appendChild(document.createElement(HASH_TREE_ELEMENT)); - } - - private Element createKafkaProp(Document document, String name, String value) { - Element eleProp = document.createElement("elementProp"); - eleProp.setAttribute("name", name); - eleProp.setAttribute("elementType", "Argument"); - eleProp.appendChild(createStringProp(document, "Argument.name", name)); - eleProp.appendChild(createStringProp(document, "Argument.value", value)); - eleProp.appendChild(createStringProp(document, "Argument.metadata", "=")); - return eleProp; - } - - private void processThreadGroup(Element threadGroup) { - // 重命名 tagName - Document document = threadGroup.getOwnerDocument(); - document.renameNode(threadGroup, threadGroup.getNamespaceURI(), CONCURRENCY_THREAD_GROUP); - threadGroup.setAttribute("guiclass", CONCURRENCY_THREAD_GROUP + "Gui"); - threadGroup.setAttribute("testclass", CONCURRENCY_THREAD_GROUP); - /* - - continue - 2 - 12 - 2 - 3 - - 1 - S - */ - removeChildren(threadGroup); - // elementProp - Element elementProp = document.createElement("elementProp"); - elementProp.setAttribute("name", "ThreadGroup.main_controller"); - elementProp.setAttribute("elementType", "com.blazemeter.jmeter.control.VirtualUserController"); - threadGroup.appendChild(elementProp); - - - threadGroup.appendChild(createStringProp(document, "ThreadGroup.on_sample_error", "continue")); - threadGroup.appendChild(createStringProp(document, "TargetLevel", "2")); - threadGroup.appendChild(createStringProp(document, "RampUp", "12")); - threadGroup.appendChild(createStringProp(document, "Steps", "2")); - threadGroup.appendChild(createStringProp(document, "Hold", "12")); - threadGroup.appendChild(createStringProp(document, "LogFilename", "")); - threadGroup.appendChild(createStringProp(document, "Iterations", "1")); - threadGroup.appendChild(createStringProp(document, "Unit", "S")); - } - - private void processCheckoutTimer(Element element) { - /* - - - - 1 - 1 - 13 - - - - */ - Document document = element.getOwnerDocument(); - - - Node timerParent = element.getNextSibling(); - while (!(timerParent instanceof Element)) { - timerParent = timerParent.getNextSibling(); - } - - NodeList childNodes = timerParent.getChildNodes(); - for (int i = 0, l = childNodes.getLength(); i < l; i++) { - Node item = childNodes.item(i); - if (nodeNameEquals(item, VARIABLE_THROUGHPUT_TIMER)) { - // 如果已经存在,不再添加 - return; - } - } - - Element timer = document.createElement(VARIABLE_THROUGHPUT_TIMER); - timer.setAttribute("guiclass", VARIABLE_THROUGHPUT_TIMER + "Gui"); - timer.setAttribute("testclass", VARIABLE_THROUGHPUT_TIMER); - timer.setAttribute("testname", "jp@gc - Throughput Shaping Timer"); - timer.setAttribute("enabled", "true"); - - Element collectionProp = document.createElement("collectionProp"); - collectionProp.setAttribute("name", "load_profile"); - Element childCollectionProp = document.createElement("collectionProp"); - childCollectionProp.setAttribute("name", "140409499"); - childCollectionProp.appendChild(createStringProp(document, "49", "1")); - childCollectionProp.appendChild(createStringProp(document, "49", "1")); - childCollectionProp.appendChild(createStringProp(document, "1570", "10")); - collectionProp.appendChild(childCollectionProp); - timer.appendChild(collectionProp); - timerParent.appendChild(timer); - // 添加一个空的hashTree - timerParent.appendChild(document.createElement(HASH_TREE_ELEMENT)); - } - - private Element createStringProp(Document document, String name, String value) { - Element unit = document.createElement(STRING_PROP); - unit.setAttribute("name", name); - unit.appendChild(document.createTextNode(value)); - return unit; - } - - private void processConcurrencyThreadGroup(Element concurrencyThreadGroup) { - if (concurrencyThreadGroup.getChildNodes().getLength() > 0) { - final NodeList childNodes = concurrencyThreadGroup.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node node = childNodes.item(i); - if (node instanceof Element) { - Element ele = (Element) node; - if (!valid(ele)) { - continue; - } - - if (nodeNameEquals(ele, STRING_PROP)) { - parseStringProp(ele); - } - } - } - } - } - - private void parseStringProp(Element stringProp) { - if (stringProp.getChildNodes().getLength() > 0) { - stringProp.getFirstChild().setNodeValue("1"); - } - } - - private boolean nodeNameEquals(Node node, String desiredName) { - return desiredName.equals(node.getNodeName()) || desiredName.equals(node.getLocalName()); - } - - private boolean valid(Element ele) { - return StringUtils.isBlank(ele.getAttribute("enabled")) || Boolean.parseBoolean(ele.getAttribute("enabled")); - } - - private void removeChildren(Node node) { - while (node.hasChildNodes()) { - node.removeChild(node.getFirstChild()); - } - } -} 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 cf701cfa551195739c7205d855339626da803b04..0000000000000000000000000000000000000000 --- 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 e1c6bb6370bbfc076b10ea602d304d7be69c2af9..0000000000000000000000000000000000000000 --- 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 bac9afcd74be2fdc609814311c5734c527eeeadd..0000000000000000000000000000000000000000 --- 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(); - } - } -} diff --git a/backend/src/test/java/io/metersphere/ResultDataParseTest.java b/backend/src/test/java/io/metersphere/ResultDataParseTest.java deleted file mode 100644 index 10f3eeadceb3d4d552de496abc4e9a887f0743f1..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/ResultDataParseTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package io.metersphere; - -import io.metersphere.report.base.Statistics; -import org.junit.Test; - -import java.lang.reflect.Field; - -public class ResultDataParseTest { - - String[] s = {"1","2","3","4","5","6","7","8","9","10","11","12","13"}; - - public static T setParam(Class clazz, Object[] args) - throws Exception { - if (clazz == null || args == null) { - throw new IllegalArgumentException(); - } - T t = clazz.newInstance(); - Field[] fields = clazz.getDeclaredFields(); - if (fields == null || fields.length > args.length) { - throw new IndexOutOfBoundsException(); - } - for (int i = 0; i < fields.length; i++) { - fields[i].setAccessible(true); - fields[i].set(t, args[i]); - } - return t; - } - - @Test - public void test() throws Exception { - Statistics statistics = setParam(Statistics.class, s); - System.out.println(statistics.toString()); - } - - -} diff --git a/backend/src/test/java/io/metersphere/service/TestCaseTest.java b/backend/src/test/java/io/metersphere/service/TestCaseTest.java deleted file mode 100644 index 5e7975760dead348c1886de8d9ce918db40834ad..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/service/TestCaseTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.metersphere.service; - -import io.metersphere.base.domain.TestCaseNode; -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; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class TestCaseTest { - - - @Resource - TestCaseNodeService testCaseNodeService; - - @Test - public void addNode() { - TestCaseNode node = new TestCaseNode(); - node.setName("node01"); - node.setProjectId("2ade216b-01a6-43d0-b48c-4a3898306096"); - node.setCreateTime(System.currentTimeMillis()); - node.setUpdateTime(System.currentTimeMillis()); - testCaseNodeService.addNode(node); - } - - -} diff --git a/backend/src/test/java/io/metersphere/service/TestResourcePoolServiceTest.java b/backend/src/test/java/io/metersphere/service/TestResourcePoolServiceTest.java deleted file mode 100644 index 28587d695c11e446ef5f98c90e11e523d4247f90..0000000000000000000000000000000000000000 --- a/backend/src/test/java/io/metersphere/service/TestResourcePoolServiceTest.java +++ /dev/null @@ -1,25 +0,0 @@ -package io.metersphere.service; - -import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest; -import io.metersphere.dto.TestResourcePoolDTO; -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.util.List; - -@RunWith(SpringRunner.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -public class TestResourcePoolServiceTest { - - @Resource - private TestResourcePoolService testResourcePoolService; - - @Test - public void listResourcePools() { - List list = testResourcePoolService.listResourcePools(new QueryResourcePoolRequest()); - System.out.println(list.size()); - } -} \ No newline at end of file diff --git a/frontend/src/business/components/api/test/ApiTestConfig.vue b/frontend/src/business/components/api/test/ApiTestConfig.vue index 76f3b9cb071098f75db566142b62274152ed0f4a..808b121781c057db21f310128d4d7b810acc7c2e 100644 --- a/frontend/src/business/components/api/test/ApiTestConfig.vue +++ b/frontend/src/business/components/api/test/ApiTestConfig.vue @@ -32,8 +32,6 @@