tencent cloud

All product documents
Tencent Cloud Observability Platform
Conducting WebSocket-based Performance Testing by Using JMeter
Last updated: 2025-03-10 22:14:21
Conducting WebSocket-based Performance Testing by Using JMeter
Last updated: 2025-03-10 22:14:21
This document introduces how to use JMeter to conduct WebSocket-based performance testing by introducing plugins.

Background

WebSocket is a common network communication protocol, and with the popularity of real-time web applications, ensuring WebSocket connection performance has become crucial. The WebSocket protocol for performance testing helps evaluate business performance under high load and high concurrent connections, ensuring good response speed and data transmission quality even when a large number of users are using it simultaneously.
Although JMeter does not natively support WebSocket-based performance testing, JMeter provides additional support for it through plugin extension. The most commonly used plugin is WebSocket Samplers by Peter Doornbosch. This plugin provides 6 samplers that can meet most WebSocket-based performance testing requirements.

Plugin Version

PTS supports WebSocket-based performance testing that provides the same user experience as native JMeter-based performance testing. The metric reporting configuration has been applied in the stable plugin version, jmeter-websocket-samplers-1.2.8.jar, to support data reporting during the performance testing. Note that the plugin version should be 1.2.8. Other versions may lack metric reporting configuration, leading to incomplete data. The plugin can be downloaded at the following link: https://bitbucket.org/pjtr/jmeter-websocket-samplers/downloads/?tab=downloads.

Usage

Creating a JMeter-based Performance Testing Scenario

1. Log in to the TCOP console.
2. In the left sidebar, click PTS > Test Scenarios.
3. Click Create Scenario. On the Create Scenario page, select the testing scenario of the JMeter type.




Uploading the Performance Testing Files

1. Configure the performance testing plan in local JMeter according to business needs.



2. After the local debugging is successful, upload the corresponding JMX script, WebSocket plugin, and other necessary files to the console.




Running the Performance Testing Script

Click Save and Run in the upper right corner to start the performance testing task and generate a real-time report.




Viewing the Performance Testing Results

PTS has conducted event tracking for the results of each sampler in the WebSocket plugin. During the performance testing, you can view the performance testing data corresponding to different methods in the console according to business needs.



Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon