Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 接口自动化调试正常,不需要额外引入json jar 包,但是转性能测试 报错 json 包 找不到 #30329

Closed
spritelyl opened this issue Apr 16, 2024 · 1 comment
Assignees
Labels
类型:非问题 由于环境或操作等原因出现的预期外情况,实际并非产品问题

Comments

@spritelyl
Copy link

联系方式

14707070227

MeterSphere 版本

v2.10.13-lts

使用外置数据库

问题描述

接口自动化调试正常,不需要额外引入json jar 包,但是转性能测试 报错 json 包 找不到

重现步骤

  1. 创建接口自动化,编写脚本,调试正常
  2. 转成性能测试后,报错 json 包 找不到

期待的正确结果

转成性能测试后也能调试正常,不报错找不到 json 包

相关日志输出

2024-04-16 14:33:40,815 Problem in JSR223 script, JSR223PreProcessor javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script16.groovy: 7: unable to resolve class org.json.JSONObject
@ line 7, column 1.
import org.json.JSONObject;
^

1 error

at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-jsr223-3.0.11.jar:3.0.11]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:231) ~[java.scripting:?]
at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:252) ~[ms-jmeter-core.jar:5.5]
at org.apache.jmeter.modifiers.JSR223PreProcessor.process(JSR223PreProcessor.java:45) ~[ApacheJMeter_components.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.runPreProcessors(JMeterThread.java:999) ~[ms-jmeter-core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:560) ~[ms-jmeter-core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:500) ~[ms-jmeter-core.jar:5.5]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:264) ~[ms-jmeter-core.jar:5.5]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script16.groovy: 7: unable to resolve class org.json.JSONObject

附加信息

1713249437787
1713249439944

@github-actions github-actions bot added the 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 label Apr 16, 2024
@liuruibin
Copy link
Member

性能测试执行在独立的容器里进行,有些jar不包括在内,需要你自行上传

@github-actions github-actions bot added 状态:待用户反馈 and removed 状态:待处理 已分配给相关处理人等待处理人处理并更新状态 labels Apr 16, 2024
@youliyuan-fit2cloud youliyuan-fit2cloud added 类型:非问题 由于环境或操作等原因出现的预期外情况,实际并非产品问题 and removed 状态:待用户反馈 labels May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
类型:非问题 由于环境或操作等原因出现的预期外情况,实际并非产品问题
Projects
None yet
Development

No branches or pull requests

3 participants