Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
95ac318ee9
|
@ -332,7 +332,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
||||||
requestResult.addPassAssertions();
|
requestResult.addPassAssertions();
|
||||||
}
|
}
|
||||||
//xpath 提取错误会添加断言错误
|
//xpath 提取错误会添加断言错误
|
||||||
if (StringUtils.isBlank(responseAssertionResult.getMessage()) || !responseAssertionResult.getMessage().contains("The required item type of the first operand of")) {
|
if (StringUtils.isBlank(responseAssertionResult.getMessage()) || !responseAssertionResult.getName().endsWith("XPath2Extractor")) {
|
||||||
responseResult.getAssertions().add(responseAssertionResult);
|
responseResult.getAssertions().add(responseAssertionResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
select
|
select
|
||||||
t.id, t.environment_id, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id,
|
t.id, t.environment_id, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id,
|
||||||
c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level,
|
c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level,
|
||||||
c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description,
|
c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, c.tags, c.num,
|
||||||
p.name as project_name, p.id as project_id, u.name as user_name
|
p.name as project_name, p.id as project_id, u.name as user_name
|
||||||
from
|
from
|
||||||
test_plan_api_scenario t
|
test_plan_api_scenario t
|
||||||
|
@ -44,7 +44,9 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.name != null and request.name!=''">
|
<if test="request.name != null and request.name!=''">
|
||||||
and c.name like CONCAT('%', #{request.name},'%')
|
and (c.name like CONCAT('%', #{request.name},'%')
|
||||||
|
or c.num like CONCAT('%', #{request.name},'%')
|
||||||
|
or c.tags like CONCAT('%', #{request.name},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.status != null and request.status!=''">
|
<if test="request.status != null and request.status!=''">
|
||||||
and t.last_result like CONCAT('%', #{request.status},'%')
|
and t.last_result like CONCAT('%', #{request.status},'%')
|
||||||
|
|
|
@ -30,12 +30,6 @@
|
||||||
this.$refs.nameInput.focus();
|
this.$refs.nameInput.focus();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
editData() {
|
|
||||||
this.$refs.nameInput.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -86,10 +86,9 @@
|
||||||
import ApiRequestMethodSelect from "../../collapse/ApiRequestMethodSelect";
|
import ApiRequestMethodSelect from "../../collapse/ApiRequestMethodSelect";
|
||||||
import {REQUEST_HEADERS} from "@/common/js/constants";
|
import {REQUEST_HEADERS} from "@/common/js/constants";
|
||||||
import MsApiVariable from "../../ApiVariable";
|
import MsApiVariable from "../../ApiVariable";
|
||||||
import {createComponent} from "../../jmeter/components";
|
|
||||||
import MsApiAssertions from "../../assertion/ApiAssertions";
|
import MsApiAssertions from "../../assertion/ApiAssertions";
|
||||||
import MsApiExtract from "../../extract/ApiExtract";
|
import MsApiExtract from "../../extract/ApiExtract";
|
||||||
import {Assertions, Body, Extract, KeyValue} from "../../../model/ApiTestModel";
|
import {Body, KeyValue} from "../../../model/ApiTestModel";
|
||||||
import {getUUID} from "@/common/js/utils";
|
import {getUUID} from "@/common/js/utils";
|
||||||
import BatchAddParameter from "../../basis/BatchAddParameter";
|
import BatchAddParameter from "../../basis/BatchAddParameter";
|
||||||
import MsApiAdvancedConfig from "./ApiAdvancedConfig";
|
import MsApiAdvancedConfig from "./ApiAdvancedConfig";
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('api_test.definition.request.response_header')" name="headers" class="pane">
|
<el-tab-pane :label="$t('api_test.definition.request.response_header')" name="headers" class="pane">
|
||||||
|
<div style="width: 400px">
|
||||||
<pre>{{ response.responseResult.headers }}</pre>
|
<pre>{{ response.responseResult.headers }}</pre>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!--<el-tab-pane label="Cookie" name="cookie" class="pane cookie">-->
|
<!--<el-tab-pane label="Cookie" name="cookie" class="pane cookie">-->
|
||||||
<!--<pre>{{response.cookies}}</pre>-->
|
<!--<pre>{{response.cookies}}</pre>-->
|
||||||
|
@ -25,7 +27,9 @@
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('api_test.request.extract.label')" name="label" class="pane">
|
<el-tab-pane :label="$t('api_test.request.extract.label')" name="label" class="pane">
|
||||||
|
<div style="width: 400px">
|
||||||
<pre>{{response.responseResult.vars}}</pre>
|
<pre>{{response.responseResult.vars}}</pre>
|
||||||
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane :label="$t('api_report.request_body')" name="request_body" class="pane">
|
<el-tab-pane :label="$t('api_report.request_body')" name="request_body" class="pane">
|
||||||
|
|
|
@ -15,23 +15,6 @@
|
||||||
props: ['total', 'pageSize'],
|
props: ['total', 'pageSize'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
gridData: [{
|
|
||||||
date: '2016-05-02',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄'
|
|
||||||
}, {
|
|
||||||
date: '2016-05-04',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄'
|
|
||||||
}, {
|
|
||||||
date: '2016-05-01',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄'
|
|
||||||
}, {
|
|
||||||
date: '2016-05-03',
|
|
||||||
name: '王小虎',
|
|
||||||
address: '上海市普陀区金沙江路 1518 弄'
|
|
||||||
}]
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,8 @@
|
||||||
if (size) {
|
if (size) {
|
||||||
this.size = size;
|
this.size = size;
|
||||||
} else {
|
} else {
|
||||||
this.size = this.$parent.selectRows.size;
|
// this.size = this.$parent.selectRows.size;
|
||||||
|
this.size = this.$parent.selectDataCounts;
|
||||||
}
|
}
|
||||||
listenGoBack(this.handleClose);
|
listenGoBack(this.handleClose);
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
<el-table-column width="40" :resizable="false" align="center">
|
<el-table-column width="40" :resizable="false" align="center">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectRows.size"/>
|
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -292,6 +292,7 @@ export default {
|
||||||
},
|
},
|
||||||
currentCaseId: null,
|
currentCaseId: null,
|
||||||
projectId: "",
|
projectId: "",
|
||||||
|
selectDataCounts: 0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -328,6 +329,7 @@ export default {
|
||||||
this.condition.nodeIds = [];
|
this.condition.nodeIds = [];
|
||||||
this.condition.selectAll = false;
|
this.condition.selectAll = false;
|
||||||
this.condition.unSelectIds = [];
|
this.condition.unSelectIds = [];
|
||||||
|
this.selectDataCounts = 0;
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
// param.planId = this.planId;
|
// param.planId = this.planId;
|
||||||
this.condition.planId = this.planId;
|
this.condition.planId = this.planId;
|
||||||
|
@ -435,6 +437,7 @@ export default {
|
||||||
_handleSelect(this, selection, row, this.selectRows);
|
_handleSelect(this, selection, row, this.selectRows);
|
||||||
this.setUnSelectIds();
|
this.setUnSelectIds();
|
||||||
},
|
},
|
||||||
|
|
||||||
importTestCase() {
|
importTestCase() {
|
||||||
if (!getCurrentProjectID()) {
|
if (!getCurrentProjectID()) {
|
||||||
this.$warning(this.$t('commons.check_project_tip'));
|
this.$warning(this.$t('commons.check_project_tip'));
|
||||||
|
@ -553,6 +556,11 @@ export default {
|
||||||
this.condition.unSelectIds = allIDs.filter(function (val) {
|
this.condition.unSelectIds = allIDs.filter(function (val) {
|
||||||
return ids.indexOf(val) === -1
|
return ids.indexOf(val) === -1
|
||||||
});
|
});
|
||||||
|
if (this.condition.selectAll) {
|
||||||
|
this.selectDataCounts = this.total - this.condition.unSelectIds.length;
|
||||||
|
} else {
|
||||||
|
this.selectDataCounts = this.selectRows.size;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
moveSave(param) {
|
moveSave(param) {
|
||||||
param.condition = this.condition;
|
param.condition = this.condition;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.length"/>
|
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.length"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="num" label="ID"/>
|
||||||
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')"
|
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')"
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
|
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div v-for="itemName in scope.row.tagNames" :key="itemName">
|
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||||
<ms-tag type="success" effect="plain" :content="itemName"/>
|
<ms-tag type="success" effect="plain" :content="itemName"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -159,6 +160,11 @@
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.tags && item.tags.length > 0) {
|
||||||
|
item.tags = JSON.parse(item.tags);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
:condition="condition"
|
:condition="condition"
|
||||||
@search="$emit('refresh')"
|
@search="$emit('refresh')"
|
||||||
:show-create="false"
|
:show-create="false"
|
||||||
:tip="$t('commons.search_by_name_or_id')">
|
:tip="$t('commons.search_by_id_name_tag')">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
场景用例
|
场景用例
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue