WebSocket pressure measurement using the JMeter

Source: Internet
Author: User
Tags format message

First step: Add WebSocket Sampler Components

You can use Plugins Manager to add, first download the Plugins Manager component;

Download path: https://jmeter-plugins.org/downloads/all/

After downloading, save to JMeter's Lib/ext path and then reopen JMeter to see this component:

Then, in Plugins Manager, search for the WebSocket component:

This completes the addition of the WebSocket sampler component;

Step two: Use JMeter for websocket connection testing

1. Add WebSocket Sampler test Plan

1) Select the right mouse button to select the thread group to add->sampler->websocket Sampler, such as:

2. Fill in the WebSocket connection information:

Server name or ip:websocket access domain name;

Path: Paths;

Main Options Description:

1, WebServer
(1) address or name of the destination server sent by server name or Ip:websocket
(2) port number the Port Number:websocker server listens on. (typically an HTTP 80 port, which can be obtained via Wireshark packets)


2. Timeout:
(1) connection– The maximum time, in milliseconds, that JMeter waits for a connection to complete after sending a connection request.
(2) Response-The maximum wait time for the response message.


3. WebSocket Request
(1) implementation– only supports RFC6455 (V13), the latest version of the WebSocket protocol standard.
(2) protocol– has WS and WSS, the WS prefix is the distinguished identity of the WebSocket connection, and the WSS prefix is the distinguished identity of the WebSocket secure connection. Fill in according to your actual situation
(3) Streaming connection– Select this TCP session to maintain, if the hook on the identity of the connection will always exist, if not checked, then the first response after the link will be closed.
(4) Request data: Fill in the requests to be sent, to communicate with the development of good, this is what format message.


4.WebSocket Response
(1) Response pattern– Sampler will wait for the message containing the identity and continue to communicate (or until timeout, the connection is closed)
(2) Close Connection pattern– If the message returned by the server contains such a character, it ends the session.
(3) Message backlog– defines the maximum length that the server returns message retention.

Step Three: Test

WebSocket pressure measurement using the JMeter

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.