Javascript Software Testing: unit testing, open source, Jasmine, Karma, Casper.js, QUnit, SinonJS, etc.
Unit testing JavaScript applications can seem difficult. Issues arise with JavaScript scope, asynchronous XHR requests, DOM manipulation, and all the different browsers and platforms. Sometimes, JavaScript unit testing seems unreliable, brittle, or take more time and effort than it’s worth. The good news is that dozens of JavaScript test frameworks, libraries, and test runners help solve the problems. These make implementing unit tests for your JavaScript applications quick, reliable, and easy to maintain.
For Node, there are two types of automated testing: unit testing and acceptance testing. Unit testing tests code logic directly and is applicable to all types of applications. Acceptance testing, however, is an additional layer of testing most commonly used for web applications. This article discusses the Tobi and Soda frameworks for acceptance testing.
Js-test-driver is an open source JavaScript unit tests runner written in Java. The project was started at Google and is under active development. This article provides a step by step process on how to JSTestDriver to write tests for Javascript. This article starts with an overview of the tool architecture before explaining its configuration, how to run js-test-driver from the command line and how to run it from Eclipse. The main part shows how to write tests and presents the most important features of js-test-drivers. Debugging of tests in Firefox and Chrome is also discussed.
One of the biggest challenges facing web applications is the support of web browsers with different versions. This challenge is inherited from the lack of testing the JavaScript code living in the presentation tier from day one. Without unit testing this code, organizations may pay for repeated testing of web applications after upgrading or supporting new browsers. This article shows you how to reduce testing costs using efficient unit testing for JavaScript code.
Inside Google, Javascript is the 4 largest language (in terms of lines of code) but one the fastest growing. Developing fast, robust and high quality Javascript is however a challenge within the industry. Unlike C++ or Java, the availability of high quality development, debugging and testing tools for Javascript is still lagging industry standards.
Unit testing focuses on testing small pieces of code that a developer is writing. This article shows how to get started unit testing JavaScript as well as server-side code.
This article explores qooxdoo’s built-in facilities for automated UI testing. qooxdoo is a universal JavaScript framework that enables you to create applications for a wide range of platforms. With its object-oriented programming model you build rich, interactive applications (RIAs), native-like apps for mobile devices, light-weight traditional web applications or even applications to run outside the browser.