Skip to content

Learning Behavior-driven Development with JavaScript


Packt Publishing

Summary

Price
£22.78 inc VAT
Study method
Online
Duration
Self-paced
Qualification
No formal qualification

Overview

Book Description

JavaScript is not only widely used to create attractive user interfaces for the Web, but with the advent of Node.js, it is also becoming a very popular and powerful language to write server-side applications. Using behavior-driven development and some common testing patterns and best practices, you will be able to avoid these traps.

This book will show you how to do BDD in a practical way. We will start with a basic introduction of what BDD is and why the classical approach to testing has failed. Afterwards, we will dive directly into an introduction to Node.js, Mocha, and Sinon.JS. Finally, we will cover more advanced subjects such as how to write a fast and effective test suite for a RESTful web API, and how to do the same with a rich UI using Cucumber.js and Protractor.

This book will give you great insight into how to architect your system to make it more testable and modular, but at the same time avoid the nightmare of abusing mock objects.

Description

What You Will Learn

  • Understand the basic concepts of BDD and how it is different from classic unit testing
  • Divide your system into different modules that can be tested separately, but at the same time not falling into the trap of unit testing
  • Use Mocha, Sinon.JS, and Chai to write expressive BDD features
  • Implement Cucumber.js to automate tests written in Gherkin so that your stakeholders can understand them
  • Discover how to test asynchronous systems, either based on callbacks or promises
  • Test a RESTful web API and a rich UI using WebDriverJS and Protractor
  • Refactor and keep your test code base maintainable using best practices and patterns such as PageObject

Questions and answers

Currently there are no Q&As for this course. Be the first to ask a question.

Reviews

Currently there are no reviews for this course. Be the first to leave a review.

FAQs

Interest free credit agreements provided by Zopa Bank Limited trading as DivideBuy are not regulated by the Financial Conduct Authority and do not fall under the jurisdiction of the Financial Ombudsman Service. Zopa Bank Limited trading as DivideBuy is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority, and entered on the Financial Services Register (800542). Zopa Bank Limited (10627575) is incorporated in England & Wales and has its registered office at: 1st Floor, Cottons Centre, Tooley Street, London, SE1 2QG. VAT Number 281765280. DivideBuy's trading address is First Floor, Brunswick Court, Brunswick Street, Newcastle-under-Lyme, ST5 1HH. © Zopa Bank Limited 2024. All rights reserved.