Ajax Bestiary: A Javascript Field Guide
 
Ajax Bestiary: A Javascript Field Guide
 
 

Javascript Testing with Test from Javascript MVC

Posted by Don Albrecht

I’m always looking for ways to improve my javascript development and after a few weeks of playing, Javascript MVC test looks like it might be one the best tools yet.

We all know the power of testing our code.  A proper suite of unit tests can be among a projects most valuable assets.  They can ensure against the regressions rampant in rapid application development cycles that may not have adequate opportunities for proper QA.  Most importantly, when coupled with continuous integration tools, a comprehensive test suite catches many bugs close to when they are written and when they are easiest to correct.

Historically, testing javascript hasn’t been the most useful or productive of tasks.  The type of data manipulation, object inheritance and communication most conducive to unit testing has been minimized in most javascript applications.  Instead, most javascript is highly event driven and is often loosely tied to any specific server side data model.  Test MVC stands to provide a powerful testing framework for just those tasks we normally use javascript for.

Key Features

 

  • Cross browser1 support for typical DOM events, like keypress, click, submit, blur, and focus
  • Simulate writing text or dragging an element
  • Easily simulate AJAX functionality with sample data in fixture files
You can find out more here
http://javascriptmvc.com/learningcenter/test/index.html

 

Streamline Your Code – Test – Debug Cycle with Fireclipse

Posted by Don Albrecht

Although there are some comments that it may not be ready for Prime Time.  Fireclipse may be the tool you need to supercharge your development cycle.

 What it is

An Eclipse Plugin & Expanded version of Firebug.

The Expanded Firebug provides an Eclipse Tab within the browser environment.  The Eclipse plugin integrates the Firebug console into eclipse.

Get it Online Here: http://www.almaden.ibm.com/u/bartonjj/fireclipse/index.html 

Streamline jQuery Debugging with Firebug Logging

Posted by Don Albrecht

Here’s a handy jQuery plugin to speedup development and greatly enhance debugging.

http://happygiraffe.net/blog/archives/2007/09/26/jquery-logging 

This lets you simply add a .log command to a jquery chain and have the result logged to the firebug console with all relevant contextual information.  Fast, easy and simple.

Crosscheck, Browser Independent Unit Testing for Javascript

Posted by Don Albrecht

Crosscheck Logo

What is it:

Crosscheck is an open source testing framework for verifying your in-browser javascript. It helps you ensure that your code will run in many different browsers such as Internet Explorer and Firefox, but without needing installations of those browsers. The only thing you need is a Java Virtual Machine.

How it works:

It executes javascript in a browserless environment & records the results.  It is capable of testing against both IE and Firefox on any computer.

It’s limitations: 

For many of us, fine grained javascript unit testing doesn’t make the most sense.  An automated environment can’t tell you if something looks right or if the drag is actually dragging, but it can verify that defined functions & ajax calls are performing as expected.

It’s free, open source & worth investigating for your next project.

Find Crosscheck online at www.thefrontside.net/crosscheck
Learn more about using crosscheck from Jason Harwig’s Blog