简体   繁体   English

Tcp采样器Jmeter中的行字节末尾值

[英]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. 我有TCP服务器将发送动态响应,即批准或拒绝或保留。 Now I am trying to load test it using jmeters TCP sampler. 现在,我正在尝试使用jmeters TCP sampler对其进行负载测试。 In this case how can I give dynamic EOL byte value in TCP sampler. 在这种情况下,如何在TCP采样器中给出动态EOL字节值。 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. 如果响应被批准或拒绝,则应为字符e的字节值;如果响应被保留,则应为d的字节值。 How can i give dynamic EOL byte value. 我如何给动态EOL字节值。

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. 如果这确实是您要查找的内容,则可以以${EOL}类的JMeter变量的形式定义EOL字节值,然后根据您的测试场景修改此变量值。


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 但是,我强烈怀疑要测试的TCP服务器会根据请求状态更改EOL字节值,我希望它提供不同的响应,您可以使用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. 还请注意,您可以通过tcp.status.prefixtcp.status.suffix JMeter属性来修改响应状态,以便可以使用它们来修改响应代码,从而可以查看有多少请求具有响应代码e以及如何许多人d一旦测试完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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