jmeter-java-dsl icon indicating copy to clipboard operation
jmeter-java-dsl copied to clipboard

Support for WebSocketClient

Open IvanKvashnin opened this issue 1 year ago • 28 comments

Please add websocket/wss client to DSL. For example, jmeter has a good websocket plugin https://jmeter-plugins.org/?search=websocket-samplers.

This will greatly simplify the work !

IvanKvashnin avatar Dec 02 '24 09:12 IvanKvashnin

Upvote!

SubbotinMXM avatar Dec 02 '24 09:12 SubbotinMXM

Upvote, it's necessary and useful

makashov73 avatar Dec 02 '24 10:12 makashov73

Upvote!

KKoblukov avatar Dec 02 '24 10:12 KKoblukov

Upvote!

kirpikin avatar Dec 02 '24 10:12 kirpikin

Upvote!

kamikazanoname avatar Dec 02 '24 10:12 kamikazanoname

Upvote

Bis87 avatar Dec 02 '24 10:12 Bis87

Upvote !

IvanKvashnin avatar Dec 02 '24 10:12 IvanKvashnin

Upvote, it's super necessary!

kremlev404 avatar Dec 02 '24 10:12 kremlev404

"Upvote !"

eldarzaripoff avatar Dec 02 '24 10:12 eldarzaripoff

Upvote!

knefedov avatar Dec 02 '24 10:12 knefedov

Upvote!

IanaBlinova avatar Dec 02 '24 10:12 IanaBlinova

Upvote!

timsay022 avatar Dec 02 '24 10:12 timsay022

Upvote!

ganeles avatar Dec 02 '24 10:12 ganeles

Upvote!

vitalKV avatar Dec 02 '24 10:12 vitalKV

upvote!

Kadony avatar Dec 02 '24 10:12 Kadony

Upvote !

SLomako avatar Dec 02 '24 18:12 SLomako

upvote

dimayych02 avatar Dec 03 '24 04:12 dimayych02

Upvote!

Harukumo avatar Dec 03 '24 06:12 Harukumo

Wow, a lot of suden upvoting in this issue. Do you have any additional insight why is this important for so many people in such short period of time?

There is also this issue which requests the same support .

rabelenda avatar Dec 03 '24 19:12 rabelenda

Hi Rebelenda ! Glad you heard us, thank you! We all came to you from the different Performance tests and QA communities. A lot of guys use Jmeter dsl and we would like to see the ability to test websockets. We know that you can add your script through the DslJavaSample + BaseSampler wrapper. But I would like to see the ability to use a websocket client according to the standard like http. We will be very grateful to you if you implement this.

IvanKvashnin avatar Dec 04 '24 06:12 IvanKvashnin

Hello @rabelenda! We are all very interested in this feature. Resolving this issue would be highly appreciated by the performance testing community

chepk avatar Dec 04 '24 14:12 chepk

Hi, @rabelenda! We will highly appreciate you if you increase the priority of implementing this functionality. This really helpful to build performance testing tools for numerous projects.

makashov73 avatar Dec 04 '24 17:12 makashov73

Upvote!

Celenaras avatar Dec 05 '24 13:12 Celenaras

Can you provide different samples (maybe jmx files, potentially scrumbling urls and any potential sensitive config) of the main ways you use the samplers plugin?

I am interested in identifying what are the main/most common scenarios to ease their usage, and also identify the scope (how much features & effort is needed to support most of the use cases).

For example, what samplers do you usually use, what data formats you use for requests, do you usually specify request headers, do you load request bodies from files, do you use binary response assertions or filters?

Do you have any best practices or tips that we should consider in the design?

For example, I see that for handling segmented messages (sent in multiple frames) nowadays with the plugin you need to add a loop or add multiple samplers. Additionally, I see that the sampler does not close the connection by default and reuses it in each thread iteration (which is not the same behavior we use by default in DSL for other connections, like HTTP). In the DSL we could optimize these cases, and other that you may identify, and make them simpler to use in the DSL.

rabelenda avatar Dec 05 '24 14:12 rabelenda

Upvote!

denisrostov avatar Dec 08 '24 22:12 denisrostov

Hi @rabelenda, thank you for supporting this issue. Here are the answers to your questions and the simple script example. As for samplers, the most popular:

  • WS Write
  • WS Read
  • WS Open
  • WS Close
  • WS Ping Pong sampler
  • WS Text Frame Filter

As for loading the body samplers, I load them from the txt files. I don't use the binary response assertion, the simple text Response assertion works for me

Example.zip

NaumVik avatar Dec 13 '24 08:12 NaumVik

Hi @rabelenda, sorry for the long reply. There are some good usage examples here: https://github.com/Luminis-Arnhem/jmeter-websocket-samplers/tree/master/samples

Thx @NaumVik thx for examples !

IvanKvashnin avatar Dec 17 '24 09:12 IvanKvashnin

Upvote!

nyahcat avatar Apr 26 '25 16:04 nyahcat

@rabelenda Hi ! Do you have any news about this task ?

IvanKvashnin avatar Jul 07 '25 10:07 IvanKvashnin

hi @IvanKvashnin ,we're currently finishing the support for JMeter 5.6.3, and websocket support is next in our backlog in terms of priority. We'll keep you updated.

Thank you!

andreig09 avatar Jul 11 '25 17:07 andreig09