I am using Jmeter to test two things.
Big strings (multiple characters as a value, Ex. "valueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee") in a json request of a stringified json for a single user.
Smal string (just a normal value, Ex. "value") in a json request of a stringified json for a hundred users.
*** First I use PUT http request to update the db with the json data:
{ "data": "{"servers":[{"host":"testHost221","port":1234,"useSSL":false,"useTLS":false,"password":"testPassword1","username":"koko"}]}" }
*** Then I use a GET to verify the results from the db.
*** And this is the error I get in the JSON Assertion for both tests (of course when I use the big string for value, the values do not look like username=koko, but kokoooooooooooooooooooooooooooooooooooooooooooooooooooooooo:
Value expected to be '"{"servers": [{"host": "testHost221", "port": 1234, "useSSL": false, "useTLS": false, "password": "testPassword1", "username": "koko"}]}"',
but found '{"servers": [{"host": "testHost221", "port": 1234, "useSSL": false, "useTLS": false, "password": "testPassword1", "username": ""}]}'
NOTE: It seems that stackoverflow removes the escaping too, so I am uploading an image of the failed assertion:
It happens in both tests "big string - 1 user" and "small string - 100 users". This however happens somewhere around the 49th execution (when I use 100 users with short strings), but happens always when I use big stringed value (with many characters oike show above).
So why does the escaping get removed at some point? Can anyone help me? NOTE: I must use this (stringified) json!
I tried to use http raw request from the plugins manager but it keeps returning 400, I guess it does not like the json. I asked the AI, it suggested that Jmeter could mistreat the escaping as regex and get confused at some point... The results are consistent, both the passed and failed tests...always somewhere around the 49th execution of the test (when I use 100 users) and always when I use 1 user with big values for the json keys. Postman does not have this issue (I tested the case with long stringned values, dunno how to test with 100 users on postman and if it is possible at all...)