T3
T3 is a powerful automated unit testing tool to test Java classes. Given a target class to test, it randomly generates sequences of calls to the class' methods to test it. It catches unexpected exception; but if you had written assertions in the class, then violations to those will be caught as well.
Main features:
- Sequence-based testing: it does not test a method individually, but instead generate sequences of method calls to trigger interactions between methods of the target class.
- Fast, able to generate thousands of test sequences in few seconds.
- Generated test suite can be saved and replayed.
- A combinator-based approach to compose custom value/object generators, ala QuickCheck?.
- It can be run from the command line, or called as an API from a JUnit test class.
There is also a Groovy 'front-end' called T3i, that facilitates more powerful use of T3. T3i offers these additional features:
- We can do interactive testing through Groovy interactive shell.
- Provide a convenient way to configure T3, including specifying custom value/object generators.
- We can experiment with different configurations to generate multiple suites; combine them, filter them, and combine them again.
- We can query generated test suites for Hoare triples, LTL formulas, or algebraic formulas.
T3 needs Java 8, and T3i also needs Groovy at least 2.3.
License: GPL version 3.
Binary download:
- T3: for the most up-to-date binary you should build it from the source. The process is pretty easy; check the readme of T3. If you are impatient, you can get it here
- T3i is for now only provided in binary: here Check its readme for its dependency on other projects.
Manuals:
Contact: Wishnu Prasetya, owner and developer.
If you want to cite:
T3i: A Tool for Generating and Querying Test Suites for Java, I.S.W.B. Prasetya, 10th Joint Meeting of the European Software Engineering Conference (ESEC) and the ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE), ACM, 2015.
Note:
- The predecessor of T3, called T2 is phased out. It is still kept here.
- T3 and T3i are now hosted in this git.science.uu.nl. The bitbucket repositories will still be maintained for a time; eventually they will be closed down.
Other papers:
- Exploiting Annotations to Test Break-off Branches, I.S.W.B. Prasetya, J. Hage, A. Elyasov, 22th Asia-Pacific Software Engineering Conference (APSEC), IEEE, 2015.
- T3: Benchmarking at Third Unit Testing Tool Contest, I.S.W.B. Prasetya, IEEE/ACM 8th International Workshop on Search-Based Software Testing (SBST), IEEE, 2015.
- Unit Testing Tool Competition -- Round Three, U. Rueda, T.E.J. Vos, I.S.W.B. Prasetya, IEEE/ACM 8th International Workshop on Search-Based Software Testing (SBST), IEEE, 2015.
- T3, a Combinator-based Random Testing Tool for Java: Benchmarking, I.S.W.B. Prasetya, Int. Workshop Future Internet Testing, Lecture Notes in Computer Science, 8432, Springer, 2014.
- Trace-based Reflexive Testing of OO Programs with T2, I.S.W.B Prasetya, T.E.J. Vos, A.I. Baars, Proceedings of the International Conference on Software Testing, Verification, and Validation (ICST), 151--160, IEEE Computer Society, 2008.