CasperJS hits 1.0 stable

This post has been published more than 10 years ago, and parts of its contents are very likely to be obsolete by now.

Hey, long time no see, right? Quite a lots of things have happened to my tiny CasperJS pet project since then, which has just hit its 1.0 stable milestone. Merry Christmas :)

As a reminder, CasperJS is an open source navigation scripting & testing utility written in Javascript and based on PhantomJS — the scriptable headless WebKit engine.

Now some scary metrics about the project:

Where will all of this end? Capture courtesy of gitego.com

Btw here’s a short excerpt of what people are saying on twitter about it:

--- --- --- ---

</brag><realism>

That makes a lot of attention — and therefore expectations — for what started as a tiny helper script on top of PhantomJS… and put a bit of pressure on my shoulders :)

So what’s new in CasperJS 1.0?

Lots of stuff, and I mean it. In no particular order:

  • added a casperjs test command to run test scripts
  • added support for CSS3 and XPath selectors
  • added support for popups and (i)frames
  • there’s now a way to specify how many tests were planned when done() is called
  • easy access of current HTTP response object as the first parameter of step callbacks (thx oncletom!)
  • many new assertions methods have been added to the Tester class
  • added a convenient Batch script for Windows users that’s where you gotta love your community
  • better contextualization of errors, nicer output of them
  • XUnit XML test result logs now contain the duration of each test case
  • added many new events and filters so you can hook quite wherever you want into the casper asynchronous workflow
  • better compliance with PhantomJS’ native evaluate() argument passing
  • plus many bugfixes, refactors and other enhancements

As a side note:

  • PhantomJS 1.6.x support has been dropped
  • PhantomJS 1.7 & 1.8 are supported

The CasperJS ecosystem

As I realized that opensource projects based on CasperJS were created, I decided to open a dedicated github organization, first for trying to list them in a central place.

Some interesting CasperJS-based projects:

The future

  • CasperJS 1.1 is on its way starting today, and will provide new features and bugfixes, trying not to reinvent the casper wheel
  • CasperJS 2.0 will probably be a big rewrite refactor of the 1.x codebase, and will try to use more of the existing javascript ecosystem (think mocha for instance)… but let’s enjoy the 1.x for a while first! and let me have a bit of sleep too

See ya.