Javascript Software Testing: unit testing, open source, Jasmine, Karma, Casper.js, QUnit, SinonJS, etc.
The best reason for writing tests is to automate your testing. Without tests, you will likely perform software testing manually. This manual testing will take longer and longer as your codebase grows. This video presents how to test an Angular 2 application. Learn how to use to JavaScript open source testing tools: Jasmine, a Behavior Driven Development (BDD) testing framework for JavaScript, to unit testing components and Protractor, a testing framework for Angular and AngularJS applications, for integration testing. This presentation explores also coverage options and continuous integration tools.
Jasmine is an open source behavior-driven development (BDD) framework for testing JavaScript code. Angular is a development platform for building mobile and desktop web applications using Typescript/JavaScript (JS) and other languages. In his article, Gerard Sans offers a presentation of Jasmine, discusses the unit testing of AngularJS and shares some Unit Testing recipes for Angular 2: Components, Services, Http and MockBackend, Directives, Pipes, Routes, Observables and EventEmitter.
What might seem obvious to some people could be weird to other. This is still the case for applying unit testing to JavaScript code in multiple browsers. In his blog post “Learning How to Set Up Automated, Cross-browser JavaScript Unit Testing”, Philip Walton provides a step-by-step approach process to create some automated testing of your JavaScript code.
If you develop web sites, you are certainly aware of the side effects that some JavaScript code changes might have on your applications. Visual regression testing is a technique that allows monitoring these negative impacts. This book provides a quick step by step introduction to visual regression testing using the WebdriverIO open source tool.
Jasmine is one of the most popular open source JavaScript unit testing frameworks that allows JavaScript developers to develop “descriptive” testing code which does not necessarily need a JavaScript expert to understand it. Although Jasmine is a popular JavaScript unit testing framework and is used in many web applications, it does not have an out-of the box way to automate the running of its tests because it is designed to run from the browser.
Require.JS is an open source JavaScript file and module loader. In this blog post, Ben Wilhelm explains how to add unit tests to a Require.JS application without spending a large effort in refactoring the apps.
Ari Lerner believes that testing is a core aspect of development, that they cannot be separated from one another, that they are one in the same. This talk is about Angular, and is specifically about testing the Angular JavaScript framework, but the approaches discussed are universal to front-end applications alike.