Merge remote-tracking branch 'origin/master'

This commit is contained in:
song.tianyang 2021-03-24 16:33:29 +08:00
commit a5672c9ba9
8 changed files with 150 additions and 131 deletions

View File

@ -611,6 +611,9 @@ public class TestPlanService {
List<ReportComponent> components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan); List<ReportComponent> components = ReportComponentFactory.createComponents(componentIds.toJavaList(String.class), testPlan);
List<Issues> issues = buildFunctionalCaseReport(planId, components); List<Issues> issues = buildFunctionalCaseReport(planId, components);
buildApiCaseReport(planId, components);
buildScenarioCaseReport(planId, components);
buildLoadCaseReport(planId, components);
TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO(); TestCaseReportMetricDTO testCaseReportMetricDTO = new TestCaseReportMetricDTO();
components.forEach(component -> { components.forEach(component -> {

View File

@ -82,13 +82,13 @@
</div> </div>
<!-- 快捷调试 --> <!-- 快捷调试 -->
<div v-else-if="item.type=== 'debug'" class="ms-api-div"> <div v-else-if="item.type=== 'debug'" class="ms-api-div">
<ms-debug-http-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" <ms-debug-http-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" @refreshModule="refreshModule"
v-if="currentProtocol==='HTTP'"/> v-if="currentProtocol==='HTTP'"/>
<ms-debug-jdbc-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" <ms-debug-jdbc-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" @refreshModule="refreshModule"
v-if="currentProtocol==='SQL'"/> v-if="currentProtocol==='SQL'"/>
<ms-debug-tcp-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" <ms-debug-tcp-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" @refreshModule="refreshModule"
v-if="currentProtocol==='TCP'"/> v-if="currentProtocol==='TCP'"/>
<ms-debug-dubbo-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" <ms-debug-dubbo-page :currentProtocol="currentProtocol" :testCase="item.api" @saveAs="editApi" @refreshModule="refreshModule"
v-if="currentProtocol==='DUBBO'"/> v-if="currentProtocol==='DUBBO'"/>
</div> </div>
@ -357,6 +357,9 @@
} }
this.$refs.apiList[0].exportApi(type); this.$refs.apiList[0].exportApi(type);
}, },
refreshModule() {
this.$refs.nodeTree.list();
},
refresh(data) { refresh(data) {
this.$refs.apiList[0].initTable(data); this.$refs.apiList[0].initTable(data);
}, },

View File

@ -278,6 +278,7 @@
let url = '/api/module/getModuleByName/' + getCurrentProjectID() + "/" + this.api.protocol; let url = '/api/module/getModuleByName/' + getCurrentProjectID() + "/" + this.api.protocol;
this.$get(url, response => { this.$get(url, response => {
if (response.data) { if (response.data) {
this.$emit('refreshModule');
this.saveApi(row, response.data); this.saveApi(row, response.data);
} }
}); });

View File

