Index

A note on the digital index

A link in an index entry is displayed as the section title in which that entry appears. Because some sections have multiple index markers, it is not unusual for an entry to have several links to the same section. Clicking on any link will take you directly to the place in the text in which the marker appears.

Symbols

!== operator, Cyclomatic Complexity
++ operator, JSLint
=== operator, Cyclomatic Complexity
— operator, JSLint

A

ab tool, Browser Load Testing
acceptance tests, code coverage goals, Coverage Goals
adb (Android Debug Bridge), Android 4
Adobe Creative Cloud website, Adobe Edge Inspect
Adobe Edge Inspect, Adobe Edge InspectAdobe Edge Inspect
afterEach function, Jasmine
Agile development, Agile Development
Android Debug Bridge (adb), Android 4
Android devices
debugging on, Android 4
Selenium drivers on, Android
AngularJS framework, Dependency Injection
anonymous functions, Firefox
Apache Bench tool, Browser Load Testing
Apache Cordova project, Other Mobile Debugging Options
application-specific code, Reuse
assert functions, Selenium
asynchronous testing, Asynchronous Testing, Coverage Basics
automation
about, Content, Automation
for build environment, Automating the Build EnvironmentNon-UI usage
with continuous integration, Automating with Continuous Integration
for development environment, Automating the Development EnvironmentOther development tools
how to automate, How to Automate
what to automate, What to Automate
when to automate, When to Automate

B

bad fix probability, Cyclomatic Complexity
BDD (behavior-driven development), Behavior-Driven Development, A Framework
beforeEach function, Jasmine
braces, for loops and, JSLint
broadcast events, Broadcasting, A Smarter Hub: The Event Switch, Broadcast events
browsermob-proxy module, Using a proxyUsing a proxy
browsers
debugging in, In-Browser DebuggingInternet Explorer
load testing and, Browser Load TestingBrowser Load Testing
performance testing and, Browser Performance Testing
Selenium tests and, Selenium, WebDriver, Remote Control
tracking resource usage, Tracking Resource UsageProgrammatic CPU usage
build environment
about, Automating the Build Environment
build process, The build
complexity and, ComplexityComplexity
coverage output, Coverage outputCoverage output
dependent builds, Dependent builds
duplicate code, Duplicate code
Jenkins tool, JenkinsCreating a Jenkins project
JSLint and, JSLint
non-UI usage, Non-UI usage
notification action, Notification
other analysis, Other analysis
unit test output, Unit test output
unit testing using Selenium, Unit testing using SeleniumUnit testing using Selenium

C

