Enhancing Design by Contract with Knowledge about Equivalence Partitions.
Per Printz Madsen · The Journal of Object Technology · 2004
Software testing seems to be a huge struggle for most developers.This is presumably because of the amount of manual work involved in software testing.In this article we propose a testing approach that makes the testing process less manual.The approach combines three well-known concepts Design by Contract, Unit Testing and Equivalence Partitioning into a new approach named Testing by Contract.The first step is to define a new programming language that supports an extended form of Design by Contract.The idea is to enhance the contracts with knowledge of Equivalence Partitions.The second step is to design a tool that exploits the enhanced contracts to build quality test cases automatically.The test cases are built as JUnit test cases, which allow them to be combined with manually written test cases.A prototype Java-like language with support for this extended form of Design by Contract has been developed.A compiler to regular Java-code as well as a tool for automatic generation of test cases is currently being built.This prototype language/tool will be used to further examine and evaluate the ideas described above.