@ -25,6 +25,7 @@
<api-case-item v-loading="singleLoading && singleRunId === item.id || batchLoadingIds.indexOf(item.id) > -1" <api-case-item v-loading="singleLoading && singleRunId === item.id || batchLoadingIds.indexOf(item.id) > -1"
@refresh="refresh" @refresh="refresh"
@singleRun="singleRun" @singleRun="singleRun"
@refreshModule="refreshModule"
@copyCase="copyCase" @copyCase="copyCase"
@showExecResult="showExecResult" @showExecResult="showExecResult"
@batchEditCase="batchEditCase" @batchEditCase="batchEditCase"
@ -181,7 +182,9 @@
this.apiCaseList = []; this.apiCaseList = [];
this.visible = false; this.visible = false;
}, },
refreshModule(){
this.$emit('refreshModule');
},
runRefresh() { runRefresh() {
this.batchLoadingIds = []; this.batchLoadingIds = [];
this.singleLoading = false; this.singleLoading = false;

View File

@ -30,25 +30,25 @@
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button> <el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div> </div>
<!-- 加载用例 --> <!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/> <ms-api-case-list @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
</div> </div>
</template> </template>
<script> <script>
import MsResponseResult from "../response/ResponseResult"; import MsResponseResult from "../response/ResponseResult";
import MsRequestMetric from "../response/RequestMetric"; import MsRequestMetric from "../response/RequestMetric";
import {getUUID} from "@/common/js/utils"; import {getUUID} from "@/common/js/utils";
import MsResponseText from "../response/ResponseText"; import MsResponseText from "../response/ResponseText";
import MsRun from "../Run"; import MsRun from "../Run";
import {createComponent} from "../jmeter/components"; import {createComponent} from "../jmeter/components";
import {REQ_METHOD} from "../../model/JsonData"; import {REQ_METHOD} from "../../model/JsonData";
import MsRequestResultTail from "../response/RequestResultTail"; import MsRequestResultTail from "../response/RequestResultTail";
import MsBasisParameters from "../request/dubbo/BasisParameters"; import MsBasisParameters from "../request/dubbo/BasisParameters";
import MsJmxStep from "../step/JmxStep"; import MsJmxStep from "../step/JmxStep";
import MsApiCaseList from "../case/ApiCaseList"; import MsApiCaseList from "../case/ApiCaseList";
export default { export default {
name: "ApiConfig", name: "ApiConfig",
components: { components: {
MsRequestResultTail, MsRequestResultTail,
@ -122,7 +122,9 @@ export default {
this.runDebug(); this.runDebug();
} }
}, },
refreshModule() {
this.$emit('refreshModule');
},
runDebug() { runDebug() {
this.loading = true; this.loading = true;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);

View File

@ -44,25 +44,25 @@
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button> <el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div> </div>
<!-- 加载用例 --> <!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/> <ms-api-case-list @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
</div> </div>
</template> </template>
<script> <script>
import MsApiRequestForm from "../request/http/ApiHttpRequestForm"; import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
import MsResponseResult from "../response/ResponseResult"; import MsResponseResult from "../response/ResponseResult";
import MsRequestMetric from "../response/RequestMetric"; import MsRequestMetric from "../response/RequestMetric";
import {getCurrentUser, getUUID} from "@/common/js/utils"; import {getCurrentUser, getUUID} from "@/common/js/utils";
import MsResponseText from "../response/ResponseText"; import MsResponseText from "../response/ResponseText";
import MsRun from "../Run"; import MsRun from "../Run";
import {createComponent} from "../jmeter/components"; import {createComponent} from "../jmeter/components";
import {REQ_METHOD} from "../../model/JsonData"; import {REQ_METHOD} from "../../model/JsonData";
import MsRequestResultTail from "../response/RequestResultTail"; import MsRequestResultTail from "../response/RequestResultTail";
import MsJmxStep from "../step/JmxStep"; import MsJmxStep from "../step/JmxStep";
import {KeyValue} from "../../model/ApiTestModel"; import {KeyValue} from "../../model/ApiTestModel";
import MsApiCaseList from "../case/ApiCaseList"; import MsApiCaseList from "../case/ApiCaseList";
export default { export default {
name: "ApiConfig", name: "ApiConfig",
components: { components: {
MsRequestResultTail, MsRequestResultTail,
@ -166,6 +166,9 @@ export default {
} }
}) })
}, },
refreshModule() {
this.$emit('refreshModule');
},
runRefresh(data) { runRefresh(data) {
this.responseData = data; this.responseData = data;
this.loading = false; this.loading = false;

View File

@ -32,26 +32,26 @@
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button> <el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div> </div>
<!-- 加载用例 --> <!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/> <ms-api-case-list @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
</div> </div>
</template> </template>
<script> <script>
import MsResponseResult from "../response/ResponseResult"; import MsResponseResult from "../response/ResponseResult";
import MsRequestMetric from "../response/RequestMetric"; import MsRequestMetric from "../response/RequestMetric";
import {getUUID} from "@/common/js/utils"; import {getUUID} from "@/common/js/utils";
import MsResponseText from "../response/ResponseText"; import MsResponseText from "../response/ResponseText";
import MsRun from "../Run"; import MsRun from "../Run";
import {createComponent} from "../jmeter/components"; import {createComponent} from "../jmeter/components";
import {REQ_METHOD} from "../../model/JsonData"; import {REQ_METHOD} from "../../model/JsonData";
import MsRequestResultTail from "../response/RequestResultTail"; import MsRequestResultTail from "../response/RequestResultTail";
import MsBasisParameters from "../request/database/BasisParameters"; import MsBasisParameters from "../request/database/BasisParameters";
import MsJmxStep from "../step/JmxStep"; import MsJmxStep from "../step/JmxStep";
import MsApiCaseList from "../case/ApiCaseList"; import MsApiCaseList from "../case/ApiCaseList";
export default { export default {
name: "ApiConfig", name: "ApiConfig",
components: { components: {
MsRequestResultTail, MsRequestResultTail,
@ -125,7 +125,9 @@ export default {
this.$refs['requestForm'].validate(); this.$refs['requestForm'].validate();
} }
}, },
refreshModule() {
this.$emit('refreshModule');
},
runDebug() { runDebug() {
this.loading = true; this.loading = true;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);

View File

@ -42,27 +42,27 @@
<el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button> <el-button style="float: right;margin: 20px" type="primary" @click="handleCommand('save_as_api')"> {{$t('commons.save')}}</el-button>
</div> </div>
<!-- 加载用例 --> <!-- 加载用例 -->
<ms-api-case-list :loaded="false" ref="caseList"/> <ms-api-case-list @refreshModule="refreshModule" :loaded="false" ref="caseList"/>
</div> </div>
</template> </template>
<script> <script>
import MsApiRequestForm from "../request/http/ApiHttpRequestForm"; import MsApiRequestForm from "../request/http/ApiHttpRequestForm";
import MsResponseResult from "../response/ResponseResult"; import MsResponseResult from "../response/ResponseResult";
import MsRequestMetric from "../response/RequestMetric"; import MsRequestMetric from "../response/RequestMetric";
import {getUUID} from "@/common/js/utils"; import {getUUID} from "@/common/js/utils";
import MsResponseText from "../response/ResponseText"; import MsResponseText from "../response/ResponseText";
import MsRun from "../Run"; import MsRun from "../Run";
import {createComponent} from "../jmeter/components"; import {createComponent} from "../jmeter/components";
import {REQ_METHOD} from "../../model/JsonData"; import {REQ_METHOD} from "../../model/JsonData";
import MsRequestResultTail from "../response/RequestResultTail"; import MsRequestResultTail from "../response/RequestResultTail";
import TcpBasisParameters from "../request/tcp/TcpBasisParameters"; import TcpBasisParameters from "../request/tcp/TcpBasisParameters";
import MsJmxStep from "../step/JmxStep"; import MsJmxStep from "../step/JmxStep";
import MsApiCaseList from "../case/ApiCaseList"; import MsApiCaseList from "../case/ApiCaseList";
export default { export default {
name: "ApiConfig", name: "ApiConfig",
components: { components: {
MsJmxStep, MsJmxStep,
@ -130,7 +130,9 @@ export default {
this.$refs['requestForm'].validate(); this.$refs['requestForm'].validate();
} }
}, },
refreshModule() {
this.$emit('refreshModule');
},
runDebug() { runDebug() {
this.loading = true; this.loading = true;
this.request.name = getUUID().substring(0, 8); this.request.name = getUUID().substring(0, 8);