CasperJS
about, CasperJSCasperJS
generating HAR files, Using a proxy
Charles tool, Using a proxy
Checkstyle format, Complexity
Chrome browser (see Google Chrome browser)
client/server model
client-side code coverage, Client-Side JavaScript
client-side resource usage tracking, Client-Side TrackingCPU usage
event handling in, Testing Event-Based Architectures
event hubs and, Using the Event Hub
running client-side tests, Running Tests: Client-Side JavaScriptAndroid
running server-side tests, Running Tests: Server-Side JavaScriptOutput
server-side code coverage, Server-Side JavaScriptServer-Side JavaScript
server-side resource usage tracking, Server-Side TrackingProgrammatic CPU usage
Cobertura tool, Coverage output
code coverage
about, Content, Code Coverage, Coverage BasicsCoverage Basics
aggregating, AggregationAggregation
anatomy of coveraged files, Anatomy of a Coveraged FileAnatomy of a Coveraged File
generating dummy test files, Code Coverage Data
generating metrics from integration tests, Code Coverage
generating output, Generating OutputGenerating Output
goals of, Coverage Goals
good unit tests and, Writing Good Tests, Code Coverage
hands-on example, A Hands-on ExampleAnatomy of a Coveraged File
hidden files and, Hidden FilesHidden Files
persisting coverage information, Persisting Coverage InformationIntegration Tests
strategies for deploying, Exercise/DeployServer-Side JavaScript
types of data for, Code Coverage Data
code reviews
about, Code reviews
informal, The Human TestThe Human Test
code size and complexity, Code SizeCode Size
CoffeeScript compiler, Chrome
command query separation, Code Size, Dependencies
commands
defined, Code Size
testing, Code Size, Mock objects
comments
about, Comments
defining functions for unit tests, Comment blocks
Docco, Docco/Rocco
duplicate-code-finding tools and, Duplicate code
JSDoc, JSDocJSDoc
Rocco, Docco/Rocco
YUIDoc, YUIDocYUIDoc
commit hooks, Commit hooksCommit hooks
common coupling
about, Common Coupling
testing, Testing Coupled Code
complexity
about, Content, Complexity
build environment and, ComplexityComplexity
code size and, Code SizeCode Size
comments and, CommentsDocco/Rocco
coupling and, CouplingTesting Coupled Code
cyclomatic, Cyclomatic ComplexityCyclomatic Complexity
dependency injection and, Dependency InjectionDependency Injection
fan-in and, Fan-In
fan-out and, Fan-OutFan-Out
formula for measuring, Fan-Out
informal code review process and, The Human TestThe Human Test
JSLint and, JSLintJSLint
reusing code and, ReuseReuse
console object
assert() method, Firefox, Internet Explorer
dir() method, Firefox
dirxml() method, Firefox
error() method, Internet Explorer
info() method, Internet Explorer
log() method, Internet Explorer, PhantomJS
profile() method, Firefox
profileEnd() method, Firefox
time() method, Firefox
timeEnd() method, Firefox
trace() method, Firefox
warn() method, Internet Explorer
content coupling
about, Content Coupling
testing, Testing Coupled Code
continuous integration, Automating with Continuous Integration
control coupling
about, Control Coupling
testing, Testing Coupled Code
coupling
about, Coupling
common, Common Coupling, Testing Coupled Code
content, Content Coupling, Testing Coupled Code
control, Control Coupling, Testing Coupled Code
data, Data Coupling, Testing Coupled Code
instantiating objects and, Instantiation
loose, Coupling in the Real WorldTesting Coupled Code
metrics based on, Coupling, Coupling Metrics
no, No Coupling, Testing Coupled Code
real-world examples, Coupling in the Real WorldTesting Coupled Code
stamp, Stamp Coupling, Testing Coupled Code
testing, Testing Coupled Code
tight, Coupling in the Real WorldTesting Coupled Code
CPU usage
client-side tracking, CPU usageCPU usage
server-side tracking, Programmatic CPU usage
Creative Cloud website, Adobe Edge Inspect
Crockford, Douglas, Who I Am, JSLint, JSLint
Crossfire extension (Firefox), Firefox
CSV files, Browser Load Testing
cyclomatic complexity, Cyclomatic ComplexityCyclomatic Complexity

D

data coupling
about, Data Coupling
testing, Testing Coupled Code
debugger; statement, Node.js Debugging
debugging
about, Content, Debugging
in-browser, In-Browser DebuggingInternet Explorer
mobile devices, Mobile DebuggingOther Mobile Debugging Options
Node.js and, Server-Side Tracking, Node.js DebuggingNode.js Debugging
production environment, Production DebuggingSource Maps
remote, Remote DebuggingFirefox
dependencies
code coverage and, Client-Side JavaScript
Jasmine test framework and, Dependencies
test doubles, Doubles
testing, DependenciesSpies
dependency injection, Dependency InjectionDependency Injection, The Benefits of Event-Based Programming
deployment considerations, Deployment
development environment
about, Automating the Development Environment
additional tools, Other development tools
code reviews, Code reviews
commit hooks, Commit hooksCommit hooks
editors for, The editor
running unit tests, Unit testsUnit tests
development methodologies
about, Testable JavaScriptPrior Art
Agile development and, Agile Development
behavior-driven development, Behavior-Driven Development, A Framework
debugging and, Debugging
how of software, HowHow understandable
intent of software and, Code Is for People
test-driven development, Test-Driven Development, Defining Your Functions
test-while-driven development, How testable
testing and, Testing
what of software, WhatWhat is understandable
why of software, WhyWhy understandable
diminishing returns law, Code Coverage
displayName property, Firefox, Safari
Docco, Docco/Rocco
domain-independent code, Reuse
domain-specific code, Reuse
dummy test files, Code Coverage Data, Hidden FilesHidden Files
dupfind tool, Duplicate codeDuplicate code
Duplicate Code Scanner plug-in, Duplicate code
duplicate-code-finding tools, Duplicate codeDuplicate code
dynaTrace tool, Browser Performance Testing, Firefox

