T2 Framework
WP
T2
Automated unit testing tool for Java
T2 is a fully automatic, trace-based random testing tool, featuring
in-code specifications and
reflexive testing. It is also almost
interactive; depending on the complexity of your class it can respond in less than a second, in which time it can inject thousands of tests!
T2 checks for internal errors, run time exceptions, method
specifications, and class invariant. Unlike other testing tools,
T2 reads specifications written in plain java! They are placed in the class we want to specify. Though not as
fancy as Z or JML, in-code specifications are declarative, formal, and powerful. Maintenance
effort is also minimum.
Unlike other testing tools T2 does not check individual methods in isolation. Nor does it generate Junit test scripts, though we could add this feature. T2 actually performs the test directly or on the fly. So it responds faster, perhaps even giving the feel that it is interactive. Internally it generates tests in the form of traces (sequences) of method calls; each will be checked. This has the effect that methods are basically checking each other. This is called
reflexive testing. The benefit is that
it still works well even if the specifications provided are very partial, whereas other testing tools typically rely complete specifications.
It is a unit testing tool; with classes as the units. Violating traces are reported, and can be saved, and reloaded for re-testing or regression.
T2 does not and cannot check concurrency.
- Quick Example : here. More examples are provided the Manual.
- Screen Shots : here.
- Download : download it from Google-code. You need Java 1.5 or above. To use T2 you only need the jar file. Just include it in your classpath. Instruction on how to use T2 is in the User Manual.
- User Manual : [ download it from Google-code ].
- Presentation : [ ppt (powerpoint) ]
- Integration with IDE and JUnit : see here
- License : free to use under the GNU GPL license.
Papers
- Papers explaining T2:
- Trace-based Reflexive Testing of OO Programs, I.S.W.B. Prasetya, T.E.J. Vos, A.I. Baars. Tech. Report CSUU, 2007. Also in the proceeding of IEEE International Conference on Software Testing Verification and Validation (ICST), 2008. See also DOI.
- Papers related to T2:
- Reversi Applet: a Case for Automated Testing with T2, I.S.W.B. Prasetya, T.E.J. Vos. Or, its original technical report version: Patterns for In-code Algebraic Testing, I.S.W.B. Prasetya, T.E.J. Vos. Tech. Rep UU-CS-2008-037. The source code of the Reversi example: here.
- Extending T2 with Prime Path Coverage Exploration, M. Gerritsen. Master thesis, INF/SCR-2008-014. Dept. of Inf. and Comp. Sciences, Utrecht Univ. 2008.
- Coverage Specification (extended abstract), I.S.W.B. Prasetya, M. Gerritsen, 2008.
- THEMIS: Framework for Automated Testing of Graphical User Interfaces, M. Stobbe. Master thesis, INF/SCR-2007-105. Dept. of Inf. and Comp. Sciences, Utrecht Univ. 2008.
- Automated Testing for Java-Based Programs with Java PathFinder and T2 Framework, A.Y Prasetyo, R. Suryadharma, A. Azurat, B.H. Widjaja, in the Asia Pacific Conf. on Art, Science, Engineering & Technology (ASPAC) 2008, Solo, Indonesia.
Other things
- Some result: see here
- Related links: see here
Contact
Wishnu Prasetya,
wishnu@cs.uu.nl
Let us know what you think
Student Projects
I'm looking for students to further develop T2. For Master Thesis Project,
see here for further information.
For Experimentation Project,
check out here.