Unit Testing in JavaScript: Selenium

I’ve described tools like QUnit or JSSpec. They allow us to test JavaScript functions, classes, generally things that works without refreshing the page. But what if we need to check existance of “Log in” page, whether navigation works properly or user is able to modify settings of his account. These actions require loading several pages on different browsers and systems. Here comes Selenium. Suite of tools to automate web app testing across many platforms.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
May 30, 2010 in JavaScript, Programming, Unit Testing, Web Development | View Comments
Unit Testing in JavaScript: JSSpec
If you are not familiar with definition of Unit Testing or you are wondering about solutions in JavaScript go to one of my previous articles.
If you want to see real example of Unit Testing or Test Driven Development, go to article Unit Testing in JavaScript: QUnit.
Today’s Unit Testing Framework is JSSpec. It is used by MooTools, TiddlyWiki and others. Because it is purely JavaScript (Browser-side) tool like QUnit, which have been already described I’m going to point out only important things, without going into details.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
March 27, 2010 in JavaScript, Programming, Unit Testing | View Comments
Unit Testing in JavaScript. QUnit
If you are not familiar with definition of Unit Testing or you are wondering about solutions in JavaScript go to one of my previous articles.
The first type of JavaScript unit test frameworks are solutions like JSSpec or QUnit. They are written entirely in JavaScript and require a browser to run . The undoubted advantage of these solutions is an amazing simplicity of writing tests. But if we want them to run in different browsers, we are forced to do it manually. Unfortunately without some tricks we can’t run them from console, nor at once in different browsers or computers. However, there are adapters that let you to extend their functionality. Famed examples are JsTestDriver, Test Swarm and Selenium. Thanks to them we are able to control multiple browsers on multiple computers from one place. Anyway, I will describe them in future. Today we’ll take care of the basics.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
March 20, 2010 in Guides, JavaScript, Programming, Unit Testing | View Comments
Unit Testing in JavaScript. Introduction
JavaScript is mainly (but not only!) clientside language. Therefore it poses some problems for developers who use unit testing in their projects. I’m going to point out most of them and solve bit by bit in next articles. If you don’t need explanation of this term itself, proceed right to the JavaScript Issues title.
Unit Testing
In short: We’re writing tests for our application which are independent of each other. We may quickly execute set of them as we modify the code. The new application is error-free if all go positively.
Unit Testing is connected with Agile methodology and techniques of producing a software such as Extreme Programming (XP) or Test-driven development (TDD). They assume that changes in application should be made frequently and in small portions. Unfortunately, it’s equivalent to frequent errors. Thanks to Unit Testing we are able to detect them rapidly.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
March 14, 2010 in Guides, JavaScript, Unit Testing | View Comments







