On 04/16/2014 07:20 PM, Russell Keith-Magee wrote:
> On Thu, Apr 17, 2014 at 5:57 AM, Trey Hunner <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     I saw a previous discussion about JavaScript testing in Django but
>     it looks like there hasn't been any progress in a few years.
> 
>     Some of my thoughts on this issue:
> 
>     This would require choosing a JavaScript testing framework.  There
>     are many good ones out there.  A popular one should probably used
>     for easier community support.
> 
>     Unit testing JavaScript (ideally) should not require running the
>     Django server.
> 
>     JavaScript tests will probably require introducing Node.js into the
>     automated testing process.  Tests can be run manually from the
>     browser, but automated JavaScript tests tend to require Node.js and
>     sometimes PhantomJS (for headless testing).
> 
>     The JavaScript tests should be run as part of the CI testing
>     process.  If the tests are run standalone this should be easy to do
>     using a single command (possibly requiring grunt or a similar task
>     runner).
> 
>     This seems like it would be a big change, but I think it could be
>     done in small steps.  Setting up the testing framework is the first
>     big step.
> 
>     What do others think about this issue?
> 
> 
> I have two thoughts:
> 
> 1) More testing doubleplus good. :-)
> 
> 2) Is there anything that can save us from the Node.js kudzu? :-)
> 
> As with your previous question about linting, I don't have any firm
> opinions about this, beyond "Yes, we should do it". 
> 
> My suggestion here would be to proceed as if we all agree that this is a
> good idea (more testing good, etc), and make a concrete proposal. It's a
> lot easier to discuss a concrete proposal than to just kick around
> buzzwords and hope some of them stick :-). 
> 
> You've definitely identified that this is a long term project; so if you
> can lay out a map for the way forward, with an indication of the end
> goal, that would be a fantastic start IMHO.

I agree that this would be a good idea - thanks for working on it!

A DEP might be a good format to summarize the thinking that goes into
picking a particular tech stack for JS tests.

(FWIW, on my company's projects we unit-test JS using Node, PhantomJS,
Grunt, QUnit, and Istanbul for test coverage measurement, so that's the
stack I'm familiar with. It's worked very well for us; there's a
grunt-qunit-istanbul plugin that brings the pieces together nicely. But
I didn't make those choices and am not familiar with the alternatives;
there may be better options.)

Carl

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/53500FA9.5030009%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to