Thursday, May 16, 2013

Automated Performance Testing with CasperJS

This is currently just a hobby script, but could potentially turn into a very useful performance automation testing framework.

Recently I have integrated a Spider into the Casper netsniff script, and what it does is when you pass the spider an entry point of your site, and it will go through all the pages, capture screenshot and generate har file for all your individual pages.

For more info about this project, please visit
https://github.com/iroy2000/casper-netsniff-spider

Here are some screenshots






Tuesday, May 14, 2013

CasperJS netsniff.js

Recently I was playing around with PhantomJS and like this testing framework a lot.  And then two days ago I saw in some forum posts that people recommended to use CasperJS ( built on top of PhantomJS ) which provide site navigation functionality. So I started playing around with CasperJS.

And then one day later, which is this morning, I was trying to think about using phantomJS netsniff.js script in CasperJS, and I google it like "How to use the phantomjs example netsniff.js inside casperjs", and there is not much results, all of them are talking about PhantomJS netsniff. Then I also search in the CasperJS google group and found that there some people actually are asking the same question.  Without finding any results further, I finally take the PhantomJS version and convert it for CasperJS.

Here is the github link:

https://github.com/iroy2000/casperjs-netsniff

Hope it helps those who have the same issue. Enjoy!

Note: I'm working on a customized version where you can generate har file when you navigate around the sites in your Casper tests.

Please leave me message if you have any comments.  Thanks!