diff --git a/backend/.gitignore b/backend/.gitignore index 44cceecb40..b4e1c2fed7 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -31,4 +31,5 @@ target .settings .project .classpath -.factorypath \ No newline at end of file +.factorypath +*.jar \ No newline at end of file diff --git a/backend/pom.xml b/backend/pom.xml index af84159f0c..50e2ee6ea5 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -369,6 +369,16 @@ 2.6 + + org.apache.maven.plugins + maven-jar-plugin + + + **/jmeter/lib/**/*.jar + + + + org.apache.maven.plugins maven-antrun-plugin @@ -396,6 +406,35 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + copy + generate-resources + + copy + + + + + + + org.apache.jmeter + ApacheJMeter_functions + ${jmeter.version} + jar + true + src/main/resources/jmeter/lib/ext + ApacheJMeter_functions.jar + + + ${project.build.directory}/wars + false + true + + org.mybatis.generator mybatis-generator-maven-plugin diff --git a/backend/src/main/java/io/metersphere/xpack b/backend/src/main/java/io/metersphere/xpack index b86032cbbd..8eff343619 160000 --- a/backend/src/main/java/io/metersphere/xpack +++ b/backend/src/main/java/io/metersphere/xpack @@ -1 +1 @@ -Subproject commit b86032cbbda9a9e6028308aa95a887cff2192f1c +Subproject commit 8eff343619df1572e1cded52f173257ef4b518a1 diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 6f07a9bf57..cc3c37684b 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -118,7 +118,6 @@ test_case_already_exists_excel=There are duplicate test cases in the import file test_case_module_already_exists=The module name already exists at the same level api_test_name_already_exists=Test name already exists functional_method_tip=Functional test not support auto method - #ldap ldap_url_is_null=LDAP address is empty ldap_dn_is_null=LDAP binding DN is empty @@ -136,4 +135,10 @@ login_fail_email_null=Login failed, user mailbox is empty login_fail_ou_error=Login failed, please check the user OU login_fail_filter_error=Login failed, please check the user filter check_ldap_mapping=Check LDAP attribute mapping -ldap_mapping_value_null=LDAP user attribute mapping field is empty \ No newline at end of file +ldap_mapping_value_null=LDAP user attribute mapping field is empty +#quota +quota_workspace_excess_org_api=The total number of interface tests in the workspace cannot exceed the organization's quota +quota_workspace_excess_org_performance=The total number of performance tests for the workspace cannot exceed the organization's quota +quota_workspace_excess_org_max_threads=The maximum concurrent number of workspaces cannot exceed the quota of the organization +quota_workspace_excess_org_max_duration=The stress test duration of the workspace cannot exceed the organization's quota +quota_workspace_excess_org_resource_pool=The resource pool of the workspace cannot exceed the resource pool of the organization \ 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 a4e890d91c..e7870873c5 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -118,7 +118,6 @@ test_case_already_exists_excel=导入文件中存在重复用例 test_case_module_already_exists=同层级下已存在该模块名称 api_test_name_already_exists=测试名称已经存在 functional_method_tip=功能测试不支持自动方式 - #ldap ldap_url_is_null=LDAP地址为空 ldap_dn_is_null=LDAP绑定DN为空 @@ -137,5 +136,12 @@ login_fail_ou_error=登录失败,请检查用户OU login_fail_filter_error=登录失败,请检查用户过滤器 check_ldap_mapping=检查LDAP属性映射 ldap_mapping_value_null=LDAP用户属性映射字段为空值 +#quota +quota_workspace_excess_org_api=工作空间的接口测试数量总和不能超过组织的配额 +quota_workspace_excess_org_performance=工作空间的性能测试数量总和不能超过组织的配额 +quota_workspace_excess_org_max_threads=工作空间的最大并发数不能超过组织的配额 +quota_workspace_excess_org_max_duration=工作空间的压测时长不能超过组织的配额 +quota_workspace_excess_org_resource_pool=工作空间的资源池不能超过组织的资源池范围 + diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 326ed9f4f1..00aaf178ce 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -118,7 +118,6 @@ test_case_already_exists_excel=導入文件中存在重復用例 test_case_module_already_exists=同層級下已存在該模塊名稱 api_test_name_already_exists=測試名稱已經存在 functional_method_tip=功能測試不支持自動方式 - #ldap ldap_url_is_null=LDAP地址為空 ldap_dn_is_null=LDAP綁定DN為空 @@ -137,3 +136,9 @@ login_fail_ou_error=登錄失敗,請檢查用戶OU login_fail_filter_error=登錄失敗,請檢查用戶過濾器 check_ldap_mapping=檢查LDAP屬性映射 ldap_mapping_value_null=LDAP用戶屬性映射預設為空值 +#quota +quota_workspace_excess_org_api=工作空間的接口測試數量總和不能超過組織的配額 +quota_workspace_excess_org_performance=工作空間的性能測試數量總和不能超過組織的配額 +quota_workspace_excess_org_max_threads=工作空間的最大並發數不能超過組織的配額 +quota_workspace_excess_org_max_duration=工作空間的壓測時長不能超過組織的配額 +quota_workspace_excess_org_resource_pool=工作空間的資源池不能超過組織的資源池範圍 diff --git a/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue b/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue index e31efeccbc..f099b402e6 100644 --- a/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue +++ b/frontend/src/business/components/api/test/components/processor/BeanShellProcessor.vue @@ -1,16 +1,54 @@ @@ -35,8 +83,28 @@ } .script-content { - padding: 15px 0; - height: 300px; + height: calc(100vh - 570px); + } + + .script-index { + padding: 0 20px; + } + + .script-index div:first-child { + font-weight: bold; + font-size: 15px; + } + + .template-title { + margin-bottom: 5px; + } + + .document-url { + margin-top: 10px; + } + + .instructions-icon { + margin-left: 5px; } diff --git a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue index a3e8ff3c1f..363f807b5a 100644 --- a/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue +++ b/frontend/src/business/components/api/test/components/request/ApiHttpRequestForm.vue @@ -68,10 +68,10 @@ - + - + diff --git a/frontend/src/business/components/api/test/model/JMX.js b/frontend/src/business/components/api/test/model/JMX.js index be589de537..a30245399b 100644 --- a/frontend/src/business/components/api/test/model/JMX.js +++ b/frontend/src/business/components/api/test/model/JMX.js @@ -423,10 +423,7 @@ export class BeanShellPreProcessor extends BeanShellProcessor { } export class BeanShellPostProcessor extends BeanShellProcessor { - constructor(testName, script) { - let processor = { - script: script, - }; + constructor(testName, processor) { super('BeanShellPostProcessor', 'TestBeanGUI', 'BeanShellPostProcessor', testName, processor) } } diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js index c7df9181a4..a2f261f2a8 100644 --- a/frontend/src/business/components/api/test/model/ScenarioModel.js +++ b/frontend/src/business/components/api/test/model/ScenarioModel.js @@ -1,5 +1,5 @@ import { - Arguments, BeanShellPreProcessor, + Arguments, BeanShellPostProcessor, BeanShellPreProcessor, CookieManager, DubboSample, DurationAssertion, @@ -906,7 +906,7 @@ class JMXGenerator { httpSamplerProxy.put(new BeanShellPreProcessor(name, request.beanShellPreProcessor)); } if (request.beanShellPostProcessor && request.beanShellPostProcessor.script) { - httpSamplerProxy.put(new BeanShellPreProcessor(name, request.beanShellPostProcessor)); + httpSamplerProxy.put(new BeanShellPostProcessor(name, request.beanShellPostProcessor)); } } diff --git a/frontend/src/business/components/common/components/MsInstructionsIcon.vue b/frontend/src/business/components/common/components/MsInstructionsIcon.vue new file mode 100644 index 0000000000..75222bd071 --- /dev/null +++ b/frontend/src/business/components/common/components/MsInstructionsIcon.vue @@ -0,0 +1,53 @@ + + + + + diff --git a/frontend/src/business/components/xpack b/frontend/src/business/components/xpack index 7e4d80cc2b..06fc0a321a 160000 --- a/frontend/src/business/components/xpack +++ b/frontend/src/business/components/xpack @@ -1 +1 @@ -Subproject commit 7e4d80cc2b870a8cac6dbb9fe6711ab6041faf6d +Subproject commit 06fc0a321a9886419be5c607ddaa6b40efb5179b diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 5c051730da..876f38fa8c 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -108,6 +108,7 @@ export default { formatErr: 'Format Error', id: 'ID', please_upload: 'Please upload file', + reference_documentation: "Reference documentation", date: { select_date: 'Select date', start_date: 'Start date', @@ -459,6 +460,17 @@ export default { json_path_expression: "JSONPath expression", xpath_expression: "XPath expression", }, + processor: { + pre_exec_script : "PreProcessor", + post_exec_script: "PostProcessor", + code_template: "Code template", + bean_shell_processor_tip: "Currently only BeanShell scripts are supported", + code_template_get_variable: "Get variable", + code_template_set_variable: "Set variable", + code_template_get_response_header: "Get response header", + code_template_get_response_code: "Get response code", + code_template_get_response_result: "Get response result" + }, dubbo: { protocol: "protocol", input_interface: "Please enter the interface", @@ -816,5 +828,7 @@ export default { modify: "Modify Quota", edit_quota_title: "{0} quota", workspace_quota_list: "Workspace quota list of {0}", + unlimited: "Unlimited", + clean: "Clean" } }; diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index d66e7aa1a0..312dee0e64 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -107,6 +107,7 @@ export default { please_upload: '请上传文件', formatErr: '格式错误', please_save: '请先保存', + reference_documentation: "参考文档", id: 'ID', date: { select_date: '选择日期', @@ -460,6 +461,17 @@ export default { json_path_expression: "JSONPath表达式", xpath_expression: "XPath表达式", }, + processor: { + pre_exec_script : "预执行脚本", + post_exec_script: "后执行脚本", + code_template: "代码模版", + bean_shell_processor_tip: "仅支持 BeanShell 脚本", + code_template_get_variable: "获取变量", + code_template_set_variable: "设置变量", + code_template_get_response_header: "获取响应头", + code_template_get_response_code: "获取响应码", + code_template_get_response_result: "获取响应结果" + }, dubbo: { protocol: "协议", input_interface: "请输入Interface", @@ -818,5 +830,7 @@ export default { modify: "修改配额", edit_quota_title: "{0}的配额", workspace_quota_list: "{0}的工作空间配额列表", + unlimited: "无限制", + clean: "清空" } }; diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 7ad2882d79..6ab426fbc4 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -105,6 +105,7 @@ export default { formatErr: '格式錯誤', please_save: '請先保存', id: 'ID', + reference_documentation: "參考文檔", please_upload: '請上傳文件', date: { select_date: '選擇日期', @@ -459,6 +460,17 @@ export default { json_path_expression: "JSONPath運算式", xpath_expression: "XPath運算式", }, + processor: { + pre_exec_script : "預執行腳本", + post_exec_script: "後執行腳本", + code_template: "代碼模版", + bean_shell_processor_tip: "僅支持 BeanShell 腳本", + code_template_get_variable: "獲取變量", + code_template_set_variable: "設置變量", + code_template_get_response_header: "獲取響應頭", + code_template_get_response_code: "獲取響應碼", + code_template_get_response_result: "獲取響應結果" + }, dubbo: { protocol: "協定", input_interface: "請輸入Interface", @@ -815,5 +827,7 @@ export default { modify: "修改配額", edit_quota_title: "{0}的配額", workspace_quota_list: "{0}的工作空間配額列表", + unlimited: "無限制", + clean: "清空" } };