fix(接口测试): 修复jmeter函数无法运行的缺陷
--bug=1014752 --user=王孝刚 【接口测试】github#15599,Jmeter 函数 ${javaScript} 无法执行,导致其他参数获取变量 https://www.tapd.cn/55049933/s/1198511
This commit is contained in:
parent
1401b27d2e
commit
7495be1c9b
|
@ -11,6 +11,7 @@ import io.metersphere.jmeter.utils.ScriptEngineUtils;
|
|||
import io.metersphere.utils.LoggerUtil;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringEscapeUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.entity.ContentType;
|
||||
|
@ -96,7 +97,7 @@ public class Body {
|
|||
if (StringUtils.isNotBlank(this.type) && StringUtils.equals(this.type, "JSON")) {
|
||||
if (StringUtils.isNotEmpty(this.format) && this.getJsonSchema() != null
|
||||
&& "JSON-SCHEMA".equals(this.format)) {
|
||||
this.raw = JSONSchemaRunTest.getJson(JSON.toJSONString(this.getJsonSchema()));
|
||||
this.raw = StringEscapeUtils.unescapeJava(JSONSchemaRunTest.getJson(JSON.toJSONString(this.getJsonSchema())));
|
||||
} else {
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(this.getRaw())) {
|
||||
|
|
Loading…
Reference in New Issue