Unit Testing Javascript within your Rails Application

0 views
Skip to first unread message

thechrisoshow

unread,
Sep 16, 2008, 10:53:06 AM9/16/08
to Ruby Manor
Something I'm interested in someone ELSE talking about is...

Unit Testing Javascript within your Rails Application

- what are the best practices
- what frameworks out there
- how do you get your javascript tests to run with your other Ruby/
Rails tests

Any gurus/intermediates/lame-o amateurs out there who'd like to do a
talk on this?

David Salgado

unread,
Sep 16, 2008, 12:46:41 PM9/16/08
to ruby-...@googlegroups.com
+1

2008/9/16 thechrisoshow <thechr...@gmail.com>:

James Adam

unread,
Sep 17, 2008, 6:20:35 PM9/17/08
to ruby-...@googlegroups.com
Is that a "+1" because you'd like to *give* the talk, David? :)

In general, it'd be great to get more feedback than just a "+1" -
like, for example, more specifics about what would interest you about
this talk?

David Salgado

unread,
Sep 17, 2008, 6:50:37 PM9/17/08
to ruby-...@googlegroups.com
Sorry, should have been more specific.

I wouldn't have a clue how to give this talk, but all three points
sound interesting.

D

2008/9/17 James Adam <ja...@lazyatom.com>:

petef

unread,
Sep 25, 2008, 9:58:46 AM9/25/08
to Ruby Manor
I'm not offering to give the talk but we are aware that there is a
large hole in our unit test coverage for JavaScript so I'd be very
keen to hear about experiences of working with JsUnit, or compelling
reasons to look at alternatives.

Chris O'Sullivan

unread,
Oct 1, 2008, 2:01:52 PM10/1/08
to ruby-...@googlegroups.com
Hey y'all,

So I've taken it upon myself to bung together some javascript functional tests for a Rails application at work.  We're using Dr Nics plugin and scriptaculous's unittest.js - and it seems to work pretty well.

I could definitely put together an 8 minute talk to get peeps up and running if anyone's keen.

-Chris

2008/9/25 petef <peter...@gmail.com>

Peter Ferne

unread,
Oct 2, 2008, 12:08:36 PM10/2/08
to ruby-...@googlegroups.com
On 1 Oct 2008, at 19:01, Chris O'Sullivan wrote:
> So I've taken it upon myself to bung together some javascript
> functional tests for a Rails application at work. We're using Dr
> Nics plugin and scriptaculous's unittest.js - and it seems to work
> pretty well.
>
> I could definitely put together an 8 minute talk to get peeps up and
> running if anyone's keen.

I'd like to hear this, esp. what was good or less good about the
approach.
--
petef

Gerhard

unread,
Oct 6, 2008, 5:52:01 AM10/6/08
to Ruby Manor
I would be particularly interested in the use & testing of jQuery
(jRails). But yeah, anything related to JS testing will be highly
welcome.

On Oct 1, 7:01 pm, "Chris O'Sullivan" <thechrisos...@gmail.com> wrote:
> Hey y'all,
>
> So I've taken it upon myself to bung together some javascript functional
> tests for a Rails application at work.  We're using Dr Nics plugin and
> scriptaculous's unittest.js - and it seems to work pretty well.
>
> I could definitely put together an 8 minute talk to get peeps up and running
> if anyone's keen.
>
> -Chris
>
> 2008/9/25 petef <peter.fe...@gmail.com>

Matthew Rudy Jacobs

unread,
Oct 6, 2008, 6:22:09 AM10/6/08
to ruby-...@googlegroups.com
I know Texperts do proper Prototype testing,
and run it automatically on their CruiseControl server.

2008/10/6 Gerhard <gerhar...@gmail.com>

Ben Griffiths

unread,
Oct 6, 2008, 6:48:19 AM10/6/08
to ruby-...@googlegroups.com
-1 on the grounds of more ruby less rails, more play and less work.

simonf

unread,
Oct 14, 2008, 3:00:28 PM10/14/08
to Ruby Manor
I'd definitely like to hear this too, esp. a discussion of best
practise on separating AJAX from UI JS tests.

On 1 Oct, 19:01, "Chris O'Sullivan" <thechrisos...@gmail.com> wrote:
> Hey y'all,
>
> So I've taken it upon myself to bung together some javascript functional
> tests for a Rails application at work.  We're using Dr Nics plugin and
> scriptaculous's unittest.js - and it seems to work pretty well.
>
> I could definitely put together an 8 minute talk to get peeps up and running
> if anyone's keen.
>
> -Chris
>
> 2008/9/25 petef <peter.fe...@gmail.com>

Chris O'Sullivan

unread,
Oct 23, 2008, 12:44:25 PM10/23/08
to ruby-...@googlegroups.com
<ahem>

My proposition is to do an 8 minute talk about the Javascript unit testing framework newjs (http://github.com/drnic/newjs/tree/master). It's framework agnostic and so doesn't depend on jQuery, prototype or any other javascript framework.

You will learn:
- How to set up javascript tests in your Rails project using some rake scripts
- A few basic client side javascripty assertions
- How to use dynamic bits of html for functional testing

What you will NOT learn
- How newjs compares with other Javascript Unit Testing methodologies
- How to run your javascript tests with autotest
- Complicated javascripty assertions
- How to test Javascripty stuff that hits the server (i.e. AJAX)
- Where babies come from

Note: this talk has a tenuous relationship to Ruby (the generators used to setup the tests are in Ruby)


2008/10/14 simonf <simon.j...@gmail.com>

Murray Steele

unread,
Oct 29, 2008, 11:15:27 AM10/29/08
to ruby-...@googlegroups.com
Anyone reading between the lines of our shutting down of the Sproutcore proposal will be expecting this, but for those who haven't guessed yet: we're closing down this talk.

There's been a lot of interest in this talk, and it was even one of the only ones to go from a suggestion to a full blown proposal proving that our model for proposals could work, so it was a pretty hard decision.  However, when we reviewed all the talks that had been proposed, this one stood out as not being about Ruby and that just didn't fit with what James and I want from Ruby Manor.  If we were running Rails Manor, or Ruby On The Web Manor it would be a perfect fit as we could expand our horizon to cover non-ruby web stuff, but we're not so we decided to cut it in favour of other more ruby focussed talks.

Murray & James


2008/10/23 Chris O'Sullivan <thechr...@gmail.com>
Reply all
Reply to author
Forward
0 new messages