pmalhaire / xk6-mqtt

k6 mqtt extension
Apache License 2.0
47 stars 37 forks source link

Running the example test.js fails #12

Closed esskar closed 1 year ago

esskar commented 2 years ago

Hi,

i tried to run the test example but i get the following error

          /\      |‾‾| /‾‾/   /‾‾/
     /\  /  \     |  |/  /   /  /
    /  \/    \    |     (   /   ‾‾\
   /          \   |  |\  \ |  (‾)  |
  / __________ \  |__| \__\ \_____/ .io

ERRO[0000] TypeError: Value is not an object: undefined
        at file:///C:/Users/esskar/test.js:42:16(88)  hint="script exception"

Line 42 is let publisher = new mqtt.Client(

Have i missed something?

pmalhaire commented 2 years ago

Are you run the command with xk6 or your own built k6 ?

You need to add this extension to k6 see the README.md file at the root of the repo.

esskar commented 2 years ago

I compiled everything and use the K6.exe from that compilation. I am running on windows.

pmalhaire commented 2 years ago

I unfortunately don't have a windows machine to test this. The message you have means that the JS object of the extension is not available. It looks like for an unknown cause, the extension is not present as expected after compilation. Maybe running xk6 from the repo source dir will give you more info.

pmalhaire commented 1 year ago

@esskar do you have a running mqtt server ?

pmalhaire commented 1 year ago

Closing since I could not reproduce, reopen in case

samerhijazi commented 1 year ago

I am having the same error too

pmalhaire commented 1 year ago

Can you provide the test command used and thé platfom so I can reproduce your issue ?

pmalhaire commented 1 year ago

Closing as no response