E

E-Mail Notification action, Notification
ECMAScript, Code Size, Other analysis
edge cases, Coverage Basics
editors, The editor
eval statement, Chrome
event handling
broadcast events, Broadcasting, A Smarter Hub: The Event Switch
in client/server model, Testing Event-Based Architectures
methods and, The Event Hub
responses to thrown events, Responses to Thrown EventsResponses to Thrown Events
reusing code and, Reuse
unicast events, A Smarter Hub: The Event Switch
event hubs
about, The Event Hub
responses to thrown events, Responses to Thrown EventsResponses to Thrown Events
testing, Mock objects
usage considerations, Using the Event HubUsing the Event Hub, Scalability
event switches
about, A Smarter Hub: The Event Switch
deploying, DeploymentBroadcast events
extensibility, Extensibility
implementing, An ImplementationAn Implementation
session data and, Sessions
event-based architectures
about, Content
benefits of, The Benefits of Event-Based Programming
event hubs, The Event HubEvent-Based Architectures and Software as a Service
event switches, A Smarter Hub: The Event SwitchExtensibility
MVC approaches and, Event-Based Architectures and MVC Approaches
object-oriented programming and, Event-Based Architectures and Object-Oriented Programming
security considerations, Security
Software as a Service and, Event-Based Architectures and Software as a Service
testing, Testing Event-Based ArchitecturesTesting Event-Based Architectures
usage considerations, Caveats to Event-Based Architectures
web-based applications and, The Event Hub, Web-Based Applications
EventHub plug-in (jQuery), An Implementation

F

Fagan inspection process, The Human Test, Code reviews
fan-in
about, Fan-In
complexity measurement formula, Fan-Out
fan-out
about, Fan-OutFan-Out
complexity measurement formula, Fan-Out
Feathers, Michael, Preface
Fenton, Norman, Coupling
Fiddler tool, Using a proxy
find operation, Instrumenting Files
Firebug extension (Firefox), FirefoxFirefox
Firefox browser
debugging in, FirefoxFirefox
performance testing and, Browser Performance Testing
remote debugging and, Firefox
Selenium support, Selenium
fixmyjs tool, Other development tools
for loops
braces around, JSLint
declaring variables in, JSLint
foreach method, JSLint
frameworks
defined, Reuse
for unit tests, A Framework
function coverage, Code Coverage Data

G

garbage collection, Memory usage
genhtml command, Generating Output
getIterator function, Source Maps
getter functions, Code Size
Ghost Driver project, Selenium
global variables, Fan-Out, The Benefits of Event-Based Programming, Instrumenting Files
Gmail application, Memory usage
Google Chrome browser
Adobe Edge Inspect and, Adobe Edge InspectAdobe Edge Inspect
Chrome Canary, Programmatic heap snapshots
debugging in, In-Browser Debugging, ChromeChrome
performance testing and, Browser Performance Testing
remote debugging in, ChromeChrome
resource usage and, Tracking Resource Usage, Memory usage
Selenium support, WebDriver
source map support, Source Maps
Timeline tab, Chrome
Google Closure compiler, JSDoc, Source Maps, Creating a Jenkins project
Google GWT compiler, Source Maps
grid hub (Selenium), Grid

H

HAR files
about, Performance Testing
generating, Generating HAR FilesUsing a proxy
viewing, Viewing HAR FilesViewing HAR Files
HAR Viewer, Viewing HAR Files
heap snapshots, Memory usage, Programmatic heap snapshots
Henry, Sallie, Fan-Out
hidden files, Hidden FilesHidden Files
HTML
client-side testing and, Client-Side JavaScript
jscheckstyle support, Cyclomatic Complexity
HTTP Archive (HAR) files (see HAR files)
HTTP object, Coverage Basics
HTTP servers
coveraged files and, Exercise/Deploy
event hubs and, The Event Hub
event switches and, Deployment
web-based applications and, Web-Based Applications
Hudson tool
about, Unit Tests
automating build process, JenkinsCreating a Jenkins project
LCOV format and, Generating Output, Aggregation

