Catatan: Meskipun ada kesalahan dalam log, skrip dijalankan sesuai keinginan. Saya mencoba memahami cara menghapus kesalahan ini yang membanjiri log

Saya menggunakan JMeter 5.3 dan menyiapkan grup utas Concurrency dengan Throughput Shaping Timer.

Sekarang Throughput Shaping Timer berfungsi sebagaimana dimaksud namun ketika saya menggunakan nama Variabel dalam Konfigurasi, log dibanjiri dengan kesalahan jexl3. Di bawah ini adalah rincian Konfigurasi yang saya gunakan: masukkan deskripsi gambar di sini

Ketika saya menggunakan nama variabel di periode ramp up, saya secara konsisten mendapatkan kesalahan berikut di log

    2021-05-17 19:13:49,454 ERROR o.a.j.f.Jexl3Function: An error occurred while evaluating the expression "${RampUpPeriod}/60"

org.apache.commons.jexl3.JexlException$Ambiguous: 60@1:17 ambiguous statement error in '${RampUpPeriod}/60'
    at org.apache.commons.jexl3.parser.JexlParser.throwParsingException(JexlParser.java:270) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.parser.JexlParser.jjtreeCloseNodeScope(JexlParser.java:207) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.parser.Parser.ExpressionStatement(Parser.java:505) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.parser.Parser.Statement(Parser.java:350) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.parser.Parser.JexlScript(Parser.java:93) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.parser.Parser.parse(Parser.java:25) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.internal.Engine.parse(Engine.java:594) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.internal.Engine.createScript(Engine.java:261) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.internal.Engine.createScript(Engine.java:58) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.commons.jexl3.JexlEngine.createScript(JexlEngine.java:316) ~[commons-jexl3-3.1.jar:3.1]
    at org.apache.jmeter.functions.Jexl3Function.execute(Jexl3Function.java:96) ~[ApacheJMeter_functions.jar:5.3]
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:135) ~[ApacheJMeter_core.jar:5.3]
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:110) ~[ApacheJMeter_core.jar:5.3]
    at kg.apc.jmeter.JMeterVariableEvaluator.evaluate(JMeterVariableEvaluator.java:9) ~[jmeter-plugins-cmn-jmeter-0.6.jar:?]
    at com.blazemeter.jmeter.threads.LoadParamsFieldsPanel.UItoModel(LoadParamsFieldsPanel.java:45) ~[jmeter-plugins-casutg-2.9.jar:?]
    at com.blazemeter.jmeter.threads.AbstractDynamicThreadGroupGui.updateUI(AbstractDynamicThreadGroupGui.java:139) ~[jmeter-plugins-casutg-2.9.jar:?]
    at com.blazemeter.jmeter.threads.AbstractDynamicThreadGroupGui.run(AbstractDynamicThreadGroupGui.java:113) ~[jmeter-plugins-casutg-2.9.jar:?]
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) ~[?:?]
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:721) ~[?:?]
    at java.awt.EventQueue$4.run(EventQueue.java:715) ~[?:?]
    at java.security.AccessController.doPrivileged(AccessController.java:391) [?:?]
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85) [?:?]
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:740) [?:?]
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?]
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?]
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?]
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?]
0
I 2 18 Mei 2021, 02:19

1 menjawab

Jawaban Terbaik

Kedengarannya seperti bug di plugin, Anda dapat mencoba menghubungi pengembang dan pengelola Plugin JMeter melalui JMeter Forum Dukungan Plugin. Jika Anda pelanggan BlazeMeter, Anda dapat buka tiket dukungan BlazeMeter

Sementara itu, Anda dapat mengatasinya dengan menambahkan elemen konfigurasi Variabel Buatan Pengguna lainnya di bawah yang asli dan letakkan logika perhitungan Anda di sana:

enter image description here

Setelah selesai, Anda dapat mengganti fungsi __jexl3() di Grup Utas Konkurensi dengan variabel yang dihitung:

enter image description here

0
Dmitri T 18 Mei 2021, 07:14