Endo-testing: unit testing with mock objects
Extreme programming examined
Agile Software Development: Principles, Patterns, and Practices
Agile Software Development: Principles, Patterns, and Practices
Test Driven Development: By Example
Test Driven Development: By Example
OOPSLA '04 Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
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
An intensional approach to the specification of test cases for database applications
Proceedings of the 28th international conference on Software engineering
Mock-object generation with behavior
ASE '06 Proceedings of the 21st IEEE/ACM International Conference on Automated Software Engineering
Specifying and verifying software
Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering
Developing and debugging algebraic specifications for Java classes
ACM Transactions on Software Engineering and Methodology (TOSEM)
ITNG '09 Proceedings of the 2009 Sixth International Conference on Information Technology: New Generations
Proceedings of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications
A constraint solver for software engineering: finding models and cores of large relational specifications
Proceedings of the 5th Workshop on Automation of Software Test
Falling back on executable specifications
ECOOP'10 Proceedings of the 24th European conference on Object-oriented programming
Testing object-oriented programs using dynamic aspects and non-determinism
Proceedings of the 1st Workshop on Testing Object-Oriented Systems
Moles: tool-assisted environment isolation with closures
TOOLS'10 Proceedings of the 48th international conference on Objects, models, components, patterns
Unifying execution of imperative and declarative code
Proceedings of the 33rd International Conference on Software Engineering
Towards Synthesizing Realistic Workload Traces for Studying the Hadoop Ecosystem
MASCOTS '11 Proceedings of the 2011 IEEE 19th Annual International Symposium on Modelling, Analysis, and Simulation of Computer and Telecommunication Systems
POPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The spec# programming system: an overview
CASSIS'04 Proceedings of the 2004 international conference on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices
Liberating the programmer with prorogued programming
Proceedings of the ACM international symposium on New ideas, new paradigms, and reflections on programming and software
Modeling Software Execution Environment
WCRE '12 Proceedings of the 2012 19th Working Conference on Reverse Engineering
Hi-index | 0.00 |
Test-driven methodologies encourage testing early and often. "Mock objects" support this approach by allowing a component to be tested before all depended-upon components are available. Today mock objects typically reflect little to none of an object's intended functionality, which makes it difficult and error-prone for developers to test rich properties of their code. This paper presents "declarative mocking", which enables the creation of expressive and reliable mock objects with relatively little effort. In our approach, developers write method specifications in a high-level logical language for the API being mocked, and a constraint solver dynamically executes these specifications when the methods are invoked. In addition to mocking functionality, this approach seamlessly allows data and other aspects of the environment to be easily mocked. We have implemented the approach as an extension to an existing tool for executable specifications in Java called PBnJ. We have performed an exploratory study of declarative mocking on several existing Java applications, in order to understand the power of the approach and to categorize its potential benefits and limitations. We also performed an experiment to port the unit tests of several open-source applications from a widely used mocking library to PBnJ. We found that more than half of these unit tests can be enhanced, in terms of the strength of properties and coverage, by exploiting executable specifications, with relatively little additional developer effort.