tuanhiep / mqttjmeter

This is the plugin for Jmeter to Test MQTT protocol
Apache License 2.0
86 stars 56 forks source link

Error when publishing #9

Open santicomp2014 opened 9 years ago

santicomp2014 commented 9 years ago

Hi @tuanhiep i am trying the plugin step by step with installation process but i get this:

2015/04/16 16:39:35 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:504) at java.lang.Integer.parseInt(Integer.java:527) at org.apache.jmeter.protocol.mqtt.client.MqttPublisher.setupTest(MqttPublisher.java:73) at org.apache.jmeter.protocol.mqtt.sampler.PublisherSampler.threadStarted(PublisherSampler.java:419) at org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:610) at org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:998) at org.apache.jorphan.collections.HashTree.traverse(HashTree.java:980) at org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:579) at org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:567) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) at java.lang.Thread.run(Thread.java:745)

I did all the steps for installation, and i am trying to publish, what am i missing thanks

santicomp2014 commented 9 years ago

I found it's a bug in the gui of the mqtt publisher Thanks

tuanhiep commented 9 years ago

Hi, It comes from this line:

clientId= MqttPublisher.getClientId(clientId,Integer.parseInt(context.getParameter("SUFFIX_LENGTH")));

i think you forgot to enter the Suffix_length for clientID. The GUI was updated the new functionality with Suffix_length which permit different threads use prefix(= input clientID)+ suffix(randomly genereated) as ClientID, so that we can run the same test scenario for multi thread, and it means we simulate multi-clients.

Best Regards,

TRAN Tuan Hiep

06 73 36 93 62

Management Suite team Astek Sud Est for Amadeus IT Group SA

http://trantuanhiep.fr/

On Thu, Apr 16, 2015 at 10:12 PM, santicomp2014 notifications@github.com wrote:

I found it's a bug in the gui of the mqtt publisher

— Reply to this email directly or view it on GitHub https://github.com/tuanhiep/mqtt-jmeter/issues/9#issuecomment-93829131.

god-pane commented 7 years ago

don't understand