[Plone-testing-team] JavaScript testing and integration

Ross Patterson me at rpatterson.net
Tue Jul 16 18:14:54 UTC 2013


On Fri, Jul 12, 2013 at 8:18 AM, Asko Soukka <asko.soukka at iki.fi> wrote:
> 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.

These are not exclusive.  There's nothing in the zope.testrunner
integration that keeps the buster.js tests from being run any other
way.

> 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.)

Do these provide for setup and tear down of the browser slave?  That's
the primary value I was aiming for in buster-selenium, it re-uses
selenium tools to control the browser slaves and uses zope.testrunner
layers to ensure cleanup and also to share browser slaves between
tests (massive speedup).  The final value is that developers get JS
test failure feedback in bin/test.

Ross

> 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
>
>
> _______________________________________________
> Plone-testing-team mailing list
> Plone-testing-team at lists.plone.org
> http://lists.plone.org/mailman/listinfo/plone-testing-team


More information about the Plone-testing-team mailing list