[Sugar-devel] Unit tests in Sugar HTML
Manuel Quiñones
manuq at laptop.org
Mon May 13 13:06:45 EDT 2013
We could run the tests in a custom WebKitGTK browser script, which
could be like htmlactivity.py but without UI.
http://karma-runner.github.io/0.8/config/browsers.html
And add something like this in the karma.conf.js:
browsers = ['/usr/local/bin/custom-browser.sh'];
2013/5/13 Manuel Quiñones <manuq at laptop.org>:
> 2013/5/13 Daniel Narvaez <dwnarvaez at gmail.com>:
>> I'm on a phone so I have not yet taken a proper look. Though it looks pretty
>> cool. It seems to have custom browsers support, so it should be easy to run
>> it in sugar-html-activity.
>>
>> We can look at hooking this up in sugar-build/buildbot, it should not be a
>> lot of work.
>>
>> I suppose it should work for the libraries too if we just put some HTML in
>> the test dir.
>
> Yes the idea is to add unit tests in each of our libraries. I did it
> in lib/sugar-html-graphics inside clockjs code to get a first
> impression, but I will move it to sugar-html-graphics repository if we
> agree using Jasmine.
>
> There is no need to add any HTML. Just add a loader.js inside test/
> with the RequireJS configuration, similar to the activity js/loader.js
> .
>
> So the proposal would be:
>
> - start writting unit tests with Jasmine framework
> - add a command to sugar-build to run the tests with Karma
> - automate tests adding Karma to buildbot
>
> --
> .. manuq ..
--
.. manuq ..
More information about the Sugar-devel
mailing list