Publisher: O'Reilly Media
Final Release Date: January 2013
Pages: 274
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
|
-
Chapter 1 Testable JavaScript -
Prior Art -
Code Is for People -
Beyond Application Code -
Recap -
Chapter 2 Complexity -
Code Size -
JSLint -
Cyclomatic Complexity -
Reuse -
Fan-Out -
Fan-In -
Coupling -
Coupling Metrics -
Coupling in the Real World -
Dependency Injection -
Comments -
The Human Test -
Recap -
Chapter 3 Event-Based Architectures -
The Benefits of Event-Based Programming -
The Event Hub -
Web-Based Applications -
Testing Event-Based Architectures -
Caveats to Event-Based Architectures -
A Smarter Hub: The Event Switch -
Recap -
Chapter 4 Unit Tests -
A Framework -
Let’s Get Clean -
Writing Good Tests -
Real-World Testing -
Running Tests: Client-Side JavaScript -
Running Tests: Server-Side JavaScript -
Recap -
Chapter 5 Code Coverage -
Coverage Basics -
Code Coverage Data -
A Hands-on Example -
Exercise/Deploy -
Persisting Coverage Information -
Generating Output -
Aggregation -
Hidden Files -
Coverage Goals -
Recap -
Chapter 6 Integration, Performance, and Load Testing -
Integration Testing -
Performance Testing -
Load Testing -
Tracking Resource Usage -
Recap -
Chapter 7 Debugging -
In-Browser Debugging -
Node.js Debugging -
Remote Debugging -
Mobile Debugging -
Production Debugging -
Recap -
Chapter 8 Automation -
What to Automate -
When to Automate -
How to Automate -
Recap -
Colophon |
- Title:
- Testable JavaScript
- By:
- Mark Ethan Trostler
- Publisher:
- O'Reilly Media
- Formats:
-
- Print
- Ebook
- Safari Books Online
- Print:
- January 2013
- Ebook:
- January 2013
- Pages:
- 274
- Print ISBN:
- 978-1-4493-2339-4
- | ISBN 10:
- 1-4493-2339-1
- Ebook ISBN:
- 978-1-4493-2353-0
- | ISBN 10:
- 1-4493-2353-7
|
-
Mark Ethan Trostler 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). View Mark Ethan Trostler's full profile page. |
|
Table of Contents
|
Product Details
|
About the Author
|
 |
|
 |
|
|
|
Recommended for You
|
Recently Viewed
|
 |
|
By Andy Oram, Greg Wilson
June 2007
Ebook
:
$35.99
Print & Ebook
:
$49.49
Print
:
$44.99
By Brian W. Fitzpatrick, Ben Collins-Sussman
July 2012
By Ido Green
May 2012
Ebook
:
$16.99
Print & Ebook
:
$21.99
Print
:
$19.99
|
Customer Reviews
7/18/2014 (1 of 2 customers found this review helpful) By Oystein from Oslo, Norway - Not comprehensive enough
- Too basic
8/5/2013 (2 of 2 customers found this review helpful) 3.0Practical introduction - Concise
- Easy to understand
- Helpful examples
4/11/2013 (2 of 2 customers found this review helpful) 4.0Fulfill the goal expected By produke from madrid, spain - Accurate
- Easy to understand
- Good Tips
- Helpful examples
3/23/2013 5.0Book worth recommendation By gziolo from Wroclaw, Poland - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
3/1/2013 (2 of 2 customers found this review helpful) - Accurate
- Concise
- Easy to understand
- Helpful examples
- Well-written
|
|
|