Niki M
Niki M

Reputation: 1

JMeter Websocket requests are not visible on the server

I am new to JMeter testing, but want to learn :) I am trying to set and test websocket messages, however any of my requests is not recorded on the server where I expect to see these.

I used the given steps here: https://www.blazemeter.com/blog/websocket-testing-apache-jmeter Also , tried other plugin, as well. I think I added all dependencies. installed plugins

libraries

After plugin installation, I have only Sampler Websocket Sampler available to work with, as for-message and session, there is displayed error "2021-11-21 00:37:15,992 ERROR o.a.j.u.JMeterUtils: java.lang.NoClassDefFoundError: com/google/common/base/Function"

I tried with message request parameters and body, also added header manager, however still nothing is shown on the server as message from my thread group. Both requests passed successfully with header manager and without. I can see server messages in Jmeter when connected to the WS, but I cannot send any message of my own.

Sampler Results: Thread Name:Thread Group 1-1 Sample Start:2021-11-21 00:10:50 EET Load time:1025 Connect Time:0 Latency:0 Size in bytes:2164 Sent bytes:0 Headers size in bytes:0 Body size in bytes:2164 Sample Count:1 Error Count:0 Data type ("text"|"bin"|""): Response code:200 Response message:

[Execution Flow]

[Variables]

[Problems]

SampleResult fields: ContentType: DataEncoding: UTF-8

Upvotes: 0

Views: 810

Answers (1)

Dmitri T
Dmitri T

Reputation: 168157

java.lang.NoClassDefFoundError: com/google/common/base/Function means that guava library is not in JMeter Classpath and most probably the errors you're seeing and the problem you're facing are somehow connected with this library absence.

Try starting clean:

  1. Download and install latest stable JMeter version (5.4.1 as of now)
  2. Download and install JMeter Plugins Manager
  3. Using JMeter Plugins Manager download and install WebSocket Samplers by Peter Doornbosch
  4. At this stage don't install any other plugins to avoid possible Jar Hell
  5. Follow instructions from the plugin documentation and/or JMeter WebSocket Samplers - A Practical Guide

Upvotes: 0

Related Questions