Patents
US 8,935,573 B2#16187357 Most CitedActiveUnited States (USPTO)Utility

Reliable unit testing through cached mocking

7Forward Citations (#16187357 Global)
0.6/yrCitation Velocity (#12454607 Global)
1.21Citation PageRank (#31630164 Global)
11Prior Art Cited
1Claims (1 Indep. · 0 Dep.)
0Drawings / Sheets

Abstract

During execution of a unit test, receiving from the unit test a first request referencing a mock object. An instance of the mock object and initial cached mock object data is returned to the test unit, wherein the initial cached mock object data includes first data for a real object represented by the mock object. Second data for the real object represented by the mock object is collected. The second data for the real object is compared to the initial cached mock object data. Responsive to determining that at least one aspect of the second data for the real object does not correspond to the initial cached mock object data, the cached mock object data is updated with the second data for the real object. An indication can be provided to the unit test that the initial cached mock object data returned to the unit test is unreliable.

Interactive Citation Constellation Global Citation Ranking

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

Claims (1 — 1 Independent, 0 Dependent)

  1. Claim 1Independent Claim

    A method of unit testing a mock object using cached data, the method comprising: during execution of a unit test, receiving from the unit test a first request referencing a mock object; returning to the unit test an instance of the mock object and initial cached mock object data, wherein the initial cached mock object data includes first data for a real object represented by the mock object; collecting second data for the real object represented by the mock object; comparing the second data for the real object to the initial cached mock object data; responsive to determining that at least one

Technical Overview & Description

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

Non-Patent Literature (5)

  • Freeman, S. et al., "Evolving an Embedded Domain-Specific Language in JAVA," In OOPSLA '06, Companion to 21st ACM SIGPLAN Conf. on Object-Oriented Programming Systems, Languages, and Applications, Oct. 22-26, 2006, , 9 pgs.
  • Freeman, S. et al., "Mock Roles, Not Objects," Companion to the 19th ACM SIGPLAN Conf. on Object-Oriented Programming Systems, Languages and Applications (OOPLSA '04) Oct. 24-28, 2004, , 11 pgs.
  • Freeman, S. et al., “Evolving an Embedded Domain-Specific Language in JAVA,” In OOPSLA '06, Companion to 21st ACM SIGPLAN Conf. on Object-Oriented Programming Systems, Languages, and Applications, Oct. 22-26, 2006, <http://static.mockobjects.com/files/evolving—an—edsl.ooplsa2006.pdf>, 9 pgs.
  • Freeman, S. et al., “Mock Roles, Not Objects,” Companion to the 19th ACM SIGPLAN Conf. on Object-Oriented Programming Systems, Languages and Applications (OOPLSA '04) Oct. 24-28, 2004, <www.jmock.org/oopsla2004. pdf>, 11 pgs.
  • Lopes, C.V. et al., "Unit-Testing Aspectual Behavior," In Proc. AOSD '05 Workshop on Testing Aspect-oriented Programs, 4th Int'l Conf on Apsect-Oriented Software Development, Mar. 2005, , 6 pgs.