I

instanceof operator, Dependency Injection
instantiating objects, Instantiation
instrumenting files, Instrumenting Files
Integrate Button website, Automating with Continuous Integration
integration testing
about, Content, Integration Testing
CasperJS and, CasperJSCasperJS
code coverage for, Code Coverage, Instrumenting Files, Client-Side JavaScript, Integration Tests, Coverage Goals
importance of, Integration, Performance, and Load Testing
Selenium and, SeleniumGrid
Internet Explorer browser
debugging in, In-Browser Debugging, Internet Explorer
performance testing and, Browser Performance Testing
iOS platform
debugging on, iOS 6
Selenium driver for, iOS
isolation in unit tests, Code Size, Isolation

J

JAR files
coverage example, A Hands-on Example
instrumenting files, Instrumenting Files
Selenium example, Selenium
Jasmine test framework
dependencies and, DependenciesDependencies
installing, Jasmine
output from, Output
test doubles and, Spies, SpiesSpies
JavaScript: The Good Parts (Crockford), JSLint
Jenkins tool
about, Unit Tests
automating build process, JenkinsCreating a Jenkins project
command-line control, Non-UI usage
creating Jenkins project, Creating a Jenkins projectCreating a Jenkins project
dashboard snapshot, The Full Monty
jscheckstyle and, Cyclomatic Complexity
JSLint and, JSLint
LCOV format and, Generating Output, Aggregation
notification action, Notification
unit test output, Unit test output
jQuery, An Implementation
jscheckstyle package, Cyclomatic Complexity, Commit hooks, ComplexityComplexity
Jsconsole.com, Other Mobile Debugging Options
JSDoc, JSDocJSDoc
JSDOCDIR enivronment variable, JSDoc
JSDOCTEMPLATEDIR enivronment variable, JSDoc
JSHint, JSLint
JSLint
about, JSLintJSLint
build environment and, JSLint
commit hooks and, Commit hooks
fixmyjs tool and, Other development tools
jsmeter tool, Comment blocks
JSON
jscheckstyle support, Cyclomatic Complexity
remote debugging of, Safari
YSlow output, Viewing HAR Files
YUI support, Unit Tests
JUTE tool
Jenkins tool and, Creating a Jenkins project
test output and, Unit test output
unit testing and, Unit testsUnit tests

K

Kafura, Dennis, Fan-Out
knit injector, Dependency Injection

L

law of diminishing returns, Code Coverage
lcov command, Aggregation, Coverage output
LCOV format, Generating Output, Aggregation, Unit tests
legacy code, Preface
Lighthouse Qt framework, CasperJS
line coverage, Code Coverage Data
load testing
about, Load TestingLoad Testing
browsers and, Browser Load TestingBrowser Load Testing
lookup tables, Cyclomatic Complexity
Loop class
getCPU function, Browser Load Testing
getMemory function, Browser Load Testing
getProc function, Browser Load Testing
loose coupling, Coupling in the Real WorldTesting Coupled Code

M

make command, Creating a Jenkins project
mappings property, Source Maps
mark-and-sweep technique, Memory usage
McCabe, Thomas J., Cyclomatic Complexity
measuring complexity, Fan-Out
memory leaks
JavaScript and, Tracking Resource Usage
symptoms of, Memory usage, Chrome
memory usage
about, Tracking Resource Usage
client-side tracking, Memory usageMemory usage
methods, event handling and, The Event Hub
Miller’s Law, Cyclomatic Complexity, Fan-Out
mobile devices
debugging on, Mobile DebuggingOther Mobile Debugging Options
Selenium drivers on, Mobile
mocks
dependency injection and, Dependency Injection
test doubles and, Doubles, Spies
testing commands with, Code Size, Mock objects
Model class, Event-Based Architectures and MVC Approaches
Module_load method, Server-Side JavaScript
mod_rewrite module, Client-Side JavaScript
MVC (Model-View-Controller) approaches, Event-Based Architectures and MVC Approaches

N

