A practical approach to assertion testing framework based on inner class

Using logical assertions for program verification is a basic research subject in software engineering. This paper analyzes current approaches and proposes three rules that an assertion testing framework should satisfy. That is, after adding contracts using a framework, the contracts in a tested project should be able to satisfy consistency, transitivity and completeness. By satisfying these three rules, the contracts can perform as a solid foundation for automatic test case generation. This paper also brings forward a practical approach to writing contracts, the Java Test Oracle Creator (jtoc), which uses Java annotations and Java inner class to construct intelligible contracts for programmers. Finally, a proof is given that jtoc-generated test projects satisfy the three rules proposed above.