Return to search

Unit Testing with TDD in JavaScript

JavaScript has gained increased usage and attention the last years, but development and testing methods is still lagging behind.To mitigate some of these issues, this thesis brings together unit testing and JavaScript, using test-driven development as a methodology. Through exploration of these topics, the differentiators in a unit testing framework are considered. Existing frameworks are also discussed and how the terminology in JavaScript differs from traditional xUnit family frameworks.By creating and running a set of four test cases, both the general and unique features of JavaScript are tested in hand-picked frameworks, which were decided through an evaluation process. One of the contributions is based on this; a recommendation for a minimum set of test library features for a JavaScript unit testing framework.Various factors were found to differentiate the frameworks, and so the thesis also provides a Discovery test case to emphasize some of these aspects. This test case provides practitioners with a quick option for learning a new framework. The set of test cases can be applied to new frameworks to assess their functionality.As the thesis explores an area with little current research, suggestions for further work present several topics, ranging from system level JavaScript testing to quantitative studies building on the set of test cases.

Identiferoai:union.ndltd.org:UPSALLA1/oai:DiVA.org:ntnu-14263
Date January 2011
CreatorsKleivane, Tine Flåten
PublisherNorges teknisk-naturvitenskapelige universitet, Institutt for datateknikk og informasjonsvitenskap, Institutt for datateknikk og informasjonsvitenskap
Source SetsDiVA Archive at Upsalla University
LanguageEnglish
Detected LanguageEnglish
TypeStudent thesis, info:eu-repo/semantics/bachelorThesis, text
Formatapplication/pdf
Rightsinfo:eu-repo/semantics/openAccess

Page generated in 0.002 seconds