Book Image

WEB APP TESTING USING KNOCKOUT.JS

By : Roberto Messora
Book Image

WEB APP TESTING USING KNOCKOUT.JS

By: Roberto Messora

Overview of this book

Table of Contents (11 chapters)

Unit testing automation with Karma (in GulpJS)


In the previous paragraph, we set up a build process the main objective of which is to verify our code quality and create a release version of the source code. At this point, we need to complete this process introducing unit testing.

One of the most important GulpJS plugins is the Karma integration. Karma (http://karma-runner.github.io/) is a testing environment that provides a series of useful features for developers, such as:

  • It runs tests on different kinds of browsers (not only different vendors, but also devices, such as phones and tablets) or using a PhantomJS instance

  • It supports a series of unit testing frameworks, such as Jasmine, QUnit, and Mocha

  • It can be integrated in several development environments, such as IDEs and browsers, for example, Jetbrains Webstorm or Google Chrome Developer Tools

  • It can be integrated into several continuous integration systems, for example, Jenkins, Travis, or Semaphore

The first two features are the most...