PhantomJS is a headless WebKit browser that allows you to call, test and scrape websites from the command line. In the developer’s own words:
CasperJS is a testing and scripting framework that builds on PhantomJS. Again, in the developer’s own words:
- defining & ordering browsing navigation steps
- filling & submitting forms
- clicking & following links
CasperJS makes implementing acceptance tests a breeze, which makes it a great tool for complementing your test suite. I’d even go as far as saying that for web applications acceptance tests can work as a replacement for traditional unit tests since they more accurately define the behaviour of an application.
Edit: I just found this article by Codeship.io about testing with CasperJS, which has some nice CasperJS code examples.
Pingback: BromBone – Headless Browser As A ServiceBjörn Wilmsmann | Björn Wilmsmann