You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 1336230737 <li...@qq.com.INVALID> on 2022/04/24 08:37:07 UTC
I use JavaRequest. Can't find written JavaRequest methods in JavaRequestSampler?
I use JavaRequest. Can't find written JavaRequest methods in JavaRequestSampler?
Is there anything wrong with that? ex:
public class WebSocketPerfTest extends WebSocketClient implements JavaSamplerClient {
}
Re: I use JavaRequest. Can't find written JavaRequest methods in JavaRequestSampler?
Posted by Dmitri T <gl...@live.com>.
I think you need to derive from AbstractJavaSamplerClient
<https://jmeter.apache.org/api/org/apache/jmeter/protocol/java/sampler/AbstractJavaSamplerClient.html>
but given multiple inheritance in Java is not allowed you might need to
change your WebSocketClient class.
Check out JavaTest
<https://github.com/apache/jmeter/blob/c7279348335b820c35ee570462cb2e0b4eb1c370/src/protocol/java/src/main/java/org/apache/jmeter/protocol/java/test/JavaTest.java>which
comes bundled with JMeter example implementation for reference.
By the way, are you aware of JMeter WebSocket Samplers
<https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/>
plugin? It might be the case it will fit your needs, check out JMeter
WebSocket Samplers - A Practical Guide
<https://www.blazemeter.com/blog/jmeter-websocket-samplers-a-practical-guide>
article for more details.
On 4/24/2022 10:37 AM, 1336230737 wrote:
> I use JavaRequest. Can't find written JavaRequest methods in JavaRequestSampler?
> Is there anything wrong with that? ex:
> public class WebSocketPerfTest extends WebSocketClient implements JavaSamplerClient {
>
>
>
> }