The University of Sheffield
Department of Computer Science

Badar Saif Nasser Al muqbali MSc Dissertation 2014/15

A Pastebin for Unit Testing

Supervised by G.Fraser

Abstract

Pastebin websites are repositories for any kind of text. A popular service provided by pastebin websites, that are dedicated to code sharing, is to provide on-line code compilation and execution. However, on-line test suite generation is not a common service.

EvoSuite is a tool that generates test suites for Java classes. It currently runs on commandline and as a plugin for Eclipse, IntelliJ IDEA and Maven. It would be beneficial to implement a pastebin-like web application to interact with EvoSuite that allows users to paste Java code and receive JUnit tests they can share.

In this dissertation project, a web application has been built that interacts with the EvoSuite tool to provide Java development community with a pastebin containing on-line test suite generation. Users submit Java classes and they receive a test suite generated using the EvoSuite tool. Users are able to share their code and the test suite with others through the unique web page generated for the user. The web page has an optional feature for users to rate the quality of the generated tests which allows the EvoSuite team to evaluate and enhance the tool.

Another application has been built, as part of this dissertation project, for administrators to monitor and setup the system. This application is used to view the details of submitted requests and the ratings of the generated test suites. The application also provides setup options to customize and tune the system.