diff --git a/README.md b/README.md index 76326642d2..fd2b8d7fe9 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ curl -sSL https://github.com/metersphere/metersphere/releases/latest/download/qu 测试报告导出 - 性能测试 - 测试脚本 + 性能测试 + 测试脚本 完全兼容 JMeter 脚本 @@ -108,9 +108,6 @@ curl -sSL https://github.com/metersphere/metersphere/releases/latest/download/qu 分布式压力测试 - - 支持独立主机、Kubernetes 集群等多种类型的测试执行环境 - 支持参数化测试 diff --git a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql index 3f7b7072a7..9671aaa78b 100644 --- a/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql +++ b/backend/src/main/resources/db/migration/V2__metersphere_ddl.sql @@ -112,8 +112,7 @@ CREATE TABLE IF NOT EXISTS `role` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `system_parameter` ( `param_key` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT 'Parameter name', @@ -123,8 +122,7 @@ CREATE TABLE IF NOT EXISTS `system_parameter` ( PRIMARY KEY (`param_key`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `test_resource` ( `id` varchar(50) NOT NULL COMMENT 'Test resource ID', @@ -136,8 +134,7 @@ CREATE TABLE IF NOT EXISTS `test_resource` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `test_resource_pool` ( `id` varchar(50) NOT NULL COMMENT 'Test resource pool ID', @@ -150,8 +147,7 @@ CREATE TABLE IF NOT EXISTS `test_resource_pool` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `user` ( `id` varchar(50) COLLATE utf8mb4_bin NOT NULL COMMENT 'User ID', @@ -168,8 +164,7 @@ CREATE TABLE IF NOT EXISTS `user` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `user_role` ( `id` varchar(50) NOT NULL COMMENT 'ID of user''s role info', @@ -181,8 +176,7 @@ CREATE TABLE IF NOT EXISTS `user_role` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; CREATE TABLE IF NOT EXISTS `workspace` ( `id` varchar(50) NOT NULL COMMENT 'Workspace ID ', @@ -194,8 +188,7 @@ CREATE TABLE IF NOT EXISTS `workspace` ( PRIMARY KEY (`id`) ) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 - ; + DEFAULT CHARSET = utf8mb4; -- api start diff --git a/frontend/src/assets/MeterSphere-反白.png b/frontend/src/assets/MeterSphere-反白.png deleted file mode 100644 index 479ded7aed..0000000000 Binary files a/frontend/src/assets/MeterSphere-反白.png and /dev/null differ diff --git a/frontend/src/assets/MeterSphere-彩色.png b/frontend/src/assets/MeterSphere-彩色.png deleted file mode 100644 index 66d9c25d60..0000000000 Binary files a/frontend/src/assets/MeterSphere-彩色.png and /dev/null differ diff --git a/frontend/src/assets/logo-dark-MeterSphere.svg b/frontend/src/assets/logo-dark-MeterSphere.svg new file mode 100755 index 0000000000..d0435794b8 --- /dev/null +++ b/frontend/src/assets/logo-dark-MeterSphere.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/assets/logo-light-MeterSphere.svg b/frontend/src/assets/logo-light-MeterSphere.svg new file mode 100755 index 0000000000..23f11b796a --- /dev/null +++ b/frontend/src/assets/logo-light-MeterSphere.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/business/App.vue b/frontend/src/business/App.vue index fe42618a6e..0ba9e97a3a 100644 --- a/frontend/src/business/App.vue +++ b/frontend/src/business/App.vue @@ -69,7 +69,7 @@ height: 40px; background-repeat: no-repeat; background-position: 50% center; - background-image: url("../assets/MeterSphere-反白.png"); + background-image: url("../assets/logo-light-MeterSphere.svg"); } .menus > * { diff --git a/frontend/src/business/components/api/home/ApiReportRecentList.vue b/frontend/src/business/components/api/home/ApiReportRecentList.vue index 0a6d821c03..c6db5f0ee4 100644 --- a/frontend/src/business/components/api/home/ApiReportRecentList.vue +++ b/frontend/src/business/components/api/home/ApiReportRecentList.vue @@ -55,6 +55,9 @@ created() { this.search(); + }, + activated() { + this.search(); } } diff --git a/frontend/src/business/components/api/home/ApiTestHome.vue b/frontend/src/business/components/api/home/ApiTestHome.vue index 086683ec34..6cf067c57e 100644 --- a/frontend/src/business/components/api/home/ApiTestHome.vue +++ b/frontend/src/business/components/api/home/ApiTestHome.vue @@ -37,11 +37,19 @@ result: {}, } }, - mounted() { - this.result = this.$get('/api/report/dashboard/tests', response => { - this.values = response.data; - }); + activated() { + this.getValues(); }, + mounted() { + this.getValues(); + }, + methods: { + getValues() { + this.result = this.$get('/api/report/dashboard/tests', response => { + this.values = response.data; + }); + } + } } diff --git a/frontend/src/business/components/api/home/ApiTestRecentList.vue b/frontend/src/business/components/api/home/ApiTestRecentList.vue index beb8d52ff7..54b04d6f57 100644 --- a/frontend/src/business/components/api/home/ApiTestRecentList.vue +++ b/frontend/src/business/components/api/home/ApiTestRecentList.vue @@ -56,6 +56,9 @@ created() { this.search(); + }, + activated() { + this.search(); } } diff --git a/frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue b/frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue index 1a4accc574..b615797a25 100644 --- a/frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue +++ b/frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue @@ -40,7 +40,7 @@ computed: { isShow() { let rt = this.assertions.duration; - return rt.value !== null && rt.value > 0; + return rt.value !== undefined; } } } diff --git a/frontend/src/business/components/common/components/MsTestHeatmap.vue b/frontend/src/business/components/common/components/MsTestHeatmap.vue index df843f1e74..181df63622 100644 --- a/frontend/src/business/components/common/components/MsTestHeatmap.vue +++ b/frontend/src/business/components/common/components/MsTestHeatmap.vue @@ -15,7 +15,7 @@ props: ['values'], data() { return { - endDate: new Date(), + endDate: (new Date().getTime() + 7*24*60*60*1000), colorRange: ['#ebedf0', '#c6e48b', '#7bc96f', '#239a3b', '#196127'], } }, diff --git a/frontend/src/business/components/performance/home/PerformanceReportRecentList.vue b/frontend/src/business/components/performance/home/PerformanceReportRecentList.vue index c89fc07c65..ede8d066a4 100644 --- a/frontend/src/business/components/performance/home/PerformanceReportRecentList.vue +++ b/frontend/src/business/components/performance/home/PerformanceReportRecentList.vue @@ -53,6 +53,9 @@ created() { this.search(); + }, + activated() { + this.search(); } } diff --git a/frontend/src/business/components/performance/home/PerformanceTestHome.vue b/frontend/src/business/components/performance/home/PerformanceTestHome.vue index 8d1a9fb72a..eb1d86f900 100644 --- a/frontend/src/business/components/performance/home/PerformanceTestHome.vue +++ b/frontend/src/business/components/performance/home/PerformanceTestHome.vue @@ -42,10 +42,18 @@ } }, mounted() { - this.result = this.$get('/performance/dashboard/tests', response => { - this.values = response.data; - }); + this.getValues(); }, + activated() { + this.getValues(); + }, + methods: { + getValues() { + this.result = this.$get('/performance/dashboard/tests', response => { + this.values = response.data; + }); + } + } } diff --git a/frontend/src/business/components/performance/home/PerformanceTestRecentList.vue b/frontend/src/business/components/performance/home/PerformanceTestRecentList.vue index 24fe757a6f..2790e989d4 100644 --- a/frontend/src/business/components/performance/home/PerformanceTestRecentList.vue +++ b/frontend/src/business/components/performance/home/PerformanceTestRecentList.vue @@ -54,6 +54,9 @@ created() { this.search(); + }, + activated() { + this.search(); } } diff --git a/frontend/src/business/components/project/MsProject.vue b/frontend/src/business/components/project/MsProject.vue index 74b55841fc..00b25f8301 100644 --- a/frontend/src/business/components/project/MsProject.vue +++ b/frontend/src/business/components/project/MsProject.vue @@ -122,6 +122,9 @@ } this.list(); }, + activated() { + this.list(); + }, watch: { '$route'(to) { if (this.$route.path.split('/')[2] === 'project' && diff --git a/frontend/src/business/components/settings/system/SystemParameterSetting.vue b/frontend/src/business/components/settings/system/SystemParameterSetting.vue index 0fed6518e2..cb35f98613 100644 --- a/frontend/src/business/components/settings/system/SystemParameterSetting.vue +++ b/frontend/src/business/components/settings/system/SystemParameterSetting.vue @@ -36,7 +36,7 @@ + autocomplete="new-password" show-password type="text" @focus="changeType" ref="input"> @@ -80,6 +80,8 @@ account: 'xjj0608@163.com', password: '2345678',*/ }, + + input: '', visible: true, result: {}, showEdit: true, @@ -116,11 +118,8 @@ }, methods: { changeType() { - this.type = 'password' + this.$refs.input = 'password' }, - /*changePass(value) { - this.visible = !(value === 'show'); - },*/ query() { this.result = this.$get("/system/mail/info", response => { this.$set(this.formInline, "host", response.data[0].paramValue); diff --git a/frontend/src/business/components/settings/system/TestResourcePool.vue b/frontend/src/business/components/settings/system/TestResourcePool.vue index 40ad3daf11..0f2153632e 100644 --- a/frontend/src/business/components/settings/system/TestResourcePool.vue +++ b/frontend/src/business/components/settings/system/TestResourcePool.vue @@ -364,12 +364,16 @@ this.form = {}; }, changeSwitch(row) { - this.result = this.$get('/testresourcepool/update/' + row.id + '/' + row.status) + this.result.loading = true; + this.$info(this.$t('test_resource_pool.check_in'), 1000); + this.$get('/testresourcepool/update/' + row.id + '/' + row.status) .then(() => { this.$success(this.$t('test_resource_pool.status_change_success')); + this.result.loading = false; }).catch(() => { this.$error(this.$t('test_resource_pool.status_change_failed')); row.status = 'INVALID'; + this.result.loading = false; }) } } diff --git a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue index 938a555ef4..c88a744184 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -13,6 +13,8 @@ + + @@ -138,6 +140,9 @@ :is-read-only="isReadOnly" @refreshTable="search"/> + + + @@ -173,6 +178,8 @@ export default { name: "TestPlanTestCaseList", components: { + TestCaseReportView, + TestReportTemplateList, MsTableOperatorButton, MsTableOperator, MethodTableItem, @@ -356,6 +363,9 @@ } this.initTableData(); }, + openTestReport() { + this.$refs.testReporTtemplateList.open(this.planId); + }, statusChange(param) { this.$post('/test/plan/case/edit' , param, () => { for (let i = 0; i < this.tableData.length; i++) { @@ -374,6 +384,16 @@ }); } }, + openReport(planId, id) { + this.getTestPlanById(); + if (!id) { + id = this.testPlan.reportId; + } + if (!planId) { + planId = this.planId; + } + this.$refs.testCaseReportView.open(planId, id); + }, filter(filters) { _filter(filters, this.condition); this.initTableData(); diff --git a/frontend/src/common/css/main.css b/frontend/src/common/css/main.css index 2e459aba95..cf8bb244a3 100644 --- a/frontend/src/common/css/main.css +++ b/frontend/src/common/css/main.css @@ -41,3 +41,9 @@ body { .table-card > .el-card__body { padding-top: 0; } + +/* Safari 表格不错位 */ +.el-table__body { + width: 100%; + table-layout: fixed !important; +} diff --git a/frontend/src/common/js/message.js b/frontend/src/common/js/message.js index a0ea8ca1af..04db7ebcfc 100644 --- a/frontend/src/common/js/message.js +++ b/frontend/src/common/js/message.js @@ -16,12 +16,12 @@ export default { }) }; - Vue.prototype.$info = function (message) { + Vue.prototype.$info = function (message, duration) { Message.info({ message: message, type: "info", showClose: true, - duration: 3000 + duration: duration || 3000 }) }; diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 8cbbfebd18..1fa1a79a9e 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -532,6 +532,7 @@ export default { 'delete_prompt': 'This operation will permanently delete the resource pool, continue?', 'status_change_success': 'Successfully changed the status!', 'status_change_failed': 'Failed to change the status, resource pool is invalid!', + 'check_in': 'Check in', }, system_parameter_setting: { 'mailbox_service_settings': 'Mailbox Service Settings', diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 3b62ff3136..96d58b3d30 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -531,6 +531,7 @@ export default { 'delete_prompt': '此操作将永久删除该资源池, 是否继续?', 'status_change_success': '状态修改成功!', 'status_change_failed': '状态修改失败, 校验不通过!', + 'check_in': '校验中', }, system_parameter_setting: { 'mailbox_service_settings': '邮件服务设置', diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index c74ae9a377..3e8d3a7f0d 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -530,6 +530,7 @@ export default { 'delete_prompt': '此操作將永久刪除該資源池, 是否繼續?', 'status_change_success': '狀態修改成功!', 'status_change_failed': '狀態修改失敗, 校驗不通過!', + 'check_in': '校驗中', }, system_parameter_setting: { 'mailbox_service_settings': '郵件服務設定', diff --git a/frontend/src/login/Login.vue b/frontend/src/login/Login.vue index 70678633a4..8d2fdad0cd 100644 --- a/frontend/src/login/Login.vue +++ b/frontend/src/login/Login.vue @@ -4,7 +4,7 @@
{{$t('commons.login')}}