Merge branch 'master' of https://github.com/metersphere/metersphere
This commit is contained in:
commit
0655c509bf
|
@ -173,7 +173,7 @@ public class HarParser extends HarAbstractParser {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
HarPostData content = requestBody.postData;
|
HarPostData content = requestBody.postData;
|
||||||
if (!StringUtils.equalsIgnoreCase("GET", requestBody.method) || requestBody.postData == null) {
|
if (StringUtils.equalsIgnoreCase("GET", requestBody.method) || requestBody.postData == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
String contentType = content.mimeType;
|
String contentType = content.mimeType;
|
||||||
|
|
|
@ -148,5 +148,6 @@
|
||||||
<if test="request.name!=null">
|
<if test="request.name!=null">
|
||||||
AND file_metadata.name LIKE CONCAT('%', #{request.name}, '%')
|
AND file_metadata.name LIKE CONCAT('%', #{request.name}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
order by update_time DESC
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -22,7 +22,8 @@ public class ScriptEngineUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String calculate(String input) {
|
// graal.js 禁止多线程同时访问,加上 synchronized
|
||||||
|
public synchronized static String calculate(String input) {
|
||||||
try {
|
try {
|
||||||
return engine.eval("calculate('" + input + "')").toString();
|
return engine.eval("calculate('" + input + "')").toString();
|
||||||
} catch (ScriptException e) {
|
} catch (ScriptException e) {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly" @setEnvironment="setEnvironment"/>
|
<ms-environment-select :project-id="projectId" v-if="isTestPlan" :is-read-only="isReadOnly" @setEnvironment="setEnvironment"/>
|
||||||
|
|
||||||
<el-input :placeholder="$t('api_monitor.please_search')" @blur="initTable" class="search-input" size="small" @keyup.enter.native="initTable" v-model="condition.name"/>
|
<el-input :placeholder="$t('api_test.definition.request.select_api')" @blur="initTable" class="search-input" size="small" @keyup.enter.native="initTable" v-model="condition.name"/>
|
||||||
|
|
||||||
<el-table v-loading="result.loading"
|
<el-table v-loading="result.loading"
|
||||||
border
|
border
|
||||||
|
|
|
@ -221,15 +221,6 @@ export default {
|
||||||
f().then(res => {
|
f().then(res => {
|
||||||
let response = res.data;
|
let response = res.data;
|
||||||
if (response.data.length === 0) {
|
if (response.data.length === 0) {
|
||||||
let type = file.name.substring(file.name.lastIndexOf(".") + 1);
|
|
||||||
|
|
||||||
this.tableData.push({
|
|
||||||
name: file.name,
|
|
||||||
size: (file.size / 1024).toFixed(2) + ' KB',
|
|
||||||
type: type.toUpperCase(),
|
|
||||||
updateTime: file.lastModified,
|
|
||||||
});
|
|
||||||
|
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
this.$error(this.$t('load_test.project_file_exist') + ', name: ' + file.name);
|
this.$error(this.$t('load_test.project_file_exist') + ', name: ' + file.name);
|
||||||
|
@ -241,21 +232,21 @@ export default {
|
||||||
|
|
||||||
let file = uploadResources.file;
|
let file = uploadResources.file;
|
||||||
this.checkFileExist(file, () => {
|
this.checkFileExist(file, () => {
|
||||||
self.uploadList.push(file);
|
let formData = new FormData();
|
||||||
let type = file.name.substring(file.name.lastIndexOf(".") + 1);
|
let url = '/project/upload/files/' + getCurrentProjectID()
|
||||||
if (type.toLowerCase() !== 'jmx') {
|
formData.append("file", file);
|
||||||
return;
|
let options = {
|
||||||
|
method: 'POST',
|
||||||
|
url: url,
|
||||||
|
data: formData,
|
||||||
|
headers: {
|
||||||
|
'Content-Type': undefined
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let jmxReader = new FileReader();
|
self.$request(options, (response) => {
|
||||||
jmxReader.onload = (event) => {
|
self.$success(this.$t('commons.save_success'));
|
||||||
let threadGroups = findThreadGroup(event.target.result, file.name);
|
self.getProjectFiles();
|
||||||
threadGroups.forEach(tg => {
|
});
|
||||||
tg.options = {};
|
|
||||||
self.scenarios.push(tg);
|
|
||||||
});
|
|
||||||
self.$emit('fileChange', self.scenarios);
|
|
||||||
};
|
|
||||||
jmxReader.readAsText(file);
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleExceed() {
|
handleExceed() {
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
:show-create="false"
|
:show-create="false"
|
||||||
:tip="$t('commons.search_by_id_name_tag')">
|
:tip="$t('commons.search_by_id_name_tag')">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
接口用例
|
{{ $t('api_test.home_page.failed_case_list.table_value.case_type.api') }}
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:button>
|
<template v-slot:button>
|
||||||
<ms-table-button :is-tester-permission="true" icon="el-icon-connection"
|
<ms-table-button :is-tester-permission="true" icon="el-icon-connection"
|
||||||
|
|
|
@ -90,26 +90,26 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">
|
<!-- <el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">-->
|
||||||
<el-col class="test-detail" :span="20" :offset="1">
|
<!-- <el-col class="test-detail" :span="20" :offset="1">-->
|
||||||
<el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">
|
<!-- <el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">-->
|
||||||
<el-tab-pane name="detail" :label="$t('test_track.plan_view.test_detail')">
|
<!-- <el-tab-pane name="detail" :label="$t('test_track.plan_view.test_detail')">-->
|
||||||
<api-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'api'" @runTest="testRun"
|
<!-- <api-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'api'" @runTest="testRun"-->
|
||||||
:id="testCase.testId" ref="apiTestDetail"/>
|
<!-- :id="testCase.testId" ref="apiTestDetail"/>-->
|
||||||
<performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"
|
<!-- <performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"-->
|
||||||
@runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>
|
<!-- @runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>-->
|
||||||
</el-tab-pane>
|
<!-- </el-tab-pane>-->
|
||||||
<el-tab-pane name="result" :label="$t('test_track.plan_view.test_result')">
|
<!-- <el-tab-pane name="result" :label="$t('test_track.plan_view.test_result')">-->
|
||||||
<api-test-result :report-id="testCase.reportId" v-if=" testCase.type === 'api'"
|
<!-- <api-test-result :report-id="testCase.reportId" v-if=" testCase.type === 'api'"-->
|
||||||
ref="apiTestResult"/>
|
<!-- ref="apiTestResult"/>-->
|
||||||
<performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"
|
<!-- <performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"-->
|
||||||
v-if="testCase.type === 'performance'" ref="performanceTestResult"/>
|
<!-- v-if="testCase.type === 'performance'" ref="performanceTestResult"/>-->
|
||||||
</el-tab-pane>
|
<!-- </el-tab-pane>-->
|
||||||
</el-tabs>
|
<!-- </el-tabs>-->
|
||||||
</el-col>
|
<!-- </el-col>-->
|
||||||
</el-row>
|
<!-- </el-row>-->
|
||||||
|
|
||||||
<el-row v-if="testCase.method && testCase.method !== 'auto'">
|
<el-row>
|
||||||
<el-col :span="22" :offset="1">
|
<el-col :span="22" :offset="1">
|
||||||
<div>
|
<div>
|
||||||
<span class="cast_label">{{ $t('test_track.case.steps') }}:</span>
|
<span class="cast_label">{{ $t('test_track.case.steps') }}:</span>
|
||||||
|
@ -641,7 +641,7 @@ export default {
|
||||||
this.$post('/test/plan/edit/status/' + planId);
|
this.$post('/test/plan/edit/status/' + planId);
|
||||||
},
|
},
|
||||||
stepResultChange() {
|
stepResultChange() {
|
||||||
if (this.testCase.method === 'manual') {
|
if (this.testCase.method === 'manual' || !this.testCase.method) {
|
||||||
this.isFailure = this.testCase.steptResults.filter(s => {
|
this.isFailure = this.testCase.steptResults.filter(s => {
|
||||||
return s.executeResult === 'Failure' || s.executeResult === 'Blocking';
|
return s.executeResult === 'Failure' || s.executeResult === 'Blocking';
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<ms-tag v-for="(tag, index) in scope.row.showTags" :key="tag + '_' + index" type="success" effect="plain" :content="tag" style="margin-left: 5px"/>
|
<ms-tag v-for="(tag, index) in scope.row.showTags" :key="tag + '_' + index" type="success" effect="plain" :content="tag" style="margin-left: 0px; margin-right: 2px"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 07951ba17aef6f29e50cfd68e40de3266f9a60cd
|
Subproject commit 2115bd28a90854d2b6276a90878934715498c584
|
|
@ -602,6 +602,7 @@ export default {
|
||||||
update_time_order_desc: "from back to front by update time",
|
update_time_order_desc: "from back to front by update time",
|
||||||
run_env: "Operating environment",
|
run_env: "Operating environment",
|
||||||
select_case: "Search use cases",
|
select_case: "Search use cases",
|
||||||
|
select_api: "Search api",
|
||||||
case: "Case",
|
case: "Case",
|
||||||
title: "Create api",
|
title: "Create api",
|
||||||
path_info: "Please enter the URL of the interface, such as /api/demo/#{id}, where id is the path parameter",
|
path_info: "Please enter the URL of the interface, such as /api/demo/#{id}, where id is the path parameter",
|
||||||
|
|
|
@ -602,6 +602,7 @@ export default {
|
||||||
update_time_order_desc: "按更新时间从后到前",
|
update_time_order_desc: "按更新时间从后到前",
|
||||||
run_env: "运行环境",
|
run_env: "运行环境",
|
||||||
select_case: "搜索用例",
|
select_case: "搜索用例",
|
||||||
|
select_api: "搜索接口",
|
||||||
case: "用例",
|
case: "用例",
|
||||||
responsible: "责任人",
|
responsible: "责任人",
|
||||||
title: "创建接口",
|
title: "创建接口",
|
||||||
|
|
|
@ -601,6 +601,7 @@ export default {
|
||||||
update_time_order_desc: "按更新時間從後到前",
|
update_time_order_desc: "按更新時間從後到前",
|
||||||
run_env: "運行環境",
|
run_env: "運行環境",
|
||||||
select_case: "搜索用例",
|
select_case: "搜索用例",
|
||||||
|
select_api: "搜索接口",
|
||||||
case: "用例",
|
case: "用例",
|
||||||
responsible: "責任人",
|
responsible: "責任人",
|
||||||
title: "創建接口",
|
title: "創建接口",
|
||||||
|
|
Loading…
Reference in New Issue