Testing JavaScript
Upcoming SlideShare
Loading in...5
×
 

Testing JavaScript

on

  • 4,646 views

Slides from JS Meetup Presentation "Testing JavaScript".

Slides from JS Meetup Presentation "Testing JavaScript".

Statistics

Views

Total Views
4,646
Views on SlideShare
3,847
Embed Views
799

Actions

Likes
0
Downloads
56
Comments
0

9 Embeds 799

http://dhtmlkitchen.com 708
http://www.dhtmlkitchen.com 65
http://web.archive.org 11
http://www.gigablast.com 6
http://webcache.googleusercontent.com 4
http://192.168.6.179 2
http://203.208.35.101 1
http://www.hanrss.com 1
http://www.slideshare.net 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Testing JavaScript Testing JavaScript Presentation Transcript

  • Testing JavaScript XP Methodologies Garrett Smith Front End Engineer
  • What is Testing? • Testing verifies that the system does what its supposed to
  • Quality • Internal Quality - measured by the programmer • External Quality - measured by the customer
  • Types of Testing • Unit Testing • Acceptance Testing • Internal Quality - is it easy to maintain? How hard is it to make changes? • External Quality - does it do what it's supposed to?
  • Unit Testing • A "unit" can be an ADT, an Object, or a function
  • Costs of not Testing • Code debt • Can’t refactor safely
  • Benefits • Tests facilitate change • Good coverage ensures that all code paths work • Tests make the code easier to understand • Testability leads to cleaner code; microformats
  • Cost of Testing • Hard work and discipline • Requires hardcore team commitment
  • Freedom to Change Tests facilitate change OK
  • Fixing Bugs
  • Test Case • Set of independent tests • http://dhtmlkitchen.com/ape/test/tests/dom/ style-f-test.html • setUp, tearDown, template
  • Test Suite • APE JavaScript Library • http://dhtmlkitchen.com/ape/test/tests/ suite.html
  • Tools • JSUnit • YUI Test • JSCoverage
  • Further Reading • Agile Software Development: Principles, Patterns and Practices, Robert C. Martin • Architecture is a Second Order Effect, http://blog.objectmentor.com/ articles/2007/10/20/architecture-is-a-second-order-effect • Re: Simples Rules make creating Big Balls of Mud impossible. http:// coding.derkeiler.com/Archive/General/comp.object/2007-01/ msg00241.html • http://en.wikipedia.org/wiki/Code_coverage • http://www.objectmentor.com/omSolutions/agile_xp_differences.html • Extreme programming explained: Embrace Change By Kent Beck • Planning Extreme Programming, Beck, Fowler, Kohnke