Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export all http requests on a specific page to txt/csv

I use SIEGE to test my web server performance. For a more realistic test the best way to go would be to have SIEGE hit the web page (website.com/our-company) and all static assets (.css, .js, .png, .jpg). Everything that you see on the firefox / chrome debbuing tools, except of course from resources loaded from external servers (cdn.facebook, apis.google.com).

I am running several tests so it is a pain to manually collect all asset urls. Is there a tool that I can use to load a web page and export the url for everything that was loaded?

This is firefox debugging. If I could export this to txt or csv, it would be perfect. enter image description here

I tried CURL on debian CLI but I am no experct. Any tool will help, it does't have to be a plugin of Firefox / Chrome.

Best regards.

like image 613
ddutra Avatar asked Oct 08 '13 11:10

ddutra


4 Answers

In Chrome you can export these data to a HAR file (it's JSON based) in one click. Go to "Network", right click and choose "Save as HAR with content".

Save as HAR with Content option in DevTools

like image 189
Konrad Dzwinel Avatar answered Nov 15 '22 14:11

Konrad Dzwinel


Here's a free command line application to convert HAR files to CSV. Hope it helps.

http://www.yamamoto.com.ar/blog/?p=201

EDIT: added the project to GitHub:

https://github.com/spcgh0st/HarTools

like image 36
spcgh0st Avatar answered Nov 15 '22 15:11

spcgh0st


On Windows you could use HttpWatch to do this with the free Basic Edition in IE or Firefox:

http://www.httpwatch.com/download/

The CSV export function will export the URLs and other fields to a CSV file.

** Disclaimer: This was posted by Simtec Limited the makers of HttpWatch **

like image 26
HttpWatchSupport Avatar answered Nov 15 '22 14:11

HttpWatchSupport


Had the same requirement of exporting HAR files from Chrome DevTools or Firebug to do load testing with siege. Additionally, I wanted to replay POST requests too.

Choose one of these solutions:

  • hardy @ https://github.com/nbibler/hardy - ruby script
  • har2siege @ https://gist.github.com/photopresentr/7974747 - node.js (my script)
like image 1
flexponsive Avatar answered Nov 15 '22 14:11

flexponsive