[Plone-testing-team] JavaScript testing and integration

Asko Soukka asko.soukka at iki.fi
Fri Jul 12 15:18:17 UTC 2013


Gil Forcada wrote:
> So I'm about to invest some time looking for how to make and integrate
> in plone.app.testing a JavaScript tests runner.
>
> What's the status quo right now? Any prior art on that? Rok is using
> Buster.JS right?

AFAIK, there is no status quo.

As said in the ticket, Ross has made BusterJS integration for 
zope.testrunner (https://github.com/plone/buster-selenium) so that JS 
tests would be run and reported with other zope.testrunner tests.

Rok, however, suggests that we should follow the best practices of JS 
community and use JavaScript-based testrunner, especially not 
zope.testrunner, for JavaScript unit tests.

Rok has been advertising Mocha + Chai + TestEm combo. Mocha provides 
syntax for test suites (and also a test runner), Chai provides 
assertions and TestEm provides a continuous test runner, especially, for 
test writing purposes. (For CI use, I'm not sure if TestEm has yet 
enough community to stay alive.)

AFAIK, the current goal for Plone Core is to develop and test all 
JavaScript in Plone Mockup (and then simply release packaged versions in 
core packages and maybe test them once more with functional robot tests).

So, currently there's no prepared story for testing add-on JS. However, 
since mockup has public CI-integration on Travis-CI, it can be used as 
an example.

-Asko




More information about the Plone-testing-team mailing list