I am looking for a tool to test a website from a Linux command line.
From the output, I need to know the http response (status codes) but also benchmark the time it takes to download the different elements of the site.
Thank you in advance.
-
use curl to get the header for the page, and time the process
time curl -I http://yourpage.com | grep HTTP
wrap that in a while loop and you're good to go, the same way you can check for all elements if you know the URL
From SideShowCoder -
Please see Apache Benchmark:
This should give you an overview of your page's performance.
Embreau : Apache benckmark cannot be use for this since it is an external source, in fact it is youtube video playlist. We are monitoring the access to this ressource. TYgareth_bowles : I don't see why you can't use ab; like wget in the next answer, it will work as long as the URL of your site is accessible from the machine where you're runinng the benchmarking tool.andre : Apache benchmark is not restricted to local resources, it's meant to be a full performance measuring tool (including network latency, i/o, etc).Embreau : Good to know, I will evaluate this option, thank you.From andre -
You can try
wget
with-p
option:wget -p http://site.com
It will tell you how long it takes to download each element and the return codes for each request.
From Dan Andreatta -
You may want to look at the following options of
curl
:--write-out
- displays any of several time-related variables--trace-time
- Prepends a time stamp to each trace or verbose line--verbose
--include
- (HTTP) Include the HTTP-header in the output.--trace-ascii <file>
- Enables a full trace dump of all incoming and outgoing data, including descriptive information
And the following option of
wget
:--timestamping
- Turn on time-stamping
From Dennis Williamson -
If you are going to need something bigger then curl and/or wget, there is also selenium
From Unreason -
Selenium and Curl are good options depending on what your goal is. Also, a utility that I've come to like quite a bit is
twill
. More information is available at http://twill.idyll.org/.It's nice as it has it's own little specialized language for filling out forms, validating links, and checking response codes. Since it's just Python code, you can easily import the libraries and automate your tests yourself if you'd like to do something different.
From McJeff
0 comments:
Post a Comment