
Start testing your app with Casper.js - moritzplassnig
http://blog.codeship.io/2013/03/07/Smoke-Testing-with-Casperjs.html
======
lvh
(I've made this comment before on CasperJS/PhantomJS postings, but I've never
gotten an answer.)

I love the idea, but I'm a bit worried that it's just webkit. Aren't all the
other browsers important too? This is why I feel that Selenium still has a
place, even though I agree that Casper is easier to use. Perhaps browserling
is an appropriate answer?

I don't mean to disrespect CasperJS _or_ PhantomJS, they're certainly
wonderful tools, and any final automated functional test like this is
infinitely better than none, but it's bad enough that people are developing
for Webkit, do we really have to make it explicit by only testing on Webkit?
;)

~~~
someone13
Something else worth noting: the most recent release of PhantomJS actually has
an implementation of the Selenium WebDriver protocol, so you can use that, if
you wish:

<http://phantomjs.org/release-1.8.html>

~~~
edwinnathaniel
It implements the Selenium WebDriver protocol, but still executes it under
WebKit.

The point of the parent is to test on multiple browsers.

~~~
jonpaul
I think the point of the person you're responding to, was that if you use the
selenium interface with PhantomJS, you can change your testing browser to
Firefox, Safari, etc with very little work on your part. i.e start with
Phantom/Selenium, then test with the rest when you're ready.

------
chris_engel
While the topic is very interesting, I was very disappointed that the examples
are written in some minor esotheric language instead of JavaScript.

~~~
dljsjr
I'm not so sure that CoffeeScript is accurately described as "minor and
esoteric" these days…

------
lvh
Given that you're using CoffeeScript, is there a reason you're not using @
instead of this.?

~~~
tzaman
@ is the shorthand for this.

~~~
VeejayRampay
That's exactly what he was asking: Since @foo is shorthand for this.foo, why
are the code snippets littered with this.method, this.prop, this.blah and the
likes?

~~~
tzaman
Ah, my bad, I've misread the question

------
senko
If you're looking to use Casper.js on a Django project, have a look at the
small wrapper around LiveServerTestCase we wrote to make it easier to call
Casper, pass params (like server url), and the like:
<https://github.com/dobarkod/django-casper>

------
coolsunglasses
Casper.js (and Phantom, for that matter) has been pretty buggy and difficult
to work with for me. Had better luck with Selenium, which makes me unhappy
because I'd rather use something more code oriented.

~~~
ebiester
Are you using the PageObjects pattern? It seems pretty code oriented to me.

------
dandrewsen
Casper.js is definitely a great tool, with helpful documentation

------
MartinMond
In case it's not clear, Caspar.js is a framework/library for PhantomJS

------
DelvarWorld
Please don't encourage the use of phantomjs and its wacky ecosystem. It's
incredible instability will bite you in the face very soon.

~~~
tjbarbour
Can you expand? I'll be evaluating casper.js soon and would like to hear the
'pitfalls' Thanx!

~~~
DelvarWorld
phantomjs crashes almost non stop
[https://code.google.com/p/phantomjs/issues/list?can=2&q=...](https://code.google.com/p/phantomjs/issues/list?can=2&q=crash&sort=-id&colspec=ID+Type+Status+Priority+Milestone+Owner+Summary&cells=tiles)

