On Thu, Nov 26, 2009 at 5:14 PM, Josh Price <
jos...@gmail.com> wrote:
> I'm with Gareth on this.
>
> Unit test your JS, and even if you use BlueRidge to remove the DOM
> from the equation, you'll eventually have do it in each browser. I
> really like ScrewUnit, but there are other frameworks out there. The
> problem with JS tests is it's fairly funky to include these in your
> build. I've been on projects where we used Selenium to do this, but
> it was overly complex.
>
> Ideally you want to test everything in isolation in your app then use
> Selenium (or equivalent) for your functional tests to make sure
> everything hangs together.
>
> Josh
>
>
> On 26/11/2009, at 5:00 PM, Gareth Townsend wrote:
>
>> My take.
>>
>> Use selenium, power it through cucumber.
Cucumber is definitely the right tool to drive these tests; and from
the cucumber github wiki (
http://wiki.github.com/aslakhellesoy/cucumber/javascript-and-ajax )
"Cucumber relies on 3rd party libraries for anything Javascript
related, including AJAX. We recommend one of these to test Javascript
functionality:
Celerity / Culerity
Watir or any of its cousins for browsers other than IE.
WebDriver
Selenium (The oldest and buggiest of them all)
Blue Ridge
All of these have Ruby APIs (or Java APIs that you can use if you run
Cucumber on JRuby), and all you need to do is use these APIs in your
Step Definitions."
The enduring problem with most of these is CI (continuous
integration), more specifically getting known, robust and reliable
state set up and running before each CI go around.