How can I run automated tests to check the average response time of a rest API? -


i have restful api run tests against @ random moments of day in order check average response time. wasn't able using postman's collection runner. there tool allows me this, or maybe i'll have write own?

you can use services pingdom retrieve calls api, or can use softwares (commercial or opensource, zabbix still around?) monitor api, or (if don't need many perks) can write script runs in cronjob , saves response time of api in txt file (or wherever want) further inspection.

here's little example, in php, can adapt fav. language.

// don't know how take run api request set_time_limit(0)  $start = microtime(true);  $result = executeapicall()  $executiontime = microtime(true) - $start;  storeexecutiontime($executiontime)  function storeexecutiontime($time) {    // store data somewhere } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -