Apropos today's meeting, we need to decide a testing framework for testing javascript. Right now, our candidates are: Casper JS, Selenium and Jasmine. EDIT: Consider QUnit also.

Also, refer core issue: https://www.drupal.org/node/2232271

Comments

dave reid’s picture

A plus for Casper JS is they are easier to automate with Travis CI.

cs_shadow’s picture

We've a new candidate: QUnit

dave reid’s picture

Hrm, I still think the primary function of the JS testing is going to be replicating in-browser JS functionality, which makes me inclined towards CasperJS still. I don't think our JS is or ever can be abstract enough to actually be unit testable, which seems to be what QUnit is for.

cs_shadow’s picture

Yes, I tried re-factoring our code to make it more unit-testable and it seems that its not going to be easy to be make it unit-testable. So, I guess we've to go with functional tests only. So, QUnit might not be the right choice.

(Just saw the JS Testing video from Austin and that used QUnit for demo, so I quickly put it down here. Later realized that it might not be most suitable.)

cs_shadow’s picture

Based on IRC discussions with @nod_, seems like CasperJS is the right choice.

nod_: PhantomJS-related stuff is better with regard to what's going on with drupal

cs_shadow’s picture

Status: Active » Fixed

Decided CasperJS.

Opened follow-up task to write functional tests: #2300811: Write front-end tests using CasperJS

cs_shadow’s picture

Status: Fixed » Active

We still need to decide whether to use CasperJS (which'll also involve writing a lot of custom boilerplate code) or wait to see what core decides.

Related issue in core: #2232271: [Meta] Use Behat for validation testing

cs_shadow’s picture

Status: Active » Closed (fixed)

I'm closing this issue since Core is moving in direction of BDD testing. Once that part is in Core, we can just use that.