UnitPlus: assisting developer testing in Eclipse

  • Authors:
  • Yoonki Song;Suresh Thummalapenta;Tao Xie

  • Affiliations:
  • North Carolina State University, Raleigh;North Carolina State University, Raleigh;North Carolina State University, Raleigh

  • Venue:
  • Proceedings of the 2007 OOPSLA workshop on eclipse technology eXchange
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

In the software development life cycle, unit testing is an important phase that helps in early detection of bugs. A unit test case consists of two parts: a test input, which is often a sequence of method calls, and a test oracle, which is often in the form of assertions. The effectiveness of a unit test case depends on its test input as well as its test oracle because the test oracle helps in exposing bugs during the execution of the test input. The task of writing effective test oracles is not trivial as this task requires domain or application knowledge and also needs knowledge of the intricate details of the class under test. In addition, when developers write new unit test cases, much test code (including code in test inputs or oracles) such as method argument values is the same as some previously written test code. To assist developers in writing test code in unit test cases more efficiently, we have developed an Eclipse plugin for JUnit test cases, called UnitPlus, that runs in the background and recommends test-code pieces for developers to choose (and revise when needed) to put in test oracles or test inputs. The recommendation is based on static analysis of the class under test and already written unit test cases. We have conducted a feasibility study for our UnitPlus plugin with four Java libraries to demonstrate its potential utility.