I've just recently started using JMeter. I'm trying to run a TCP sampler on one of my servers. The TCP sampler is set to all default values, with my IP, port number and text to send.
The server receives the text and responds as expected. However, once JMeter receives the response it doesn't close the connection; it just waits until I stop the test manually, at which point the server logs show the client has disconnected.
I also have a response assertion which looks for this string:
{"SERVER":[{"End":200}]}\r\n
The Assertion is set to apply to main sample and sub-samples, the response field to test is set to Text Response.
With the pattern matching rules set to Equals I get:
Device Server Sampler
Device Server Response Assertion : Test failed: text expected to equal /
****** received : {"SERVER":[{"End":200}]}[[[
]]]
****** comparison: {"SERVER":[{"End":200}]}[[[\r\n]]]
/
If I set pattern matching to Contains I get:
Device Server Sampler
Which I can only assume at this point is a pass?? But no matter how I try it JMeter never closes the socket, so when I stop the tests myself and View the results in a table the status is marked as Warning, even though the correct amount of bytes have been received, and the data is correct.
JMeter doesn't seem to like \r\n
so I've run the same tests removing those from the strings on both sides, but the sockets still remain open until I stop the tests.
Got any ideas what the issue may be?