For performance testing, we can use ab to write a basic load test for each API call, and see which ones are slow.
For correctness testing, we could write a script that calls each method and verifies the returned data.
Is this covered by apache_bench_report.sh?
@MitchLillie Mostly by api_benchmark.sh, but its far from complete (doesnt include any POST/PUT/DEL requests).
Gotcha, thanks. I will take a stab at this today
Is there anything I'm missing? Simply trying to curl as below, and getting 400 responses:
curl -i -H "Content-Type: application/json" -d '{
"op": "Login",
"data": {
"username_or_email": "mitch",
"password": "mitch"
}
}' http://localhost:8536/api/v1/user/login
I think you need to add -X POST.
Same result, 400. I think -X POST is redundant when you pass -d
I just tested this and its working fine on my machine:
curl -i -H \
"Content-Type: application/json" \
-X POST \
-d '{
"username_or_email": "why",
"password": "test"
}' \
http://localhost:8536/api/v1/user/login
edit: I see the issue. You don't include the "op" or "data" field when using the http calls. These are just required for the websocket since there's only one websocket endpoint. The post example shows that.
Awesome, thanks. I knew it was something silly
I need to step away from this, sorry. Lots of complication here in holding on to the jwt. I may have more time to investigate next week
@MitchLillie no need to rush :)
The federation tests have this now.
Most helpful comment
I need to step away from this, sorry. Lots of complication here in holding on to the jwt. I may have more time to investigate next week