How to decode Base58Check to Hex format in jmeter? - jmeter-5.0

Can someone help me in converting a Base58Check code received in the response to the request to Hexadecimal format in JMeter.

Related

Not Receiving Response Data (Body or Header) in ISO 8583 using JMeter

I am trying to send ISO 8583 Message Request through JMeter and getting
(channel/HOSTNAME:POST) [receive] In: 1210 000001 in JMeter Logs
I have left all the fields empty for Response Validation like Timeout and Success Response Field so that no validation rule is applied on response.
But I am not receiving anything in the Response Body or Header through Listener.
Any Idea how can I get the response in Response Body Also.
JMeter doesn't display response because it doesn't receive the response and we are not telepathic enough to guess why doesn't JMeter receive the response with the limited amount of information you're giving to us, please refer How do I ask a good question for details
You can use a sniffer tool like Wireshark to see what actually happens with the request and if there is any response.
It's also possible to increase JMeter's logging verbosity for the ISO 8583 sampler by adding the next line to log4j2.xml file:
<Logger name="nz.co.breakpoint.jmeter.iso8583" level="debug" />
then inspect jmeter.log file and look for messages related to iso8583 and other suspicious entries
I was getting (channel/HOSTNAME:POST) [receive] In: 1210 *STAN Number(field 11) *Identifier (field 41) in my JMeter logs (with increased logging verbosity for ISO 8583 Messages) but could not see any thing in my View Results Tree's Response Data.
Answer:
Field 11 and Field 41 needs to be same in request as well as in
response. Once I matched both I was able to get response data in
JMeter successfully.

Frame must be terminated with a null octet error in Jmeter

I have to load test a WebSocket on Jmeter. WebSocket has been implemented using Springboot.
I am facing an issue while sending Stomp data on Jmeter while testing. I am framing text appropriately according to stomp frame. This is the CONNECT frame:
log.info("Connect PreProcessor");
String con = "CONNECT\n" +
"login:${wsToken}\n" +
"passcode:admin\n" +
"accept-version:1.1,1.0\n" +
"heart-beat:0,0\n" +
"\n"+'\0' ;
vars.put("wsStompCon", con);
I am making a send request and when I am subscribing to the connection, AMQ establishes a connection, and I get the CONNECTED response. So no issue in connection.
The issue happens when I am sending data as:
String User = "SEND\n" +
"content-length:39\n" +
"destination:/app/chat.newUser\n\n" +
"{\"sender\": \"Usr111222\",\"type\":\"JOIN\"}" +
'\0' ;
vars.put("wsAddUser", User);
I put the var 'wsAddUser' in the send sampler and am sending the data.
I get this error in response sampler:
ERROR
message:
Frame must be terminated with a null octet
content-length:0
I am using websocket plugin by Peter Doornbosch mentioned:
https://bitbucket.org/pjtr/jmeter-websocket-samplers/src/master/
I have changed the encoding to UTF-8 in Jmeter.Properties file as well. I think the issue is due to encoding but I'm not sure. What changes should I do for this issue?
It looks like your calculation of the content-length header is not very correct as {"sender": "Usr111222","type":"JOIN"} is 37 octets and \0 is another octet so it should be 38.
It is not recommended to inline JMeter Functions or Variables into Groovy scripts so you need to replace this line:
"login:${wsToken}\n" +
with this one:
"login:" + vars.get("wsToken") + "\n" +
(as long as it's not a GStringTemplate)
where vars stands for JMeterVariables class instance, see the JavaDoc for more information and Top 8 JMeter Java Classes You Should Be Using with Groovy for description of other JMeter API shortcuts available for the JSR223 Test Elements

Max payload size for post request and Get response for SpringBoot Rest

Is there any max size for send post payload ?
Actually, I have a service which send a json payload to another micro-service, In side of JSON payload, there is a filed which hold encoded String (basically i have converted file into encoded String and set it into that payload field value).
File size is not fixed, So i am curious about it, is there any max size support for Post json payload ?
I know spring-boot have following properties for set max size for file upload.
spring.http.multipart.max-file-size
spring.http.multipart.max-request-size
But as i mentioned i am not upload file, i am convert file into encoded string and send this string with json payload.
So how can i set the max size support for post request.
Also In another scenario I am hitting a Get request to micro-service and then this micro service return a large payload,is there any limitation of receive payload size?
It depends, not only in spring configuration as you've pointed, but also in server configuration.
Most servers have a post request loadout limit. For example in tomcat you can configure it with the "maxPostSize" property. Quoting from the documentation:
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing.
The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).

content-length much larger than expected

I'm sending an AJAX request with a few form fields (maybe 200 bytes max) and an image in base64. The image is 770KB but the content length says 1.1MB....is all of that extra data overhead?! Is there a better way to send an image?

jmeter response code 204 and can't get content

I am doing a websocket stress test through jmeter2.9.
When I send a request and response with a "light" json. the result is ok.
But when the response json contains a base64 png(about 360kb) . jmeter return code 204 No content (probably timeout).
Is my jmeter need some config here, or something else wrong.
If someone know something about this please teach me.
complete info:
Thread Name: threadgroup 1-1
Sample Start: 2013-07-17 15:36:06 CST
Load time: 20000
Latency: 0
Size in bytes: 0
Headers size in bytes: 0
Body size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 204
Response message: No content (probably timeout).
Response headers:
SampleResult fields:
ContentType:
DataEncoding:
Check if you are using Cache manager, there seems to be a (bug) in Jmeter that sets the response code to HTTP Code '204' ("No Response") while, there is no outgoing request, the information is retrieved from the Cache, try disabling cache manager and lets see if you can reproduce it then.
This could be because of the unhandled exception, response being larger than the maximum message size specified in the plugin code, etc. The exception which you see will be thrown if no response has been received from the server after predefined timeout.
Here is another WebSocket plugin for JMeter which might work for you
Link: https://github.com/maciejzaleski/JMeter
Features:
Supports HTTS/HTTPS (ws/wss) version of the WebSocket protocol
Option to ignore SSL certificate errors
Streaming allows for a single connection to remain open for the duration of the test
Response has to match predefined regular expression
Response timeout
Response message back log (build the Sampler response from multiple server messages)
Connection could be closed if server sends a mesage matching predefined regular expression

Resources