Creating a Unit Testing Application Prototype for JavaScript

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Abstract: Testing is an integral part of software development with the goal of verifying a system’s requirements. One of the most commonly used methods for verifying code is unit testing. If done properly, unit testing can guarantee the intended functionality of a code unit. Furthermore, sufficiently tested code provides dependents with a level of trust in the code’s abilities. The unit testing process has several flaws; it is difficult to identify which code must be tested; and it is challenging to maintain tests pertaining to inconstant systems. Automatic test case generation tools are a common alternative to writing tests manually. However, these tools often focus on high code coverage, but produce flaky and unreliable tests. The goal of this thesis is to develop a prototype for a unit testing application that facilitates unit test creation and maintenance for JavaScript. Using code analysis metrics, the application aims to give developers an aid in deciding what code units to test. In order to construct this prototype, a literature study was conducted, focused on unit testing and code metrics. After having constructed the prototype, a user study, in the form of an interview, was conducted in order to evaluate its usefulness. Results from the user study shows that the application could be beneficial for people with limited experience in unit testing. However, in order to determine the effectiveness of various code analysis metrics, a more thorough study would be needed. 

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)