A javascript testing framework is most desirable.  Thanks for your
work so far - what can we do?

On Sat, Jun 18, 2011 at 8:15 PM, Julien Phalip <jpha...@gmail.com> wrote:
> Hi Sean,
>
> On Jun 18, 4:24 am, Sean Bleier <seble...@gmail.com> wrote:
>> Hello everyone,
>>
>> A couple months ago I started work on a django branch [1] (with the help of
>> @jezdez) that introduces a framework for writing javascript unit tests using
>> QUnit[2].  I started with QUnit because Django already included jQuery in
>> the admin and seemed like a natural extension, but it would be nice to hear
>> opinions from people that know more about javascript testing than I.
>>
>> Since I haven't touch it in a couple months, I thought I would share it with
>> django-developers to get some more eyes on it and discuss any missing
>> features or implementation details. It also be nice if Idan or any other
>> designery person could look it over and give some UI/UX advice.
>>
>> Just to give a overview, the javascript testing framework is initiated by
>> first collecting static media and then starting a special runserver:
>>
>>     ./manage.py collectstatic
>>     ./manage.py jstest
>>
>> This starts a runserver that collects and serves everything you need to run
>> the javascript tests found within an installed app. More detail can be found
>> in these preliminary docs[3], though they need to be moved into their proper
>> place within the docs directory.
>>
>> I'm hoping we can figure out a way forward so that we can start writing
>> tests for the admin and elsewhere.
>>
>> Cheers,
>>
>> --Sean
>>
>> [1]https://github.com/sebleier/django/tree/qunit
>> [2]http://docs.jquery.com/Qunit
>> [3]https://github.com/sebleier/django/blob/qunit/django/test/javascript/...
>
> Thanks a lot for working on this. Django is in dire need of a solid
> javascript test framework.
>
> I've actually been looking at this branch a few weeks ago and it's
> looking very promising! I had a few remarks and questions.
>
> Do you have any specific plans for testing the admin *interface*? My
> main concern is that to properly test complex interactions (e.g.
> dynamically adding or removing admin inlines), you would need to have
> a DOM based on the up-to-date admin templates and on some test data.
> Is it envisaged to plug the QUnit test platform in with a running
> instance of Django that would supply admin pages on the fly, or
> perhaps to introduce a management command that would generate HTML
> files using the up-to-date admin codebase?
>
> Also, one curse of javascript is that it doesn't always behave quite
> the same on all browsers. It would be absolutely awesome if the
> process of testing on multiple platforms and browsers could be
> automated in a CI environment. The Mozilla guys have done some work in
> that area: https://github.com/kumar303/jstestnet -- I haven't tried it
> myself yet. Do you think this could be looked into for Django itself?
>
> Then, as currently in your branch, QUnit tests are expected to be put
> in a "tests/javascript/" folder. Does it mean that the same folder
> structure can be used to run other types of JS test runners? If not,
> would it be best to use a more explicit structure and require that
> tests be put in, for example, "tests/qunit/", in order to leave the
> room for other JS test runners to be supported in the future?
>
> Finally, a ticket has recently been created in Trac for this:
> https://code.djangoproject.com/ticket/16193 -- 'mbraak' posted a patch
> with a few simple tests for the admin JS. It'd be great to see how
> both your works integrate.
>
> Thanks again, this is awesome!
>
> Julien
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django developers" group.
> To post to this group, send email to django-developers@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-developers+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-developers?hl=en.
>
>



-- 
Justin Holmes

Head Instructor, SlashRoot Collective
SlashRoot: Coffee House and Tech Dojo
60 Main Street
New Paltz, NY 12561
845.633.8330

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to