fix(接口测试): 修复执行测试用例显示测试中,无法停止问题
--bug=1009232 --user=赵勇 【接口测试】执行测试用例还是一直执行中【+github#8807】 https://www.tapd.cn/55049933/s/1087011
This commit is contained in:
parent
b3427b0714
commit
6a89622f5e
|
@ -60,7 +60,7 @@ export default {
|
||||||
if (this.apiItem && this.apiItem.id) {
|
if (this.apiItem && this.apiItem.id) {
|
||||||
let url = "/api/definition/report/getReport/" + this.apiItem.id;
|
let url = "/api/definition/report/getReport/" + this.apiItem.id;
|
||||||
this.$get(url, response => {
|
this.$get(url, response => {
|
||||||
if (response.data) {
|
if (response.data && response.data.content) {
|
||||||
try {
|
try {
|
||||||
let data = JSON.parse(response.data.content);
|
let data = JSON.parse(response.data.content);
|
||||||
this.response = data;
|
this.response = data;
|
||||||
|
|
|
@ -23,7 +23,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
requestResult: {},
|
requestResult: {responseResult: {}},
|
||||||
reqNumber: 0,
|
reqNumber: 0,
|
||||||
websocket: {}
|
websocket: {}
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ export default {
|
||||||
threadGroup.hashTree.push(item);
|
threadGroup.hashTree.push(item);
|
||||||
})
|
})
|
||||||
this.sort(testPlan.hashTree);
|
this.sort(testPlan.hashTree);
|
||||||
|
this.requestResult.reportId = this.reportId;
|
||||||
let reqObj = {id: this.reportId, testElement: testPlan, type: this.type, clazzName: this.clazzName ? this.clazzName : TYPE_TO_C.get(this.type), projectId: projectId, environmentMap: strMapToObj(this.envMap)};
|
let reqObj = {id: this.reportId, testElement: testPlan, type: this.type, clazzName: this.clazzName ? this.clazzName : TYPE_TO_C.get(this.type), projectId: projectId, environmentMap: strMapToObj(this.envMap)};
|
||||||
let bodyFiles = getBodyUploadFiles(reqObj, this.runData);
|
let bodyFiles = getBodyUploadFiles(reqObj, this.runData);
|
||||||
if (this.runData[0].url) {
|
if (this.runData[0].url) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="text-container">
|
<div class="text-container" v-if="responseResult">
|
||||||
|
|
||||||
<el-tabs v-model="activeName" v-show="isActive">
|
<el-tabs v-model="activeName" v-show="isActive">
|
||||||
<el-tab-pane :label="$t('api_test.definition.request.response_body')" name="body" class="pane">
|
<el-tab-pane :label="$t('api_test.definition.request.response_body')" name="body" class="pane">
|
||||||
<ms-sql-result-table v-if="isSqlType" :body="responseResult.body"/>
|
<ms-sql-result-table v-if="isSqlType" :body="responseResult.body"/>
|
||||||
|
@ -84,10 +83,8 @@
|
||||||
this.mode = mode;
|
this.mode = mode;
|
||||||
},
|
},
|
||||||
setBodyType() {
|
setBodyType() {
|
||||||
if (!this.response.responseResult || !this.response.responseResult.headers) {
|
if (this.response && this.response.responseResult && this.response.responseResult.headers
|
||||||
return;
|
&& this.response.responseResult.headers.indexOf("Content-Type: application/json") > 0) {
|
||||||
}
|
|
||||||
if (this.response.responseResult.headers.indexOf("Content-Type: application/json") > 0) {
|
|
||||||
this.mode = BODY_FORMAT.JSON;
|
this.mode = BODY_FORMAT.JSON;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.modeDropdown) {
|
if (this.$refs.modeDropdown) {
|
||||||
|
|
Loading…
Reference in New Issue