Endo-testing: unit testing with mock objects
Extreme programming examined
AI Planner Assisted Test Generation
Software Quality Control
Computer
Automatic test factoring for java
Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering
Preliminary design of JML: a behavioral interface specification language for java
ACM SIGSOFT Software Engineering Notes
Mock-object generation with behavior
ASE '06 Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering
ARTOO: adaptive random testing for object-oriented software
Proceedings of the 30th international conference on Software engineering
Automated test data generation for aspect-oriented programs
Proceedings of the 8th ACM international conference on Aspect-oriented software development
PKorat: Parallel Generation of Structurally Complex Test Inputs
ICST '09 Proceedings of the 2009 International Conference on Software Testing Verification and Validation
AIana: an AI planning system for test data generation
Proceedings of the 1st Workshop on Testing Object-Oriented Systems
Proceedings of the 2013 International Symposium on Software Testing and Analysis
Hi-index | 0.00 |
Test data generation is an important task in the process of automated unit test generation. Random and heuristic approaches are well known for test input data generation. Unfortunately, in the presence of complex pre-conditions especially in the case of non-primitive data types those approaches often fail. A promising technique for generating an object that exactly satisfies a given pre-condition is mocking, i.e., replacing the concrete implementation with an implementation only considering the necessary behavior for a specific test case. In this paper we follow this technique and present an approach for automatically deriving the behavior of mock objects from given Design by Contract™ specifications. The generated mock objects behave according to the Design by Contract™ specification of the original class. Furthermore, we make sure that the observed behavior of the mock object satisfies the pre-condition of the method under test. We evaluate the approach using the Java implementations of 20 common Design Patterns and a stack based calculator. Our approach clearly outperforms pure random data generation in terms of line coverage.