0
votes

I'm a Newbie in using JMeter tool and could not find a approach in JMeter to run End to end performance test of below use case:-

  1. I have https webhook(Hosted on my node JS server) that is invoked on new device creation on Azure IotHub(Webhook subscription is done on Azure IotHub).
  2. Once invoked, I parse the webhook(request) body and generate a unique token.
  3. Once unique token generated, I set that token in the device configuration for which the webhook was called.(I get the deviceId in webhook body)
  4. Once the device configuration set I return the response of webhook as 200.

Now, In JMeter how can I achieve step 1-4. My initial approach is to:-

  1. Write python script to simulate new device creation on IoT hub.
  2. After step 1 I'm not sure how will I capture the webhook invoked and response returned from webhook in JMeter. Basically, Im not sure how I can successfully capture Step 2 and 4. Step 3 is basically the nodejs code for my webhook hosted on my server. And I need to run step 2 and 4 200K times to measure the performance.

In summary, I have a script which registers device on cloud which triggers my webhook/api and I will calculate the response time in my script i.e. everything will be written in my script just that I want JMeter to show all the charts etc. based on the calculations I do in my script.And the script should be invoked n number of times as per the load required.

Any help in guiding me the approach would be very appreciated.

1

1 Answers

0
votes

I have a solution for this now, in case anyone needs it.

Thread Group --> OS process sampler --> Response time graph

Above are the components I used in my JMeter tool. OS process sampler can run any script on your machine.