How to send multiple (list) json objects inside text file to run 'ab' load test POST request?

65 views Asked by At

I would like to send multiple POST requests with multiple json objects inside text file to the python server using apache bench load test tool.

ab -p sample.txt -T application/json -c 2 -n 4 http://localhost:8080/xxxx

If sample.txt contains single instance of json, it works fine

{"first_name":"Clara","last_name":"Gislason"}

however when sample.txt contains list of json objects as below, it doesn't work.

[{"first_name":"Clara","last_name":"Gislason"},{"first_name":"Meaghan","last_name":"Jenkins"}]

Can someone help?

0

There are 0 answers