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.
- M. Aeschlimann, D. Baumer, and J. Lanneluc. Java tool smithing extending the Eclipse Java development tools. In Proc. EclipseCon, Tutorial, 2005.Google Scholar
- M. Amorim, C. Pacheco, T. Xie, D. Marinov, and M. Ernst. An empirical comparison of automated generation and classification techniques for object-oriented unit testing. In Proc. 21st International Conference on Automated Software Engineering, pages 59--68, 2006. Google ScholarDigital Library
- S. Ananian. FLEX compiler infrastructure for Java, 2003. http://cycleserv2.csail.mit.edu/Harpoon.Google Scholar
- B. Rompaey, B. Bois, and S. Demeyer. Characterizing the relative significance of a test smell. In Proc. 22nd International Conference on Software Maintenance, pages 391--400, 2006. Google ScholarDigital Library
- V. Wahler, C. Walton, P. Ombredanne, and C. Jones. moreUnit, 2007. http://moreunit.sourceforge.net.Google Scholar
- T. Xie. Augmenting automatically generated unit-test suites with regression oracle checking. In Proc. 20th European Conference on Object-Oriented Programming, pages 380--403, 2006. Google ScholarDigital Library
Index Terms
- UnitPlus: assisting developer testing in Eclipse
Recommendations
From daikon to agitator: lessons and challenges in building a commercial tool for developer testing
ISSTA '06: Proceedings of the 2006 international symposium on Software testing and analysisDeveloper testing is of one of the most effective strategies for improving the quality of software, reducing its cost, and accelerating its development. Despite its widely recognized benefits, developer testing is practiced by only a minority of ...
Smart Unit Testing Framework
ISSREW '12: Proceedings of the 2012 IEEE 23rd International Symposium on Software Reliability Engineering WorkshopsUnit testing(UT) is an important step in ensuring the quality of software. Considerable effort is spent in unit testing. There are several frameworks to help with UT. Some common frameworks are Cunit, Junit, Nunit etc. All of these have very similar ...
Test Code Reuse from OSS: Current and Future Challenges
AMECSE '17: Proceedings of the 3rd Africa and Middle East Conference on Software EngineeringWe are told of the significant benefits of automated approaches to testing over manual approaches. However, it is unclear what automated testing practices exist, and how efficient or widespread such practices are within open source software. Although ...
Comments