简体   繁体   中英

Tcp sampler end of line byte value in Jmeter

I have TCP server which will be sending dynamic responses ie approve or decline or hold. Now I am trying to load test it using jmeters TCP sampler. In this case how can I give dynamic EOL byte value in TCP sampler. If response is approve or decline it should be byte value of character e and if the response is hold it should be the byte value of d. How can i give dynamic EOL byte value.

If this is really what you're looking for you can define EOL byte value in form of a JMeter Variable like ${EOL} and amend this variable value according to your test scenario.


However I strongly doubt that TCP server you're testing changes EOL byte value depending on the request status, I would rather expect that it provides different response which you can verify using Response Assertion

Also be aware that you can amend response status via tcp.status.prefix and tcp.status.suffix JMeter properties so you can use them in order to amend Response Code so you will be able to see how many requests had response code e and how many had d once your test finishes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM