WebSocket WS-Protocol testing

Source: Internet
Author: User

Recently the company has done a live project, need to use the WebSocket for communication, and therefore need to test the maximum number of sockets and stability. At the time of this demand, the only thing to think of is jmeter, from Baidu to download the corresponding socket-dependent jar package, began to study (after all, the first time to do this test), worried that a single pressure source is not enough, and the whole distributed, But eventually found that JMeter is not suitable for testing the maximum number of sockets, so adjusted the idea, looking for other methods, Kung fu not pay a conscientious, Finally sent a good socket test gadget (click to download) is an. exe file, using the tool can easily implement the socket stability test, the connection number test is a bit troublesome, because our websocket need to pass some parameters, which involves parameter parameterization, this time to think of automation The use of a tool called AUTOIT3, through the AUTOIT3 call the. exe program to achieve the input of different parameters, you need to prepare the data file: The specific code is as follows:

Run ("E:\webSocket\WebSocket_test\TradePhoneClient.exe") Sleep ( the) winwait ("Form1") $sheet= Gettestsheet ("E:\webSocket\WebSocket_test\student_uuid20000_data.csv",1) for $i=1To801Step1Dim $stu _uid= $sheet. Cells ($i,1). Value Createwebsocketconnect ($stu _uid); MsgBox (4096,"rows read:", $stu _uid) Nextcloseexcel () Func createwebsocketconnect ($stu _uid) Controlsettext ("Form1","","[Class:windowsforms10.edit.app.0.141b42a_r14_ad1;instance:2]","ws://xxxxxxx.cn/broadcast-rest/echo?uuid="& $stu _uid&"&type=student&encryptid=testrenshu2000") Controlclick ("Form1","","[Class:windowsforms10.button.app.0.141b42a_r14_ad1;instance:6]") winwait ("[CLASS: #32770]","",3) Controlclick ("[CLASS: #32770]","","Button1") Endfuncfunc Gettestsheet ($path, $sheetindex) processclose ("EXCEL. EXE") $oExcel= Objcreate ("Excel.Application") $oExcel. Visible=0$workbook=$oExcel. Workbooks.Open ($path) $sheet=$workbook. Worksheets.item ($sheetindex) Return $sheetEndFuncFunc closeexcel () $workbook.      Save ();   $oExcel. Quit (); Processclose ("EXCEL. EXE"); Force kill process Endfunc

Summary: WebSocket maximum number of connections depends on the maximum number of Tomcat threads, number of system processes/etc/security/limits.d/90-nproc.conf files, general settings 51200

WebSocket WS-Protocol test

Related Article

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.