Test-Driven JavaScript Development (Developer's Library) and over one million other books are available for Amazon Kindle. Learn more

Test-Driven JavaScript Development (Developer's Library) 1st Edition

21 customer reviews
ISBN-13: 978-0321683915
ISBN-10: 0321683919
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Sell yours for a Gift Card
We'll buy it for $6.10
Learn More
Trade in now
Have one to sell? Sell on Amazon
Rent
$21.59
Buy used
$32.95
Buy new
$40.64
Amazon Price New from Used from
Kindle
"Please retry"
Paperback, September 19, 2010
"Please retry"
$40.64
$34.53 $20.79
More Buying Choices
21 New from $34.53 22 Used from $20.79
Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


InterDesign Brand Store Awareness Rent Textbooks
$40.64 FREE Shipping. Only 17 left in stock (more on the way). Ships from and sold by Amazon.com. Gift-wrap available.

Frequently Bought Together

Test-Driven JavaScript Development (Developer's Library) + Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript (Effective Software Development Series) + JavaScript Patterns
Price for all three: $85.24

Buy the selected items together

Editorial Reviews

Review

“A simplified and well-explained book about one of the most underestimated parts of any application life-cycle. Christian Johansen brings real world examples, simple to advanced, and a useful library together in one place. I couldn’t expect more from Test-Driven JavaScript Development. Excellent learning and definitively easy to read.”

—Andrea Giammarchi, lead developer, NOKIA Gate 5 GmbH

 

“A great mix of theory and practical examples makes this a good read for both newcomers to JavaScript/TDD and seasoned JavaScripters wanting to add to their skill set.”

—Jacob Seidelin, freelance web developer, Nihilogic

From the Back Cover

"An essential reference for the social web, present and future...a must-have for making your website known on the social graph.

-- Joshua Gross, president, Cortex Creations, LLC

 

For JavaScript developers working on increasingly large and complex projects, effective automated testing is crucial to success.Test-Driven JavaScript Developmentisa complete, best-practice guide to agile JavaScript testing and quality assurance with the Test-Driven Development (TDD) methodology. Leading agile JavaScript developer Christian Johansen covers all aspects of applying state-of-the-art automated testing in JavaScript environments, walking readers through the entire development lifecycle, from project launch to application deployment, and beyond.

 

Using real-life examples driven by unit tests, Johansen shows how to use test-driven development (TDD) principles to gain greater confidence in your code base, so you can fearlessly refactor and build more robust, maintainable, and reliable JavaScript code at lower cost. Throughout, he addresses crucial issues ranging from code design to performance optimization, offering realistic solutions for developers, QA specialists, testers, and other software professionals.

 

Coverage includes

  • Understanding the concepts of automated tests, TDD, and unit testing
  • Building effective automated testing workflows
  • Choosing the right unit testing framework for your needs
  • Writing more modular and testable code
  • Testing code for both browsers and servers (using Node.js)
  • Using TDD to build cleaner APIs, better modularized code, and more robust software
  • Using test stubs and mocks to test units in isolation
  • Continuously improving code through refactoring
  • Walking through the construction and automated testing of fully functional software
  • Writing superior unit tests

 

About the Web Site

 

The accompanying Web site, tddjs.com, contains all of the book's code listings and additional resources.

 

NO_CONTENT_IN_FEATURE


Best Books of the Month
Best Books of the Month
Want to know our Editors' picks for the best books of the month? Browse Best Books of the Month, featuring our favorite new books in more than a dozen categories.

Product Details

  • Series: Developer's Library
  • Paperback: 600 pages
  • Publisher: Addison-Wesley Professional; 1 edition (September 19, 2010)
  • Language: English
  • ISBN-10: 0321683919
  • ISBN-13: 978-0321683915
  • Product Dimensions: 6.8 x 1.2 x 8.8 inches
  • Shipping Weight: 1.8 pounds (View shipping rates and policies)
  • Average Customer Review: 4.1 out of 5 stars  See all reviews (21 customer reviews)
  • Amazon Best Sellers Rank: #742,512 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

Customer Reviews

Most Helpful Customer Reviews

15 of 16 people found the following review helpful By P. Hodgson on March 9, 2011
Format: Paperback
I initially picked this up hoping to learn some stuff about the mechanics of unit-testing in javascript, and maybe some stuff about how to organize your javascript in a testable way. I was very pleasantly surprised to find a book which covers way more.

You'll learn about the fundamentals of modern functional javascript. You'll discover that it's not class-based OO and that functions, closures and object literals are your building blocks.

You'll see some neat, slightly mind-bending way of implementing things. A tiny example - why not keep track of whether a stub function has been called by just setting a bool on the stub function itself!

Most of all, you'll see that it's very feasible to develop real grown-up software using a true test-driven-DESIGN approach using javascript. You'll also get the benefit of being walked through a load of deep, hands-on practical examples covering both server-side JS, client-side DOM-based JS. This material can be pretty dense; I expect to re-read most of the book again at some point.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
9 of 9 people found the following review helpful By Magnar Sveen on May 13, 2011
Format: Paperback Verified Purchase
Let's be frank: Even if you're not that into test-driven development, this is the book you want.

In this book, Christian displays stunning prowess with the JavaScript language, and he's more than willing to share. You'll learn the intricacies of the language, see best practices for working with the dom, code reuse and object oriented design, functional programming, server-side scripting, and everything done in a test driven fashion.

If you're new to the language, this is the best way to avoid all the outdated advice that plagues many of the other javascript-books. If you're a jQuery ninja, this is your chance to learn that JavaScript has a lot more to offer. And even if you're already a JavaScript expert, I guarantee you'll find a few new useful tricks either way.

And let's not forget: At the end, you'll definitely be into TDD too.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
11 of 12 people found the following review helpful By Jim McGaw on December 3, 2010
Format: Paperback
I'm a Django web developer, and like most of us, the unit test coverage for my projects ends where the client-side code begins. I found this book to be extremely useful in teaching how to create tests for JavaScript. The book uses JsTestDriver, which I had never heard of before the book, but is an amazing cross-browser test runner.

The book is written in three parts. The first is an overview of TDD, the second covers JavaScript as a programming language, and third talks about how to integrate JavaScript testing into a project. The first part is short, and the third is, naturally, the meat of the book. The second part, which introduces JavaScript, seems superfluous given the intended audience. It's a good refresher, but the third part builds upon the second one, so part two can't be skipped. It would have been great if the second and third parts would have been more decoupled.

Besides that, is there any web developer that wouldn't benefit from learning how to treat JavaScript as a real soup-to-nuts programming language?
2 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
16 of 19 people found the following review helpful By George Jempty on November 25, 2010
Format: Paperback
Unlike the first reviewer I've actually begun reading this book. Based on the first 2.5 chapters I can tell you without reservation that this author is quite knowledgeable about both Javascript and Test-driven development (TDD). Not only is the book technically excellent in this regard, but the author is also not afraid to state his opinion and challenge conventional wisdom, for instance when addressing the oft-misunderstood issue of temporarily hard-coding data to make tests pass. Furthermore, if you have comments or questions about the book in other online forums such as a blog, the author is very quick to respond. Addendum: having pretty much completed the entire book I will add, there is much excellent introductory material regarding Ecmascript 5 included.
1 Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
3 of 3 people found the following review helpful By Larry Battle on August 27, 2011
Format: Paperback Verified Purchase
I bought this book to get a deeper understanding of Javascript and to figure out what TDD (Test Driven Development) was. After finishing this book in 2 weeks, I feel that my goals have been accomplished.

Christian Johansen did a excellent job writing Test Driven Javascript Development.
The overall structure is well organized, the code is easy to read with concise explanations and examples are plentiful.

The first part of the book gives you a general overview of TDD and unit testing and code quality tools.
Afterwards, you move on to learning about the basic, advance and future elements of Javascript. Example topics include function creation, binding, different ways to perform inheritance, closure, and ECMAScript 5.

Lastly, the rest of the book is dedicated towards getting you into the mindset of a TDD developer by building small web applications with the author. This means that each section go like this.

Write a test case.
Watch it fail.
Program it to pass.
Re-factor.

I found it amazing what you can do with the Assert, Stub, Mock and Spy functions.

One thing that I've been noticing is that writing test cases takes a LONG time when you first start out as beginner.
Also, I found it hard to avoid testing implementation rather than states and behaviors. But I guess making good test cases comes with experience.

One problem that I faced was that jsTestDriver (the preferred unit testing framework through the book) doesn't work well with jQuery plug-ins. So I ditched it and went with SINON.JS + QUNIT.js. Ever since then I haven't had any problems writing and testing test cases.

I highly recommend this book for anyone curious about Test Driven Development, Unit Testing or wishing to better understand and improve their Javascript.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Most Recent Customer Reviews

Set up an Amazon Giveaway

Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more
Test-Driven JavaScript Development (Developer's Library)
This item: Test-Driven JavaScript Development (Developer's Library)
Price: $40.64
Ships from and sold by Amazon.com

Want to discover more products? Check out these pages to see more: software development, programming languages, software testing