diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 1ae50558f5..fd4af9a938 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -154,7 +154,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.node_id in diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml index b29d44d1c3..cc07abc4bf 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanTestCaseMapper.xml @@ -126,7 +126,7 @@ - and test_case.name like CONCAT('%', #{request.name},'%') + and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%')) and test_case.id = #{request.id} @@ -185,7 +185,14 @@ order by - test_plan_test_case.${order.name} ${order.type} + + + test_case.num ${order.type} + + + test_plan_test_case.${order.name} ${order.type} + + diff --git a/frontend/src/business/components/api/test/components/ApiKeyValue.vue b/frontend/src/business/components/api/test/components/ApiKeyValue.vue index 4767c331d7..d3632a17d2 100644 --- a/frontend/src/business/components/api/test/components/ApiKeyValue.vue +++ b/frontend/src/business/components/api/test/components/ApiKeyValue.vue @@ -76,6 +76,7 @@

{{ $t('api_test.request.parameters_filter_example') }}:@string(10) | md5 | substr: 1, 3

{{ $t('api_test.request.parameters_filter_example') }}:@integer(1, 5) | concat:_metersphere

+

{{ $t('api_test.request.parameters_filter_tips') }}

@@ -84,7 +85,7 @@ + + diff --git a/frontend/src/business/components/settings/organization/ServiceIntegration.vue b/frontend/src/business/components/settings/organization/ServiceIntegration.vue new file mode 100644 index 0000000000..a4ba653d67 --- /dev/null +++ b/frontend/src/business/components/settings/organization/ServiceIntegration.vue @@ -0,0 +1,30 @@ + + + + + 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 ba84c3c3ba..25fa17cb0c 100644 --- a/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/TestPlanTestCaseList.vue @@ -55,6 +55,7 @@ @@ -497,6 +498,10 @@ this.initTableData(); }, sort(column) { + // 每次只对一个字段排序 + if (this.condition.orders) { + this.condition.orders = []; + } _sort(column, this.condition); this.initTableData(); }, diff --git a/frontend/src/common/js/constants.js b/frontend/src/common/js/constants.js index 349daa7119..302477cd60 100644 --- a/frontend/src/common/js/constants.js +++ b/frontend/src/common/js/constants.js @@ -111,3 +111,41 @@ export const MOCKJS_FUNC = [ {name: '@id'}, {name: '@increment'} ] + +export const JMETER_FUNC = [ + {name: "${__threadNum}"}, + {name: "${__samplerName}"}, + {name: "${__machineIP}"}, + {name: "${__machineName}"}, + {name: "${__time}"}, + {name: "${__log}"}, + {name: "${__logn}"}, + {name: "${__StringFromFile}"}, + {name: "${__FileToString}"}, + {name: "${__CSVRead}"}, + {name: "${__XPath}"}, + {name: "${__counter}"}, + {name: "${__intSum}"}, + {name: "${__longSum}"}, + {name: "${__Random}"}, + {name: "${__RandomString}"}, + {name: "${__UUID}"}, + {name: "${__BeanShell}"}, + {name: "${__javaScript}"}, + {name: "${__jexl}"}, + {name: "${__jexl2}"}, + {name: "${__property}"}, + {name: "${__P}"}, + {name: "${__setProperty}"}, + {name: "${__split}"}, + {name: "${__V}"}, + {name: "${__eval}"}, + {name: "${__evalVar}"}, + {name: "${__regexFunction}"}, + {name: "${__escapeOroRegexpChars}"}, + {name: "${__char}"}, + {name: "${__unescape}"}, + {name: "${__unescapeHtml}"}, + {name: "${__escapeHtml}"}, + {name: "${__TestPlanName}"}, +] diff --git a/frontend/src/i18n/en-US.js b/frontend/src/i18n/en-US.js index 8bd5db7518..535d5572e8 100644 --- a/frontend/src/i18n/en-US.js +++ b/frontend/src/i18n/en-US.js @@ -387,6 +387,7 @@ export default { path_description: "etc:/login", parameters: "Query parameters", parameters_filter_example: "Example", + parameters_filter_tips: "Only support MockJs function result preview", parameters_advance: "Advanced parameter settings", parameters_preview: "Preview", parameters_preview_warning: "Please enter the template first", @@ -497,9 +498,9 @@ export default { execution_result: ": Please select the execution result", actual_result: ": The actual result is empty", case: { - input_test_case:'Please enter the associated case name', - test_name:'TestName', - other:'--Other--', + input_test_case: 'Please enter the associated case name', + test_name: 'TestName', + other: '--Other--', test_case: "Case", move: "Move case", case_list: "Test case list", diff --git a/frontend/src/i18n/zh-CN.js b/frontend/src/i18n/zh-CN.js index 094949637a..6bce5031ee 100644 --- a/frontend/src/i18n/zh-CN.js +++ b/frontend/src/i18n/zh-CN.js @@ -387,6 +387,7 @@ export default { parameters_filter: "内置函数", parameters_filter_desc: "使用方法", parameters_filter_example: "示例", + parameters_filter_tips: "只支持 MockJs 函数结果预览", parameters_advance: "高级参数设置", parameters_preview: "预览", parameters_preview_warning: "请先输入模版", diff --git a/frontend/src/i18n/zh-TW.js b/frontend/src/i18n/zh-TW.js index 211873c9f7..eac1411442 100644 --- a/frontend/src/i18n/zh-TW.js +++ b/frontend/src/i18n/zh-TW.js @@ -386,6 +386,7 @@ export default { url_invalid: "URL無效", parameters: "請求參數", parameters_filter_example: "示例", + parameters_filter_tips: "只支持MockJs函數結果預覽", parameters_advance: "高級參數設置", parameters_preview: "預覽", parameters_preview_warning: "請先輸入模版", @@ -496,9 +497,9 @@ export default { execution_result: ": 請選擇執行結果", actual_result: ": 實際結果為空", case: { - input_test_case:'請輸入關聯用例名稱', - test_name:'測試名稱', - other:'--其他--', + input_test_case: '請輸入關聯用例名稱', + test_name: '測試名稱', + other: '--其他--', test_case: "測試用例", move: "移動用例", case_list: "用例列表",