Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using JMeter to test a socket

I would like to use JMeter to test an application that communicates over sockets. It is done in java. In the server I have the typical

myServerSocket = new ServerSocket(1025);

For every connection a thread reads and understands a line. And in clients I have the typical

clientSocket = new Socket(hostCM, 1025);
out = new PrintWriter(clientSocket.getOutputStream(), true);
out.println("some bit string here");

I would like to use JMeter or any other load testing tool to send lots of requests at the same time and make my stress and load testing. But I dont know how to prepare a test. Is is possible to do this in JMeter at all?

like image 713
lesolorzanov Avatar asked Mar 31 '13 17:03

lesolorzanov


Video Answer


1 Answers

Try using JMeter's Java Request Sampler: http://jmeter.apache.org/usermanual/component_reference.html#Java_Request

like image 51
Santosh Avatar answered Oct 16 '22 05:10

Santosh