negative testing, Negative Testing
next command, Node.js Debugging
nl.js utility, Browser Load Testing
no coupling
about, No Coupling
testing, Testing Coupled Code
Node Package Manager tool (see npm tool)
Node.js, Reuse
(see also npm module)
command query separation example, Code Size
current stock prices of given symbols, Coverage Basics
debugging support, Server-Side Tracking, Node.js DebuggingNode.js Debugging
events and event callbacks, Reuse
http module, Coverage Basics
Module_load method, Server-Side JavaScript
nodeload tool, Browser Load TestingBrowser Load Testing
running YSlow, Viewing HAR Files
USR2 signal and, Server-Side Tracking, Programmatic heap snapshots
nodeload tool, Browser Load TestingBrowser Load Testing
notification action”, Notification
npm tool
about, Reuse
browsermob-proxy module, Using a proxyUsing a proxy
soda module, Remote Control
webdriverjs module and, Selenium, WebDriverWebDriver, Using a proxy, Chrome
webkit-devtools-agent package, Server-Side Tracking
nprof tool, Programmatic CPU usage

O

Object class
about, Code Size
create method, Instantiation
preventExtensions property, Code Size
object-oriented programming, Event-Based Architectures and Object-Oriented Programming
objects
dependency injection, Dependency InjectionDependency Injection
instantiating, Instantiation
test spies and, Spies
operators, pointer arithmetic, JSLint
out command, Node.js Debugging

P

pair programming, Agile Development
parallel processing, Grid
PATH environment variable, A Hands-on Example, WebDriver
PCAP format, Generating HAR Files
pcap2har tool, Generating HAR Files
performance testing
about, Content, Performance Testing, Load Testing
browsers and, Browser Performance Testing
code coverage for, Coverage Goals
generating HAR files, Generating HAR FilesUsing a proxy
proxy method for, Using a proxyUsing a proxy
viewing HAR files, Viewing HAR FilesViewing HAR Files
Pfleeger, Lawrence, Coupling
PhantomJS
about, PhantomJSPhantomJS
CasperJS and, CasperJS
debugging in, Node.js Debugging
evaluate method, PhantomJS
generating HAR files, Using a proxy
JUTE tool and, Unit tests
remote debugging and, PhantomJSPhantomJS
PhoneGap framework, Other Mobile Debugging Options
PMD tool, Other analysis
pointer arithmetic operators, JSLint
positive testing, Positive Testing
post-review script, Code reviews
Poulin, Jeffrey, Reuse
production debugging
about, Production Debugging
minified code, Minified Code
source maps, Source MapsSource Maps
proxy method for performance texting, Using a proxyUsing a proxy
Pygments web service, Docco/Rocco

Q

queries
defined, Code Size
testing, Code Size

R

RBTools package, Code reviews
readability of code
comments and, CommentsDocco/Rocco
importance of, JSLint
refactoring bad code
cyclomatic complexity and, Cyclomatic Complexity
importance of, JSLint
inadequate refinement and, Fan-Out
Remote Control (Selenium), Remote Control
remote debugging, Remote DebuggingFirefox
repl command, Node.js Debugging
require function
dependencies and, Dependencies
server-side example, Server-Side JavaScript, Programmatic heap snapshots
resource usage
client-side tracking, Client-Side TrackingCPU usage
server-side tracking, Server-Side TrackingProgrammatic CPU usage
tracking overview, Tracking Resource Usage
reusing code, ReuseReuse
Review Board application, Code reviews
Rocco, Docco/Rocco
rollback considerations, Deployment
runtime checking, Runtime Checking

S

SaaS (Software as a Service), Event-Based Architectures and Software as a Service
Safari browser
debugging in, SafariSafari
Selenium tests and, Remote Control
scope of unit tests, Scope
security considerations, event-based architectures, Security
Selenium
about, SeleniumSelenium
client-side testing, SeleniumAndroid
deploying coveraged code for testing, Client-Side JavaScript
grid configuration and, Grid
integration testing and, Integration Tests, SeleniumGrid
soda module and, Remote Control
unit testing and, Unit testing using SeleniumUnit testing using Selenium
webdriverjs module and, Selenium, WebDriverWebDriver, Using a proxy, Chrome
setInterval funciton, Spies
setter functions, Code Size
setTimer function, Spies
setUp function, A Framework, Jasmine
Showslow tool, Viewing HAR Files
socket.io library, Web-Based Applications, Security, An Implementation
soda module, Remote Control
Software as a Service (SaaS), Event-Based Architectures and Software as a Service
Software Metrics (Fenton and Pfleeger), Coupling
source maps, Source MapsSource Maps
Speed Tracer tool, Browser Performance Testing, Firefox
spies
about, Doubles, Spies
Jasmine example, SpiesSpies
stamp coupling
about, Stamp Coupling
testing, Testing Coupled Code
state, defined, State
statistics generators, Browser Load Testing
step command, Node.js Debugging
stock prices of given symbols example, Coverage Basics
stubs
for HTTP object, Coverage Basics
test doubles and, Doubles, Spies
testing queries with, Code Size
testing with, Stubs

