Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

54
Vistas
Load Test Post Request

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"}}'`,

'" ]

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

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'
7 months ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos