Patents
US 7,496,791 B2#3346772 Most CitedExpiredUnited States (USPTO)Utility

Mock object generation by symbolic execution

23Forward Citations (#3346772 Global)
1.4/yrCitation Velocity (#4164138 Global)
6.81Citation PageRank (#2002178 Global)
15Prior Art Cited
2Claims (2 Indep. · 0 Dep.)
0Drawings / Sheets

Abstract

A system for testing programs using a digital processor and programs in computer memory. A mock behavior generator identifies an interface indicated for mock behavior. The interface is identified as an input parameter of a parameterized unit test. The mock behavior generator creates a symbolic object with stubs to receive calls and mock behavior that returns symbolic values upon receiving a call to the stub. A symbolic executor, symbolically executes the parameterized unit test to obtain path constraints for an implementation under test, and at least one path constraint includes the symbol returned in response to the call to the stub. A constraint solver provides solutions for the paths including concrete values assigned to returned symbols. The mock behavior generator creates mock objects that return the concrete values when the implementation under test is executed.

Interactive Citation Constellation Global Citation Ranking

Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 15 · Forward citations: 23.

Claims (2 — 2 Independent, 0 Dependent)

  1. Claim 1Independent Claim

    A computerized method for creating mock behavior for objects used during testing, the method comprising: in the input parameters of a parameterized unit test, identifying an object requiring mock behavior; in response to identifying the object, creating a symbolic object comprising a call receiving stub and mock program behavior, the mock program behavior comprising returning a fresh symbol in response to receiving a program request at the call receiving stub; symbolically executing the parameterized unit test comprising identifying path constraints through an implementation under test, at lea

  2. Claim 2Independent Claim

    The computerized me

Technical Overview & Description

Full multi-page specification text is archived at the issuing office. Read complete official specification ↗

Non-Patent Literature (5)

  • Ambert et al., "BZ-TT: A Tool-Set for Test Generation from Z and B using Constraint Logic Programming," Formal Approaches to Testing of Software, FATES 2002 workshop of CONCUR '02, INRIA Report, Aug. 2002, pp. 105-119.
  • Ball, "Formalizing Counterexample-driven Refinement with Weakest Preconditions," Proceedings of 2004 Marktoberdorf Summer School, Dec. 10, 2004, 19 pages.
  • Barnett et al., "99.44% pure: Useful Abstractions in Specifications," Conference Proceedings ICIS report NIII-R0426, University of Nijmegen, 2004, pp. 11-19.
  • Barnett et al., "The Spec# Programming System: An Overview," Construction and Analysis of Safe, Secure, and Interoperable Smart Devices: International Workshop, CASSIS 2004, vol. 3362 of LNCS, 2005, pp. 49-69.
  • Bernot et al., "Software testing based on formal specifications: a theory and a tool," Softw. Eng. J., 6(6)387-405, 1991.