This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

TCP Sampler in jmeter to test client-server

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps you simply need to include the newline in the test data itself?
 
david kline
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And thats what it was!
Thanks!
 
david kline
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!