Presentation is loading. Please wait.

Presentation is loading. Please wait.

JavaScript Unit Testing Hanoi PHP Day

Similar presentations


Presentation on theme: "JavaScript Unit Testing Hanoi PHP Day"— Presentation transcript:

1 JavaScript Unit Testing Hanoi PHP Day 2010 @hoatle

2 2 JavaScript Unit Testing Framework Presenter: Hoat Le Van (aka hoatle) » eXo Social Team Leader » Hanoi PHP Day:  2008: attendee  2009: Advanced JavaScript Techniques  2010: JavaScript Unit Testing Framework » Work mostly with Java but have much interest in JavaScript » Twitter: @hoatle

3 3 Agenda » JavaScript » Unit Testing » JavaScript Unit Testing Frameworks » Fun time for coding

4 JavaScript

5 5 What is JavaScript? » An implementation of the ECMAScript language standard » The King of client-side scripting for web » A prototype-based object-oriented scripting language » “The world's most misunderstood programming language” (Douglas Crockford)  The Name  Bad books  Amateurs  Object Oriented?

6 Unit Testing

7 7 What is Unit Testing? » Units of source code are tested » Written and run by developers to ensure that code meets its design and behaves as intended and expected » Commonly automated » Extreme Programming uses the creation of unit tests for test-driven development

8 8 Samples (Java - JUnit)

9 9

10 10 Samples (JavaScript - QUnit)

11 11 Samples (JavaScript - QUnit)

12 12 Test Driven Development (TDD) » Writes a failing automated test case that defines a desired improvement or new function » Implements code to pass that test » Finally refactors

13 13 Test Driven Development (TDD) (wikipedia)

14 14 Unit Testing Benefits » To isolate each part of the program and show that the individual parts are correct » Facilitates change » Documentation » Design

15 JavaScript Unit Testing Frameworks

16 16 JavaScript Unit Testing Frameworks

17 Fun time for JavaScript Unit Testing and Q&A?


Download ppt "JavaScript Unit Testing Hanoi PHP Day"

Similar presentations


Ads by Google