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
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
Comment #1
dave reidA plus for Casper JS is they are easier to automate with Travis CI.
Comment #2
cs_shadow commentedWe've a new candidate: QUnit
Comment #3
dave reidHrm, 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.
Comment #4
cs_shadow commentedYes, 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.)
Comment #5
cs_shadow commentedBased on IRC discussions with @nod_, seems like CasperJS is the right choice.
Comment #6
cs_shadow commentedDecided CasperJS.
Opened follow-up task to write functional tests: #2300811: Write front-end tests using CasperJS
Comment #7
cs_shadow commentedWe 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
Comment #8
cs_shadow commentedI'm closing this issue since Core is moving in direction of BDD testing. Once that part is in Core, we can just use that.