Sunil
Sunil

Reputation: 112

Performance testing xml over TCP using JMeter

I am new to Jmeter and want to test one XML request over TCP.

How can I achieve that. I search for any help but did not get that.

Thanks in advance.

Upvotes: 1

Views: 773

Answers (2)

Dmitri T
Dmitri T

Reputation: 168092

There are following options:

  1. Use TCP Sampler which comes with JMeter
  2. Use HTTP Raw Request plugin (the TCP Sampler doesn't measure Latency and you might be interested in this metric as well)
  3. Implement your own request using JSR223 Sampler and Groovy language if above options are not applicable for any reason

Upvotes: 0

tilln
tilln

Reputation: 66

You may want to search for "JMeter TCPSampler". You will find several questions on Stackoverflow as well as a quite comprehensive blog post: https://www.blazemeter.com/blog/how-load-test-tcp-protocol-services-jmeter/

This TCP Sampler can send arbitrary text to the server, however, the challenge is how to determine the end of a response message. There are a few options available, e.g. based on message length prefix (see LengthPrefixedBinaryTCPClientImpl), or a unique end character (see TCPClientImpl).

However, if none of those work, you may want to implement a custom TCPClient class that could for example detect the closing tag of your XML response.

Upvotes: 0

Related Questions