Index
A
- addBeverageForm function / Building a page object that interacts with the DOM
- addMockModule method / Using the Protractor API
- advanced scenarios
- writing / Writing advanced scenarios
- advanced setup, Gherkin
- about / Advanced setup
- Gherkin-driven example factory / Gherkin-driven example factory
- implicit setup, versus explicit setup / Implicit versus explicit setup
- Background section / The Background section
- afterEach function
- about / Organizing your setup
- After hook / The after hook
- alert() method / Working with several tabs and frames
- all(locator) method / Using the Protractor API
- allScriptsTimeout option / Other useful configuration options
- And keyword / Writing your first scenario in Gherkin
- AngularJS
- API modeling
- best practices / Best practices for page objects
- API response
- testing, with 200 Ok / Testing whether the API responds with 200 Ok
- API response, with 200 Ok
- empty object, using / Should we use a realistic order object?
- test, implementing / Implementing the test
- Around hook / The around hook
- assertions
- assert style
- asynchronous features
- testing / Testing asynchronous features
- callback-based API, testing / Testing a callback-based API
- promise-based API, testing / Testing a promise-based API
B
- Background section / The Background section
- BDD
- versus TDD / BDD versus TDD, TDD versus BDD
- about / Is it traditional TDD or BDD?, A roadmap to BDD
- rules / TDD versus BDD
- versus integration testing / BDD versus integration testing
- properties / BDD versus integration testing
- used, for testing problem domains / BDD is for testing problem domains
- BDD approach
- about / Concluding the book
- before function
- about / Organizing your setup
- Before hook / The before hook
- Broccoli
- URL / Welcome Protractor!
- browserify
- used, for packing code / Using browserify to pack our code
- browsers
- testing, with WebDriver / Testing in several browsers with WebDriver
- business layer, HAL resource
- But keyword / Writing your first scenario in Gherkin
- by.binding / Using the Protractor API
- by.exactBinding / Using the Protractor API
- by.model / Using the Protractor API
- by.repeater / Using the Protractor API
C
- $$(cssSelector) function / Using the Protractor API
- $(cssSelector) function / Using the Protractor API
- callback-based API
- testing / Testing a callback-based API
- capabilities option
- about / Welcome Protractor!
- Chai
- assertion style, using / More expressive assertions with Chai
- should interface, using / Working with the "should" interface
- and Sinon, integrating / Integrating Sinon and Chai
- chai-as-promised package
- about / Chai-as-Promised
- chains
- chromeDriver option / Other useful configuration options
- clear() method / Finding and interacting with elements
- clearMockModules method / Using the Protractor API
- click() method / Finding and interacting with elements
- code
- cleaning / Clean the code
- running, in several browsers / Running in several browsers
- command control flows / Command control flows
- Command Line Interface (CLI) / Useful options in Mocha
- complex UI interaction
- defining / Complex UI interaction
- configuration options, Protractor
- sauceUser option / Other useful configuration options
- sauceKey option / Other useful configuration options
- sauceSeleniumAddress option / Other useful configuration options
- firefoxPath option / Other useful configuration options
- chromeDriver option / Other useful configuration options
- port option / Other useful configuration options
- specs option / Other useful configuration options
- exclude option / Other useful configuration options
- jasmineOpts option / Other useful configuration options
- mochaOpts option / Other useful configuration options
- cucumberOpts option / Other useful configuration options
- getPageTimeout option / Other useful configuration options
- allScriptsTimeout option / Other useful configuration options
- Continuous Integration (CI) / Node and NPM as development platforms, Introducing Mocha
- cross-cutting scenarios
- extracting / Extracting cross-cutting scenarios
- CucumberJS
- about / Getting started with Gherkin and Cucumber.js
- World object pattern / The World object pattern
- step handler / Better step handlers
- error reporting / Better reporting
- features / Useful Cucumber.js features
- features, tagging / Tagging features and scenarios
- scenarios, tagging / Tagging features and scenarios
- hooks / Hooks
- non-English Gherkin / Non-English Gherkin
- using / Cucumber.js or Mocha?, Mocha or Cucumber.js?
D
- DAO
- implementing / Finishing our feature
- treating, as collection / Treating the DAO as a collection
- dataTable method / Consolidating steps
- DB
- accessing / Accessing the DB directly
- DOM, reading
- page object, building for / Building a page object that reads the DOM
- DOM interaction
- page object, building with / Building a page object that interacts with the DOM
E
- ECMAScript 5 (ES5) / Testing with PhantomJS
- element(locator) method / Using the Protractor API
- embedded resources
- testing / Testing embedded resources
- empty object
- enabled property / Testing whether our view updates the HTML
- end-to-end testing / Our strategy for UI testing
- error reporting / Better reporting
- ES5-Shim
- URL / Testing with PhantomJS
- evaluate(expression) function / Using the Protractor API
- example factory pattern
- about / The example factory pattern
- scenario, finishing / Finishing the scenario
- examples
- about / Red/Green/Refactor
- exclude option / Other useful configuration options
- explicit setup
- versus implicit setup / Implicit versus explicit setup
F
- failing test
- writing / Write a failing test, Repeat!
- fakes, test doubles / Test doubles
- feature, parameterized scenarios
- finishing / Finishing the feature
- features
- adding / Homework!
- features, CucumberJS
- tagging / Tagging features and scenarios
- fields array / Testing whether our view updates the HTML
- findElement(locator) method / Finding and interacting with elements
- findElements(locator) method / Finding and interacting with elements
- findElements method / Finding and interacting with elements
- firefoxPath option / Other useful configuration options
- flags
- flags, Chai
- frame(nameOrIndex) method / Working with several tabs and frames
- framework option
- about / Welcome Protractor!
G
- getAttribute(name) method / Finding and interacting with elements
- getCssValue(cssPropertyName) method / Finding and interacting with elements
- getId() method / Finding and interacting with elements
- getInnerHtml() method / Finding and interacting with elements
- getLocation() method / Finding and interacting with elements
- getLocationAbsoluteUrl() method / Using the Protractor API
- GET order feature
- testing / Testing the GET order feature
- exploring / Exploring our feature a bit
- server, starting / Starting, stopping, and setting up our server
- server, stopping / Starting, stopping, and setting up our server
- server, setting up / Starting, stopping, and setting up our server
- API response, testing with 200 Ok / Testing whether the API responds with 200 Ok
- HAL resource, testing for orders / Testing our HAL resource for orders
- getOuterHtml() method / Finding and interacting with elements
- getPageTimeout option / Other useful configuration options
- getTagName() method / Finding and interacting with elements
- getText() method / Finding and interacting with elements
- getWebElement() method / Using the Protractor API
- Gherkin
- about / Getting started with Gherkin and Cucumber.js
- project, preparing / Preparing your project
- first scenario, writing / Writing your first scenario in Gherkin
- executing / Executing Gherkin
- example tables / Gherkin example tables
- empty order scenario, steps / Consolidating steps
- Gherkin-driven example factory / Gherkin-driven example factory
- GhostDriver
- URL / Testing with PhantomJS
- Given keyword / Writing your first scenario in Gherkin
- goTo function / A page object for a rich UI
- Grunt
- GruntJS
- URL / Welcome Protractor!
- Gulp
- GulpJS
- URL / Welcome Protractor!
H
- HAL
- about / The approach
- URL / The approach
- HAL resource
- testing, for orders / Testing our HAL resource for orders
- business layer, using / The contract with the business layer
- scenario, finishing / Finishing the scenario
- handler function
- about / Executing Gherkin
- hooks
- about / Hooks
- Before hook / The before hook
- After hook / The after hook
- Around hook / The around hook
- HTML page
- serving / Serving the HTML page and scripts
- HTML scripts
- serving / Serving the HTML page and scripts
I
- implicit setup
- versus explicit setup / Implicit versus explicit setup
- integrated test
- about / A strategy to test web APIs
- integration testing
- versus BDD / BDD versus integration testing
- Internet application
- testing / Testing a rich Internet application
- setup / The setup
- view, testing for HTML update / Testing whether our view updates the HTML
- view reaction, testing to user / Testing whether our view reacts with the user
- UI control logic / What about our UI control logic?
- isDisplayed() method / Finding and interacting with elements
- isElementPresent(locator) method / Finding and interacting with elements
- isEnabled() method / Finding and interacting with elements
- isMarkedAsError method / Building a page object that interacts with the DOM
- isolation tests
- about / BDD versus integration testing
- isSelected() method / Finding and interacting with elements
K
- Knockout
M
- method field / Testing whether our view updates the HTML
- Mocha
- about / Introducing Mocha
- options / Useful options in Mocha
- URL / Useful options in Mocha
- test-first cycle / Our first test-first cycle
- and promises / Mocha and promises
- using / Cucumber.js or Mocha?, Mocha or Cucumber.js?
- Mocha, options
- -R / Useful options in Mocha
- --reporter / Useful options in Mocha
- -b / Useful options in Mocha
- --bail option / Useful options in Mocha
- -w / Useful options in Mocha
- --watch option / Useful options in Mocha
- mochaOpts option
- about / Welcome Protractor!
- mocks, test doubles / Test doubles
- MongoDB
- multicapabilities option
- about / Welcome Protractor!
- myCafé
- about / Introducing myCafé
N
- navigation
- testing / Testing the navigation
- Node / Node and NPM as development platforms
- installing / Installing Node and NPM
- URL / Installing Node and NPM
- Nodebrew
- URL / Installing Node and NPM
- Node Version Manager (NVM)
- about / Installing Node and NPM
- URL / Installing Node and NPM
- non-English Gherkin / Non-English Gherkin
- NPM
- about / Node and NPM as development platforms
- installing / Installing Node and NPM
- project, configuring with / Configuring your project with NPM
- npm install command / Configuring your project with NPM
O
- 200 Ok
- API response, testing with / Testing whether the API responds with 200 Ok
- onPrepare option
- about / Welcome Protractor!
- order actions / The order actions
- ordering page, myCafé
- features, writing / Writing features
- order, displaying / Displaying a customer's order
- tips, for writing features / Tips for writing features
- scenarios, coding / Starting to code the scenarios
- orders
- HAL resource, testing for / Testing our HAL resource for orders
P
- package.json
- page object
- used, for UI / A page object for a rich UI
- building, for reading DOM / Building a page object that reads the DOM
- building, for interacting with DOM / Building a page object that interacts with the DOM
- navigation, testing / Testing the navigation
- Page Object pattern
- page objects
- best practices / Best practices for page objects
- parameterized scenarios / Parameterized scenarios
- about / Parameterized scenarios
- feature, finishing / Finishing the feature
- parameterized tests
- using / Parameterized tests
- perform method / Complex UI interaction
- PhantomJS
- URL / Testing with PhantomJS
- phases, test
- Set up/Arrange / The structure of a test
- act / The structure of a test
- assert / The structure of a test
- port option / Other useful configuration options
- problem domains
- testing, BDD used / BDD is for testing problem domains
- project
- configuring, with NPM / Configuring your project with NPM
- promise
- about / Interlude – promises 101
- promise, states
- fulfilled / Interlude – promises 101
- rejected / Interlude – promises 101
- pending / Interlude – promises 101
- promise-based API
- testing / Testing a promise-based API
- promise / Interlude – promises 101
- promises
- URL / Interlude – promises 101
- and Mocha / Mocha and promises
- test doubles, used with / Test doubles with promises
- properties, test
- requisites / What is a good test?
- Protractor
- about / Welcome Protractor!
- tests, running in parallel / Running the tests in parallel
- configuration options / Other useful configuration options
- Protractor API
- using / Using the Protractor API
- protractor module
- about / Welcome Protractor!
- webdriver-manager / Welcome Protractor!
- protractor / Welcome Protractor!
Q
- Q framework
- URL / Interlude – promises 101
R
- record and replay pattern / The record-and-replay testing pattern
- record and replay tools / Our strategy for UI testing
- Red/Green/Refactor
- about / Red/Green/Refactor
- parameterized tests, using / Parameterized tests
- setup, organizing / Organizing your setup
- test scenarios, defining / Defining test scenarios
- redirectTo method / Testing the navigation
- regression test suite
- about / The test-first approach
- relational database / Accessing the DB directly
- removeMockModules method / Using the Protractor API
- replay package
- request module
- URL / Implementing the test
S
- sauceKey option / Other useful configuration options
- Sauce Labs
- sauceSeleniumAddress option / Other useful configuration options
- sauceUser option / Other useful configuration options
- scenario
- about / Defining test scenarios
- scenario, HAL resource
- finishing / Finishing the scenario
- scenarios, CucumberJS
- tagging / Tagging features and scenarios
- screenshots
- taking / Taking screenshots
- scripts
- injecting / Injecting scripts
- loading / The test HTML page
- Selenium 2.0
- about / WebDriverJS
- seleniumAddress option
- about / Welcome Protractor!
- Selenium Server
- about / The Selenium Server
- URL / The Selenium Server
- sendKeys(text or key, ) method / Finding and interacting with elements
- setLocation(url) method / Using the Protractor API
- setup
- organizing / Organizing your setup
- setup, Internet application
- about / The setup
- test HTML page / The test HTML page
- HTML page, serving / Serving the HTML page and scripts
- HTML scripts, serving / Serving the HTML page and scripts
- browserify, used for packing code / Using browserify to pack our code
- WebDriver session, creating / Creating a WebDriver session
- shown property / Testing whether our view updates the HTML
- Sinon
- test doubles, used with / Test doubles with Sinon
- using / Welcome Sinon!
- URL / Welcome Sinon!
- and Chai, integrating / Integrating Sinon and Chai
- slave resources
- testing / Testing slave resources
- order actions / The order actions
- embedded resources, testing / Testing embedded resources
- cross-cutting scenarios, extracting / Extracting cross-cutting scenarios
- features, adding / Homework!
- specs option
- about / Welcome Protractor!
- spies, test doubles / Test doubles
- step handler / Better step handlers
- storage object pattern / The storage object pattern
- stubs, test doubles / Test doubles
- submit() method / Finding and interacting with elements
T
- target field / Testing whether our view updates the HTML
- TDD
- versus BDD / BDD versus TDD, TDD versus BDD
- about / Is it traditional TDD or BDD?, TDD versus BDD
- test
- passing / Make the test pass
- implementing / Implementing the test
- creating, for UI / Choosing the right tests for the UI
- test-first approach
- about / The test-first approach
- test-first cycle / The test-first cycle
- test-first cycle
- about / The test-first cycle
- failing test, writing / Write a failing test
- test, passing / Make the test pass
- code, cleaning / Clean the code
- new failing test, writing / Repeat!
- consequences / Consequences of the test-first cycle
- test code
- organizing / Organizing our test code
- storage object pattern / The storage object pattern
- example factory pattern / The example factory pattern
- parameterized scenarios / Parameterized scenarios
- test doubles
- about / Test doubles
- fakes / Test doubles
- stubs / Test doubles, Test doubles with Sinon
- spies / Test doubles, Test doubles with Sinon
- mocks / Test doubles, Test doubles with Sinon
- with Sinon / Test doubles with Sinon
- with promises / Test doubles with promises
- creating / The plan
- writing / Writing good test doubles
- test HTML page / The test HTML page
- testing
- with PhantomJS / Testing with PhantomJS
- against external systems / Testing against external systems
- against database / Testing against a database
- against third-party system / Testing against a third-party system
- testing, against database
- DB, accessing directly / Accessing the DB directly
- DAO, treating as collection / Treating the DAO as a collection
- testing, against third-party system
- record and replay pattern / The record-and-replay testing pattern
- testing, with WebDriver
- Selenium Server / The Selenium Server
- testing architecture, UI / The testing architecture
- tests
- running, in parallel / Running the tests in parallel
- test scenarios
- defining / Defining test scenarios
- test structure
- about / The structure of a test
- test doubles / Test doubles
- Then keyword / Writing your first scenario in Gherkin
- this.GET(URI) method / Implementing the test
- Travis
- URL / Introducing Mocha
- triangulation
- about / Red/Green/Refactor
U
- --ui option / Useful options in Mocha
- -u option / Useful options in Mocha
- UI
- test, creating for / Choosing the right tests for the UI
- page object, used for / A page object for a rich UI
- UI control logic / What about our UI control logic?
- UI layer
- responsibilities / Choosing the right tests for the UI
- view / The testing architecture
- UI logic / The testing architecture
- UI logic component
- about / The testing architecture
- UI testing
- strategy / Our strategy for UI testing
- record and replay tools / Our strategy for UI testing
- end-to-end testing / Our strategy for UI testing
- test, creating for UI / Choosing the right tests for the UI
- testing architecture / The testing architecture
- unit testing
- defining / Exploring unit testing
V
- view
- testing, for HTML update / Testing whether our view updates the HTML
- reacting, to user / Testing whether our view reacts with the user
- view component
- about / The testing architecture
W
- waitForAngular() method / Using the Protractor API
- web API
- about / The approach
- URL / The approach
- testing / A strategy to test web APIs
- responsibilities / A strategy to test web APIs
- Mocha, using / Mocha or Cucumber.js?
- CucumberJS, using / Mocha or Cucumber.js?
- webdriver.ActionSequence object
- methods / Complex UI interaction
- sendKeys(keys...) / Complex UI interaction
- keyUp(key) / Complex UI interaction
- keyDown(key) / Complex UI interaction
- mouseMove(targetLocation, optionalOffset) / Complex UI interaction
- mouseDown() / Complex UI interaction
- click() / Complex UI interaction
- doubleClick() / Complex UI interaction
- mouseUp() / Complex UI interaction
- dragAndDrop(element, location) / Complex UI interaction
- webdriver.Key object / Finding and interacting with elements
- WebDriver API
- URL / WebDriverJS
- WebDriverIO
- URL / WebDriverJS
- WebDriverJS
- about / WebDriverJS
- URL / WebDriverJS
- used, for finding elements / Finding and interacting with elements
- used, for interacting with elements / Finding and interacting with elements
- complex UI interaction, defining / Complex UI interaction
- scripts, injecting / Injecting scripts
- command control flows / Command control flows
- screenshots, taking / Taking screenshots
- used, for controlling tabs / Working with several tabs and frames
- used, for controlling frames / Working with several tabs and frames
- WebDriver session
- creating / Creating a WebDriver session
- When keyword / Writing your first scenario in Gherkin
- window(windowName) method / Working with several tabs and frames
- window.onhashchange event
- URL / Testing the navigation
- World object pattern / The World object pattern
X
- XVFB
- URL / Testing with PhantomJS