Home | Amazing | Today | Tags | Publishers | Years | Account | Search 
Learning Behavior-driven Development with JavaScript

Buy

Create powerful yet simple-to-code BDD test suites in JavaScript using the most popular tools in the community

About This Book

  • Master the most popular testing tools in the JavaScript ecosystem, such as CucumberJS, Mocha, SinonJS, and more.
  • Learn how Behavior-driven development can help you to write software that is more modular and has less defects.
  • Avoid common mistakes in testing, simplify your test suites, and make them more maintainable using a very pragmatic approach to BDD.

Who This Book Is For

TThis book is ideal for any JavaScript developer who is interested in producing well-tested code. If you have no prior experience with testing, Node.js, or any other tool, do not worry, as they will be explained from scratch.

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

In Detail

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.

(HTML tags aren't allowed.)

Sport, Masculinities and the Body (Routledge Research in Sport, Culture and Society)
Sport, Masculinities and the Body (Routledge Research in Sport, Culture and Society)

This groundbreaking work explores masculinity and the body within sports. Sports continue to retain expectations for presentations of specific forms of masculinity. The body is central to these presentations. These everyday bodily performances are rehearsed and performed either successfully or unsuccessfully - and the consequences of these...

Tissue Engineering
Tissue Engineering

Increasingly viewed as the future of medicine, the field of tissue engineering is still in its infancy. As evidenced in both the scientific and popular press, there exists considerable excitement surrounding the strategy of regenerative medicine. To achieve its highest potential, a series of technological advances must be made. Putting the...

VB and VBA in a Nutshell: The Languages
VB and VBA in a Nutshell: The Languages
VB & VBA in a Nutshell: The Languages documents the latest version of the world's bestselling rapid application development environment. Paul Lomax's explanation of the language comes in two main parts.

First, Lomax explains the structure and syntax of Visual Basic (VB) and Visual Basic for Applications (VBA) programs. He details...


The Mathematics of Coding Theory
The Mathematics of Coding Theory

This book is intended to be accessible to undergraduate students with two years of typical mathematics experience, most likely meaning calculus with a little linear algebra and differential equations. Thus, specifically, there is no assumption oLa background inabstr&;t algebra or number theory, nor of probability, nor of linear...

Photographing Children and Babies: How to Take Great Pictures
Photographing Children and Babies: How to Take Great Pictures

This family-friendly guide shows parents how to dramatically improve their baby photos and create beautiful, memorable albums without extensive experience, technical knowledge, or equipment. Featuring more than 150 striking examples of successful pictures, the book provides the skills and technique to create excellent portraits, action shots,...

Beyond Simple BASIC: Delving Deeper into Your ZX Spectrum
Beyond Simple BASIC: Delving Deeper into Your ZX Spectrum
Many of the questions and problems I have encoutered during my experience with the ZX Spectrum have provided material for this book. The masses of hints and tips contained will help you the programmer to get a deeper understanding of the ZX Spectrim microcomputer - hopefully much more than you ever thought possible....
©2021 LearnIT (support@pdfchm.net) - Privacy Policy