T

TAP format, Unit Tests
tcpdump tool, Generating HAR Files
TDD (test-driven development), Test-Driven Development, Defining Your Functions
tearDown function
about, Using the Event Hub, A Framework
Jasmine and, Jasmine
Selenium and, Client-Side JavaScript, Integration Tests
test doubles
about, Doubles, Spies
Jasmine example, SpiesSpies
test-driven development (TDD), Test-Driven Development, Defining Your Functions
test-while-driven development (TWDD), How testable
testable JavaScript
about, ContentContent, Testable JavaScriptPrior Art
Agile development and, Agile Development
behavior-driven development, Behavior-Driven Development, A Framework
debugging and, Debugging
how of software, HowHow understandable
intent of software and, Code Is for People
test-driven development, Test-Driven Development, Defining Your Functions
test-while-driven development, How testable
testing and, Testing
what of software, WhatWhat is understandable
why of software, WhyWhy understandable
testing, Code Size
(see also specific types of testing)
asynchronous, Asynchronous Testing, Coverage Basics
command, Mock objects
commands, Code Size
coupled code, Testing Coupled Code
dependencies, DependenciesSpies
event hubs, Mock objects
event-based architectures, Testing Event-Based ArchitecturesTesting Event-Based Architectures
integer addition, Jasmine
negative, Negative Testing
positive, Positive Testing
queries, Code Size
tight coupling, Coupling in the Real WorldTesting Coupled Code
toEqual function, Jasmine
top utility, Memory usage
tracking resource usage
about, Tracking Resource Usage
client-side tracking, Client-Side TrackingCPU usage
server-side tracking, Server-Side TrackingProgrammatic CPU usage
TWDD (test-while-driven development), How testable

V

variables
declaring in for loops, JSLint
global, Fan-Out, The Benefits of Event-Based Programming, Instrumenting Files
verify functions, Selenium
viewing HAR files, Viewing HAR FilesViewing HAR Files

W

walkthrough process, The Human Test
WAR files, Jenkins
waterfall model
about, Agile Development
HAR files, Using a proxy, Viewing HAR Files
web-based applications
about, Web-Based Applications
event hubs and, The Event Hub
integration testing, Integration Testing
webdriverjs module
about, Selenium, WebDriverWebDriver
HAR files and, Using a proxy, Using a proxy
remote debugging and, Chrome
WebKit Developer Tools
about, Client-Side Tracking
Heap Snapshot tab, Server-Side Tracking
Profiles tab, Memory usage, Server-Side Tracking
webkit-devtools-agent package, Server-Side Tracking
weinre debugger, Other Mobile Debugging Options
whitespace, JSLint, Duplicate code
window.console object, Firefox
Working Effectively with Legacy Code (Feathers), Preface
writing unit tests
about, Let’s Get CleanLet’s Get Clean
factors of good tests, Writing Good TestsCode Coverage

X

XML format
Cobertura and, Coverage output
JSLint and, JSLint
YSlow and, Viewing HAR Files
YUI and, Unit Tests
XMLHttpRequest class, Using the Event Hub

Y

YSlow tool, Viewing HAR Files
YUI Compressor, Creating a Jenkins project
YUI Event Hub module, Using the Event Hub
YUI Library channel, Who I Am
YUI Test framework
about, Using the Event Hub, A Framework
asynchronous testing and, Using YUI Test, Coverage Basics
code coverage tools, A Hands-on ExampleAnatomy of a Coveraged File, Unit Tests
Jasmine equivalents, Jasmine
JUTE tool and, Unit tests
YUIDoc, YUIDocYUIDoc