fix(接口测试): 兼容旧版本beanshell
This commit is contained in:
parent
9f9210bb87
commit
306773ddcd
|
@ -82,6 +82,11 @@
|
||||||
default: false
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch: {
|
||||||
|
jsr223Processor() {
|
||||||
|
this.reload();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addTemplate(template) {
|
addTemplate(template) {
|
||||||
if (!this.jsr223Processor.script) {
|
if (!this.jsr223Processor.script) {
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Request, RequestFactory, Scenario} from "../../model/ScenarioModel";
|
import {JSR223Processor, Request, RequestFactory, Scenario} from "../../model/ScenarioModel";
|
||||||
import MsApiHttpRequestForm from "./ApiHttpRequestForm";
|
import MsApiHttpRequestForm from "./ApiHttpRequestForm";
|
||||||
import MsApiDubboRequestForm from "./ApiDubboRequestForm";
|
import MsApiDubboRequestForm from "./ApiDubboRequestForm";
|
||||||
import MsScenarioResults from "../../../report/components/ScenarioResults";
|
import MsScenarioResults from "../../../report/components/ScenarioResults";
|
||||||
|
@ -58,10 +58,10 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
//兼容旧版本 beanshell
|
//兼容旧版本 beanshell
|
||||||
if (!this.request.jsr223PreProcessor.script && this.request.beanShellPreProcessor) {
|
if (!this.request.jsr223PreProcessor.script && this.request.beanShellPreProcessor) {
|
||||||
this.request.jsr223PreProcessor = this.request.beanShellPreProcessor;
|
this.request.jsr223PreProcessor = new JSR223Processor(this.request.beanShellPreProcessor);
|
||||||
}
|
}
|
||||||
if (!this.request.jsr223PostProcessor.script && this.request.beanShellPostProcessor) {
|
if (!this.request.jsr223PostProcessor.script && this.request.beanShellPostProcessor) {
|
||||||
this.request.jsr223PostProcessor = this.request.beanShellPostProcessor;
|
this.request.jsr223PostProcessor = new JSR223Processor(this.request.beanShellPostProcessor);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Loading…
Reference in New Issue