My json data in postman body look down. I send a message request, it return status 200 as a result.
{
"device": {
"ip": "1.1.1.1",
"port": 8093,
"username": "",
"password": ""
},
"subscriber": {
"id": "abcdefgh"
}
}
I want to loadtest in post request but "too many arguments error" ?(return status 404)
loadtest -P '{"device": {"ip": ""1.1.1.1"port": 8093,"username": "","password": ""},"subscriber": {"id": "abcdefgh"}}' -n 1000 -c 100 -T
Too many arguments: [
'{"ip":',
'"1.1.1.1","port":',
'8093,"username":',
'"","password":',
'""},"subscriber":',
'{"id":',
`"abcdefgh"}}'`,
'" ]
Just a general tip: start with a low number of requests, concurrency and requests per second first before hitting high figures.
Try escaping the double-quotes as mentioned in Load test using NPM module loadtest causes server to return HTTP code 400
loadtest -P '{\"device\": {\"ip\": \"159.146.11.203\",\"port\": 8093,\"username\": \"\",\"password\": \"\"},\"subscriber\": {\"id\": \"abcdefgh\"}}' -n 1000 -c 100 --rps 2000 -T 'application/json' 'http://localhost:5050/subscribe-mobile-device'