Testable JavaScript

Overview

One skill that’s essential for any professional JavaScript developer is the ability to write testable code. This book shows you what writing and maintaining testable JavaScript for the client- or server-side actually entails, whether you’re creating a new application or rewriting legacy code.

From methods to reduce code complexity to unit testing, code coverage, debugging, and automation, you’ll learn a holistic approach for writing JavaScript code that you and your colleagues ...

See more details below
Paperback
$25.89
BN.com price
(Save 26%)$34.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (20) from $1.99   
  • New (15) from $14.78   
  • Used (5) from $1.99   
Testable JavaScript

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$16.49
BN.com price
(Save 45%)$29.99 List Price

Overview

One skill that’s essential for any professional JavaScript developer is the ability to write testable code. This book shows you what writing and maintaining testable JavaScript for the client- or server-side actually entails, whether you’re creating a new application or rewriting legacy code.

From methods to reduce code complexity to unit testing, code coverage, debugging, and automation, you’ll learn a holistic approach for writing JavaScript code that you and your colleagues can easily fix and maintain going forward. Testing JavaScript code is complicated. This book helps experienced JavaScript developers simply the process considerably.

  • Get an overview of Agile, test-driven development, and behavior-driven development
  • Use patterns from static languages and standards-based JavaScript to reduce code complexity
  • Learn the advantages of event-based architectures, including modularity, loose coupling, and reusability
  • Explore tools for writing and running unit tests at the functional and application level
  • Generate code coverage to measure the scope and effectiveness of your tests
  • Conduct integration, performance, and load testing, using Selenium or CasperJS
  • Use tools for in-browser, Node.js, mobile, and production debugging
  • Understand what, when, and how to automate your development processes
Read More Show Less

Product Details

  • ISBN-13: 9781449323394
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 2/5/2013
  • Edition number: 1
  • Pages: 250
  • Sales rank: 1,452,551
  • Product dimensions: 9.00 (w) x 6.90 (h) x 0.70 (d)

Meet the Author

Mark Ethan Trostler has been writing and testing code for more than 20 years at startups (IPivot) and large corporations (Qualcomm, Intel, Redback Networks, Juniper Networks, Yahoo, and currently Google). Previously, as a Senior Principal Front End Engineer on the Yahoo! Mail team, he helped spearhead testing and quality for the latest rewrite of Yahoo! Mail. He's currently employed by Google as a Software Engineer in Test with the Ads team helping to ensure an excellent experience for their customers. He's spoken at several internal and external conferences (Yahoo TechPulse 2010 and 2011, Yahoo's Front End Summit, and at YUIConf 2011) about Testable Javascript and is the author of the Open Source Javascript Unit Test Environment (https://github.com/zzo/JUTE).

Read More Show Less

Table of Contents

Dedication;
Preface;
The Goal of This Book;
Who This Book Is For;
Who This Book Is Not For;
Who I Am;
What You Will Learn from This Book;
If You Like (or Don’t Like) This Book;
Recap;
How to Contact Us;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
Thanks!;
Chapter 1: Testable JavaScript;
1.1 Prior Art;
1.2 Code Is for People;
1.3 Beyond Application Code;
1.4 Recap;
Chapter 2: Complexity;
2.1 Code Size;
2.2 JSLint;
2.3 Cyclomatic Complexity;
2.4 Reuse;
2.5 Fan-Out;
2.6 Fan-In;
2.7 Coupling;
2.8 Coupling Metrics;
2.9 Coupling in the Real World;
2.10 Dependency Injection;
2.11 Comments;
2.12 The Human Test;
2.13 Recap;
Chapter 3: Event-Based Architectures;
3.1 The Benefits of Event-Based Programming;
3.2 The Event Hub;
3.3 Web-Based Applications;
3.4 Testing Event-Based Architectures;
3.5 Caveats to Event-Based Architectures;
3.6 A Smarter Hub: The Event Switch;
3.7 Recap;
Chapter 4: Unit Tests;
4.1 A Framework;
4.2 Let’s Get Clean;
4.3 Writing Good Tests;
4.4 Real-World Testing;
4.5 Running Tests: Client-Side JavaScript;
4.6 Running Tests: Server-Side JavaScript;
4.7 Recap;
Chapter 5: Code Coverage;
5.1 Coverage Basics;
5.2 Code Coverage Data;
5.3 A Hands-on Example;
5.4 Exercise/Deploy;
5.5 Persisting Coverage Information;
5.6 Generating Output;
5.7 Aggregation;
5.8 Hidden Files;
5.9 Coverage Goals;
5.10 Recap;
Chapter 6: Integration, Performance, and Load Testing;
6.1 Integration Testing;
6.2 Performance Testing;
6.3 Load Testing;
6.4 Tracking Resource Usage;
6.5 Recap;
Chapter 7: Debugging;
7.1 In-Browser Debugging;
7.2 Node.js Debugging;
7.3 Remote Debugging;
7.4 Mobile Debugging;
7.5 Production Debugging;
7.6 Recap;
Chapter 8: Automation;
8.1 What to Automate;
8.2 When to Automate;
8.3 How to Automate;
8.4 Recap;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)