How JMeter test WebSocket, sample demonstrates (b)

First, the test case presentation

To http://www.websocket.org/echo.html site, for example.

Address: ws: //echo.websocket.org

Second, the impact of the long connection

1, there is no check streaming connetion

The results are three requests: Ha, hee hee, hum hum

 

 2, check the streaming connetion 

Request result 3 below, has also been kept to a connection request. message backlog is set to 3, the returned message retains the maximum length of 3 message can be customized.

Close three long connection request, the connection state can also view the log length, as shown below, it can be seen that the first two are open, the last closed, the result is: hum hum.

 

 Third, people end a conversation

How to end a man of dialogue, yejisu which use the previously mentioned response pattern and a close pattern, the first three requests are given for comparison in response pattern is not set and close pattern of the results.

1, only the long link is provided, and response pattern is not provided close pattern

2, in the first request, and response pattern disposed close pattern, as follows:

3, respectively, see the response results of each request.

1) :( since the first request to establish a connection only, so that only reads information of the first pattern provided in a sampler)

2) a second request: in response to the second request when the father returns this identification does not meet, but also with a close pattern, will become disconnected.

 

3) The third request: a third websocket checked using a streaming connection, but in fact it is not connected to the remote terminal on this will be the error. (Response response in this case can not be set to null, if the detected first content returns meet response pattern, will not go to determine compliance with a close pattern)

[This place do not understand, ah, so I think I websocket it]

 

Guess you like

Origin www.cnblogs.com/wuzm/p/10873589.html
Recommended