How solve error 'Configuration result is immutable' using package loadtest with configfile?

18 Views Asked by At

I would like to run loadtest (command npx loadtest http://localhost:3000/endpoint) on production server with configuration file .loadtestrc:

{
    "method": "POST",
    "body": {
        "to": "[email protected]",
        "subject": "Loadtest",
        "text": "Loadtest text"
    },
    "headers": {
        "Content-Type": "application/json",
        "Accept": "application/json"
    },
    "maxRequests": 1,
    "concurrency": 1
  }

but that gives error 'Configuration result is immutable'.

How can I solve that?

Also tried running this from the command line:

loadtest https://localhost:3000/endpoint -c 1 -n 1 -H Accept:application/json -T application/json -P '{ "to": "[email protected]", "subject": "Loadtest", "text": "Loadtest text" }' -m POST

but that gives the same error.

On the server Ubuntu is running with NGINX.

0

There are 0 best solutions below