| Author |
TCP Sampler in jmeter to test client-server
|
david kline
Greenhorn
Joined: Jul 04, 2006
Posts: 4
|
|
im trying to load-test a server i wrote. a client basically connects to the server via tcp (ServerSocket on the server) and sends a line of text (eg. "david") the connection is then closed without the server returning any reply to the client. When testing in jmeter, i do the following: - create new thread group - create new TCP Sampler enter the necessary details, and start. The server is run on one machine on a network, and jmeter is run on another machine on the network. Normally, when the server runs, and a client connects - the server displays the text that was received from the client. When i run jmeter to test - i dont get any of the 'expected text' on the server. What am I doing wrong? Any help would be much appreciated. Thanks in advance. [ July 06, 2006: Message edited by: david kline ] [ July 06, 2006: Message edited by: david kline ]
|
 |
david kline
Greenhorn
Joined: Jul 04, 2006
Posts: 4
|
|
I figured out the problem is that the TCP Sampler does not give an END-OF-LINE message after sending the text. My server therefore waits to receive an end of line from it. How can I get over this problem efficiently? Thanks [ July 06, 2006: Message edited by: david kline ]
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
|
Perhaps you simply need to include the newline in the test data itself?
|
[Jess in Action][AskingGoodQuestions]
|
 |
david kline
Greenhorn
Joined: Jul 04, 2006
Posts: 4
|
|
And thats what it was! Thanks!
|
 |
david kline
Greenhorn
Joined: Jul 04, 2006
Posts: 4
|
|
And now i have a new problem - the looop doesnt seem to loop. For example - I set 100 threads to run. And a loop forever. What i get is 100 threads connecting to my server, but after that, i dont get any further connections. from what i understand, the 100 threads should attempt to connect again after the connection is closed - if set to loop forever, no?
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12267
|
|
from what i understand, the 100 threads should attempt to connect again after the connection is closed - if set to loop forever, no?
That depends entirely on the way your run() method is coded. My crystal ball is in the shop for the 10,000 vision checkup so I can't see your run method from here. Bill
|
 |
 |
|
|
subject: TCP Sampler in jmeter to test client-server
|
|
|