lundi 20 août 2018

Testing a Ruby on Rails application

I just wanted to test my small Ruby on Rails application. I already benchmarked the database using sysbench but now I want to combine the test (webserver + mysql) in order to see if the server's hardware fits my needs.

This means that I want to test the Read and Update performance of my model via the web frontend (e.g. I want to test the behavior of twenty clients performing 2 requests/s ea including the ajax update of the header statistics (a statistic which will be reloaded every 10s).

First of all I tried to use a small curl script in order to keep the test's performance smoothly.
But I ran into a kind of redirect problem: I'll land on a "You are being redirected" page which means that I'll have to enable the redirect flag -L.

After that my command looks like curl -c cookiejar -g -L -J -F "user[username]=<username>" -F "user[password]=<password>" http://127.0.0.1/users/sign_in But I'll just land at the login page again ... - I also had a quick peek into selenium which seems to be a bit too slow for my purposes or am I just getting it wrong?

Which way of testing would you recommend in my specific use case?

Aucun commentaire:

Enregistrer un commentaire