Agile JavaScript Testing

*
Accepted Session
Short form
Scheduled: Wednesday, June 17, 2009 from 11:20am – 12:05pm in St. Johns

Excerpt

With the recent surge in JavaScript popularity, and the advances in JavaScript virtual machines, serious applications can and are being built in JavaScript. As the sophistication of these apps grow, so grows the need for verifying that our code continues to work as we expect. We'll briefly cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.

Description

Intro

  • Test Driven Development – What is it, why do it, what are the advantages?
  • Challenges of web applications – browser quirks, asynchronous ajax, dynamic-ness of JavaScript language
  • Future VMs will run JS faster, making “bigger”, more processing intensive apps possible within a browser
  • Traditionally web applications have most business logic running server side.
  • Testing for server-side web applications has matured over the past few years
  • AJAX applications have large amounts of code executing in the browser in JavaScript
  • This creates a growing need for testing at the browser level, but this area is still young and not as widely practiced

What do we gain?

  • Stable development – iterate without fear of breaking existing features
  • Easier refactoring – rewrite the guts of your app and be confident it continues to work
  • Speed – stop refreshing and clicking through your app to verify things are working, thats what computers are for
  • Automation – repeatable tests help you do the right thing every time, without having to think about it

Getting Started

  • What libraries and methodologies exist for JavaScript testing?
  • A simple example – a client-side form validation library and a suite of tests for verifying it works as expected

Going further

  • A complex example – integration testing, scripting user stories
  • Testing across multiple browsers
  • Incorporating JS tests into a larger development workflow with server-side tests
  • Continous integration – running tests automatically, every time you commit

Speaking experience

Speaker

  • Iceland bar

    Biography

    Scott is currently creating a new company, Olio Apps, with a focus on building interesting and useful apps that interact with mobile devices, social networks, and business platforms.

    Scott founded the Tampa Florida Ruby Brigade, and co-founded the Portland JavaScript Admirer’s group.

    Before moving to Portland Oregon, Scott toiled away in cold and rainy Florida. When not slinging code and cooking up new business ideas, he plays various instruments in rock bands, and travels the world.

    Sessions

      • Title: Agile JavaScript Testing
      • Track: Cooking
      • Room: St. Johns
      • Time: 11:20am12:05pm
      • Excerpt:

        With the recent surge in JavaScript popularity, and the advances in JavaScript virtual machines, serious applications can and are being built in JavaScript. As the sophistication of these apps grow, so grows the need for verifying that our code continues to work as we expect. We’ll briefly cover the advantages of test driven development, the reasons for pushing it all the way to the browser level, and then explore the options for testing JavaScript, look at some examples, and then integrate the tests into our existing development workflow.

      • Speakers: Scott Becker