Win a copy of Rust Web Development this week in the Other Languages 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

TCP Sampler in jmeter to test client-server

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And thats what it was!
Thanks!
 
david kline
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic