嗨,伙计们,我在处理大的json输入时遇到了一些问题(大约55k行)。一开始我尝试使用这个函数
${__FileToString(myPath/test.json,,)}但这似乎不能正常工作:在这个过程中我又犯了一个错误。
java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: "1["
at java.net.URLDecoder.decode(Unknown Source) ~[?:1.8.0_301]
at org.apache.jmeter.protocol.http.visualizers.RequestViewHTTP.decodeQuery(RequestViewHTTP.java:336) ~[ApacheJMeter_http.jar:5.5]
at org.apache.jmeter.protocol.http.visualizers.RequestViewHTTP.getQueryMap(RequestViewHTTP.java:306) ~[ApacheJMeter_http.jar:5.5]
at org.apache.jmeter.protocol.http.visualizers.RequestViewHTTP.setSamplerResult(RequestViewHTTP.java:216) ~[ApacheJMeter_http.jar:5.5]
at org.apache.jmeter.visualizers.RequestPanel.setSamplerResult(RequestPanel.java:116) ~[ApacheJMeter_components.jar:5.5]
at org.apache.jmeter.visualizers.SamplerResultTab.setupTabPane(SamplerResultTab.java:256) ~[ApacheJMeter_components.jar:5.5]
at org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:395) ~[ApacheJMeter_components.jar:5.5]
at org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:373) ~[ApacheJMeter_components.jar:5.5]
at javax.swing.JTree.fireValueChanged(Unknown Source) ~[?:1.8.0_301]
at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source) ~[?:1.8.0_301]
at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source) ~[?:1.8.0_301]
at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source) ~[?:1.8.0_301]
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source) ~[?:1.8.0_301]
at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source) ~[?:1.8.0_301]
at javax.swing.JTree.setSelectionPath(Unknown Source) ~[?:1.8.0_301]
at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source) ~[?:1.8.0_301]
at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(Unknown Source) ~[?:1.8.0_301]
at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(Unknown Source) ~[?:1.8.0_301]
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source) ~[?:1.8.0_301]
at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_301]
at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_301]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_301]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_301]
at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_301]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_301]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_301]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_301]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_301]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_301]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:1.8.0_301]
at java.awt.EventDispatchThread.run(Unknown Source) ~[?:1.8.0_301]我不知道如何解决这个问题,我尝试了这个要求邮递员,我没有问题。有人能帮我吗?
发布于 2022-10-27 07:53:37
您得到的“错误”与发送请求无关,而是使用查看结果树侦听器进行呈现,很可能您选择了一些与JSON不匹配的呈现格式,或者使用到达方法而不是帖子等。
如果您的请求在邮递员中运行良好,您只需使用JMeter的HTTP(S)测试脚本记录器记录它,并根据需要将其参数化
还可以知道HTTP原始请求采样器有很好的特性,或者直接将文件流到后端,而不需要先将它加载到内存中,有关更多细节,请查看HTTP原始请求SOAP + MTOM线程。
可以使用JMeter插件管理器安装HTTP原始请求采样器
https://stackoverflow.com/questions/74218275
复制相似问题