Krishna Murthy
Krishna Murthy

Reputation: 97

How to record multi protocol script in jmeter

Is there any way to generate script using web socket protocol?

I want do performance testing for one of my project. that project have multi protocols. like web http/html and web socket. How can i generate the script for web socket protocol.

If i tried to generate script i were got below error

2019-03-27 16:49:24,712 WARN o.a.j.p.h.p.Proxy: [58109]  Unable to negotiate SSL transaction, no keystore?
2019-03-27 16:49:24,728 ERROR o.a.j.p.h.p.Proxy: [58109]  Exception when processing sample
java.io.IOException: Unable to negotiate SSL transaction, no keystore?
    at org.apache.jmeter.protocol.http.proxy.Proxy.startSSL(Proxy.java:446) ~[ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:194) [ApacheJMeter_http.jar:4.0 r1823414]
2019-03-27 16:49:24,728 WARN o.a.j.p.h.p.Proxy: [58109]  Exception while writing error
java.net.SocketException: Software caused connection abort: socket write error
    at java.net.SocketOutputStream.socketWrite0(Native Method) ~[?:1.8.0_191]
    at java.net.SocketOutputStream.socketWrite(Unknown Source) ~[?:1.8.0_191]
    at java.net.SocketOutputStream.write(Unknown Source) ~[?:1.8.0_191]
    at java.io.DataOutputStream.writeBytes(Unknown Source) ~[?:1.8.0_191]
    at org.apache.jmeter.protocol.http.proxy.Proxy.writeErrorToClient(Proxy.java:561) [ApacheJMeter_http.jar:4.0 r1823414]
    at org.apache.jmeter.protocol.http.proxy.Proxy.run(Proxy.java:258) [ApacheJMeter_http.jar:4.0 r1823414]
2019-03-27 16:49:24,728 INFO o.a.j.p.h.p.ProxyControl: [58110] Creating entry web.qa.np.1shift.io in D:\apache-jmeter-4.0\apache-jmeter-4.0\bin\proxyserver.jks
2019-03-27 16:49:25,566 ERROR o.a.j.p.h.p.Proxy: [58110]  Problem with keystore
java.io.IOException:   >> keytool error: java.lang.RuntimeException: java.io.IOException: DNSName components must begin with a letter

Upvotes: 0

Views: 291

Answers (1)

Dmitri T
Dmitri T

Reputation: 168092

As per RFC-1034 domain names must begin with a letter so my expectation is that you're trying to record an IP address or a domain which starts with a digit or something weird.

There are following workarounds:

  1. Use hosts file in order to give the host you're trying to record an alias which will not be in conflict with the aforementioned RFC-1034
  2. Use JMeter Chrome Extension as an alternative to JMeter's HTTP(S) Test Script Recorder

In any case I don't think you will be able to record WebSocket protocol, although it is HTTP-based but it's a different beast which cannot be handled by JMeter's HTTP Request samplers, you will have to mimic WebSocket traffic using JMeter WebSocket Samplers by Peter Doornbosch

Upvotes: 1

Related Questions