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;
|
||||
}
|
||||
HarPostData content = requestBody.postData;
|
||||
if (!StringUtils.equalsIgnoreCase("GET", requestBody.method) || requestBody.postData == null) {
|
||||
if (StringUtils.equalsIgnoreCase("GET", requestBody.method) || requestBody.postData == null) {
|
||||
return;
|
||||
}
|
||||
String contentType = content.mimeType;
|
||||
|
|
|
@ -148,5 +148,6 @@
|
|||
<if test="request.name!=null">
|
||||
AND file_metadata.name LIKE CONCAT('%', #{request.name}, '%')
|
||||
</if>
|
||||
order by update_time DESC
|
||||
</select>
|
||||
</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 {
|
||||
return engine.eval("calculate('" + input + "')").toString();
|
||||
} catch (ScriptException e) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<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"
|
||||
border
|
||||
|
|
|
@ -221,15 +221,6 @@ export default {
|
|||
f().then(res => {
|
||||
let response = res.data;
|
||||
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();
|
||||
} else {
|
||||
this.$error(this.$t('load_test.project_file_exist') + ', name: ' + file.name);
|
||||
|
@ -241,21 +232,21 @@ export default {
|
|||
|
||||
let file = uploadResources.file;
|
||||
this.checkFileExist(file, () => {
|
||||
self.uploadList.push(file);
|
||||
let type = file.name.substring(file.name.lastIndexOf(".") + 1);
|
||||
if (type.toLowerCase() !== 'jmx') {
|
||||
return;
|
||||
let formData = new FormData();
|
||||
let url = '/project/upload/files/' + getCurrentProjectID()
|
||||
formData.append("file", file);
|
||||
let options = {
|
||||
method: 'POST',
|
||||
url: url,
|
||||
data: formData,
|
||||
headers: {
|
||||
'Content-Type': undefined
|
||||
}
|
||||
}
|
||||
let jmxReader = new FileReader();
|
||||
jmxReader.onload = (event) => {
|
||||
let threadGroups = findThreadGroup(event.target.result, file.name);
|
||||
threadGroups.forEach(tg => {
|
||||
tg.options = {};
|
||||
self.scenarios.push(tg);
|
||||
});
|
||||
self.$emit('fileChange', self.scenarios);
|
||||
};
|
||||
jmxReader.readAsText(file);
|
||||
self.$request(options, (response) => {
|
||||
self.$success(this.$t('commons.save_success'));
|
||||
self.getProjectFiles();
|
||||
});
|
||||
})
|
||||
},
|
||||
handleExceed() {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
:show-create="false"
|
||||
:tip="$t('commons.search_by_id_name_tag')">
|
||||
<template v-slot:title>
|
||||
接口用例
|
||||
{{ $t('api_test.home_page.failed_case_list.table_value.case_type.api') }}
|
||||
</template>
|
||||
<template v-slot:button>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-connection"
|
||||
|
|
|
@ -90,26 +90,26 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">
|
||||
<el-col class="test-detail" :span="20" :offset="1">
|
||||
<el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">
|
||||
<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"
|
||||
:id="testCase.testId" ref="apiTestDetail"/>
|
||||
<performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"
|
||||
@runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>
|
||||
</el-tab-pane>
|
||||
<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'"
|
||||
ref="apiTestResult"/>
|
||||
<performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"
|
||||
v-if="testCase.type === 'performance'" ref="performanceTestResult"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row v-if="testCase.method === 'auto' && testCase.testId && testCase.testId != 'other'">-->
|
||||
<!-- <el-col class="test-detail" :span="20" :offset="1">-->
|
||||
<!-- <el-tabs v-model="activeTab" type="border-card" @tab-click="testTabChange">-->
|
||||
<!-- <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"-->
|
||||
<!-- :id="testCase.testId" ref="apiTestDetail"/>-->
|
||||
<!-- <performance-test-detail :is-read-only="isReadOnly" v-if="testCase.type === 'performance'"-->
|
||||
<!-- @runTest="testRun" :id="testCase.testId" ref="performanceTestDetail"/>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- <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'"-->
|
||||
<!-- ref="apiTestResult"/>-->
|
||||
<!-- <performance-test-result :is-read-only="isReadOnly" :report-id="testCase.reportId"-->
|
||||
<!-- v-if="testCase.type === 'performance'" ref="performanceTestResult"/>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
<!-- </el-tabs>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-row v-if="testCase.method && testCase.method !== 'auto'">
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
<div>
|
||||
<span class="cast_label">{{ $t('test_track.case.steps') }}:</span>
|
||||
|
@ -641,7 +641,7 @@ export default {
|
|||
this.$post('/test/plan/edit/status/' + planId);
|
||||
},
|
||||
stepResultChange() {
|
||||
if (this.testCase.method === 'manual') {
|
||||
if (this.testCase.method === 'manual' || !this.testCase.method) {
|
||||
this.isFailure = this.testCase.steptResults.filter(s => {
|
||||
return s.executeResult === 'Failure' || s.executeResult === 'Blocking';
|
||||
}).length > 0;
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
:key="index"
|
||||
>
|
||||
<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>
|
||||
</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",
|
||||
run_env: "Operating environment",
|
||||
select_case: "Search use cases",
|
||||
select_api: "Search api",
|
||||
case: "Case",
|
||||
title: "Create api",
|
||||
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: "按更新时间从后到前",
|
||||
run_env: "运行环境",
|
||||
select_case: "搜索用例",
|
||||
select_api: "搜索接口",
|
||||
case: "用例",
|
||||
responsible: "责任人",
|
||||
title: "创建接口",
|
||||
|
|
|
@ -601,6 +601,7 @@ export default {
|
|||
update_time_order_desc: "按更新時間從後到前",
|
||||
run_env: "運行環境",
|
||||
select_case: "搜索用例",
|
||||
select_api: "搜索接口",
|
||||
case: "用例",
|
||||
responsible: "責任人",
|
||||
title: "創建接口",
|
||||
|
|
Loading…
Reference in New Issue